Documentation
¶
Index ¶
- type AliOSS
- func (oss *AliOSS) Base64Put(ctx context.Context, key string, raw []byte, mimeType string) error
- func (oss *AliOSS) Bucket() string
- func (oss *AliOSS) Delete(key string) error
- func (oss *AliOSS) Domain() string
- func (oss *AliOSS) Put(ctx context.Context, key string, data io.Reader, size int64, mimeType string) error
- func (oss *AliOSS) PutToken(expiredSec int, dir string) (token, accessKey, secretKey string, err error)
- func (oss *AliOSS) RegionId() string
- func (oss *AliOSS) URL(key string) string
- type AliOSSConfig
- type Operation
- type QiNiuOSS
- func (oss *QiNiuOSS) Base64Put(ctx context.Context, key string, raw []byte, mimeType string) error
- func (oss *QiNiuOSS) Bucket() string
- func (oss *QiNiuOSS) Delete(key string) error
- func (oss *QiNiuOSS) Domain() string
- func (oss *QiNiuOSS) Put(ctx context.Context, key string, data io.Reader, size int64, mimeType string) error
- func (oss *QiNiuOSS) PutToken(expiredSec int, dir string) (token, accessKey, secretKey string, err error)
- func (oss *QiNiuOSS) RegionId() string
- func (oss *QiNiuOSS) URL(key string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliOSS ¶
type AliOSS struct {
// contains filtered or unexported fields
}
func NewAliOSS ¶
func NewAliOSS(cfg AliOSSConfig) (*AliOSS, error)
roleArn, sessionName aliCloud sts service
type AliOSSConfig ¶
type Operation ¶
type Operation interface {
Put(ctx context.Context, key string, data io.Reader, size int64, mimeType string) error
Base64Put(ctx context.Context, key string, raw []byte, mimeType string) error
Delete(key string) error
Bucket() string
RegionId() string
Domain() string
// gen source URL by key
URL(key string) string
// temp Put action Token
PutToken(expiredSec int, dir string) (token, accessKey, secretKey string, err error)
}
Click to show internal directories.
Click to hide internal directories.