oss

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrNoMatchType

func IsErrNoMatchType(err error) bool

IsErrNoMatchType 错误断言 判断错误是否是: 未匹配 oss 错误

Types

type Config

type Config struct {
	AccessKey       string
	AccessKeySecret string
	EndPoint        string
}

Config Oss 配置

type 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)
}

Oss 抽象接口

func Factory

func Factory(tp Type, config Config) (Oss, error)

Factory 工厂函数

type Type

type Type string

Type Oss 类型

const (
	//OssTypeHuaweiYun Oss 类型是华为云
	OssTypeHuaweiYun Type = "huaweiyun"
	//OssTypeAliYun Oss 类型是阿里云
	OssTypeAliYun Type = "aliyun"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL