# README
cloud
对象存储
- 支持
s3
、qcloud
、gcs
对象存储操作
例子
sb := MustNew(StorageTypeS3, key, secret, "xxxx", WithRegion("us-east-2"))
err := sb.PutObject(context.Background(), src, strings.NewReader(str), len(str))
xpanic.WhenError(err)
fmt.Println("OK")
Output:
OK
# Functions
InstallPutOptionsWatchDog the installed func will called when NewPutOptions called.
InstallStorageOptionsWatchDog the installed func will called when NewStorageOptions called.
MustNew 新建 Storage,失败会 panic.
New 新建 Storage.
NewPutOptions new PutOptions.
NewStorageOptions new StorageOptions.
go:generate optionGen --option_return_previous=false.
go:generate optionGen --option_return_previous=false.
WithCacheControl 上传文件的缓存控制.
WithContentDisposition 上传文件的内容描述.
WithContentType 上传文件的类型.
WithRegion 云存储的Region.
WithStorageType 云存储类型.
# Variables
ErrRegionShouldNotEmptyForS3 s3 的 region 必须进行设置,否则返回该错误.
ErrUnknownStorageType 未知的 StorageType.
# Structs
ObjectInfo container for object metadata.
PutOptions should use NewPutOptions to initialize it.
StorageOptions should use NewStorageOptions to initialize it.
# Interfaces
PutOptionsInterface visitor + ApplyOption interface for PutOptions.
PutOptionsVisitor visitor interface for PutOptions.
Storage 存储器.
StorageOptionsInterface visitor + ApplyOption interface for StorageOptions.
StorageOptionsVisitor visitor interface for StorageOptions.
# Type aliases
PutOption option func.
StorageOption option func.
No description provided by the author