oss
import "github.com/ccheers/xpkg/oss"
Index
func IsErrNoMatchType
func IsErrNoMatchType(err error) bool
IsErrNoMatchType 错误断言 判断错误是否是: 未匹配 oss 错误
type Config
Config Oss 配置
type Config struct {
AccessKey string
AccessKeySecret string
EndPoint string
}
type Oss
Oss 抽象接口
type Oss interface {
Set(ctx context.Context, bucket string, key string, reader io.Reader) (err error)
Get(ctx context.Context, bucket string, key string) (resp []byte, err error)
}
func Factory
func Factory(tp Type, config Config) (Oss, error)
Factory 工厂函数
type Type
Type Oss 类型
type Type string
const (
// OssTypeHuaweiYun Oss 类型是华为云
OssTypeHuaweiYun Type = "huaweiyun"
// OssTypeAliYun Oss 类型是阿里云
OssTypeAliYun Type = "aliyun"
)
Generated by gomarkdoc