Documentation ¶
Index ¶
- Constants
- type OBS
- func (o *OBS) AuthorizedUpload(key string, expires int) (string, error)
- func (o *OBS) Cloud() string
- func (o *OBS) DeleteObjects(keys ...string) error
- func (o *OBS) GetObject(key string) (io.ReadCloser, error)
- func (o *OBS) GetThumbnailSuffix(width, height int, size int64) string
- func (o *OBS) GetURL(key string) string
- func (o *OBS) PutObject(key string, reader io.Reader) (string, error)
- func (o *OBS) UploadFile(key, filePath string, partSize int64, routines int) (string, error)
- type Option
Constants ¶
View Source
const (
// CloudHuawei 云服务商:华为云
CloudHuawei = "huawei"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OBS ¶
type OBS struct {
// contains filtered or unexported fields
}
OBS 华为云 OBS 客户端
func NewOBS ¶
func NewOBS(endpoint, accessKeyID, accessKeySecret, bucketName string, opts ...Option) (*OBS, error)
NewOBS 创建一个华为云 OBS 客户端
func (*OBS) AuthorizedUpload ¶
AuthorizedUpload 授权上传至华为云 OBS,expires:过期时间(秒)
func (*OBS) DeleteObjects ¶
DeleteObjects 批量删除华为云 OBS 上的对象
func (*OBS) GetObject ¶
func (o *OBS) GetObject(key string) (io.ReadCloser, error)
GetObject 获取对象在华为云 OBS 的存储数据
func (*OBS) GetThumbnailSuffix ¶
GetThumbnailSuffix 获取缩略图后缀
Click to show internal directories.
Click to hide internal directories.