interface.go 676 B

123456789101112131415161718192021222324252627
  1. package file_store
  2. // DriverType 驱动类型
  3. type DriverType string
  4. const (
  5. // HuaweiOBS 华为云OBS
  6. HuaweiOBS DriverType = "HuaweiOBS"
  7. // AliYunOSS 阿里云OSS
  8. AliYunOSS DriverType = "AliYunOSS"
  9. // QiNiuKodo 七牛云kodo
  10. QiNiuKodo DriverType = "QiNiuKodo"
  11. )
  12. type ClientOption map[string]interface{}
  13. // TODO: FileStoreType名称待定
  14. // FileStoreType OXS
  15. type FileStoreType interface {
  16. // Setup 装载 endpoint sss
  17. Setup(endpoint, accessKeyID, accessKeySecret, BucketName string, options ...ClientOption) error
  18. // UpLoad 上传
  19. UpLoad(yourObjectName string, localFile interface{}) error
  20. // GetTempToken 获取临时Token
  21. GetTempToken() (string, error)
  22. }