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