refactor🎨: upgrade OXS interface
This commit is contained in:
1 parent
dfaa2ff51e
commit
cdb5faf043
1 file changed
+23
-2
@@ -1,6 +1,27 @@
|
|||||||
package file_store
|
package file_store
|
||||||
|
|
||||||
|
// DriverType 驱动类型
|
||||||
|
type DriverType string
|
||||||
|
|
||||||
|
const (
|
||||||
|
// HuaweiOBS 华为云OBS
|
||||||
|
HuaweiOBS DriverType = "HuaweiOBS"
|
||||||
|
// AliYunOSS 阿里云OSS
|
||||||
|
AliYunOSS DriverType = "AliYunOSS"
|
||||||
|
// QiNiuKodo 七牛云kodo
|
||||||
|
QiNiuKodo DriverType = "QiNiuKodo"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ClientOption map[string]interface{}
|
||||||
|
|
||||||
|
// TODO: FileStoreType名称待定
|
||||||
|
|
||||||
|
// FileStoreType OXS
|
||||||
type FileStoreType interface {
|
type FileStoreType interface {
|
||||||
Setup() error
|
// Setup 装载 endpoint sss
|
||||||
UpLoad(yourObjectName string, localFile string) error
|
Setup(endpoint, accessKeyID, accessKeySecret, BucketName string, options ...ClientOption) error
|
||||||
|
// UpLoad 上传
|
||||||
|
UpLoad(yourObjectName string, localFile interface{}) error
|
||||||
|
// GetTempToken 获取临时Token
|
||||||
|
GetTempToken() (string, error)
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user