Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CosAdapter ¶
type CosAdapter struct {
CosConf
}
func (*CosAdapter) ImgToken ¶
func (m *CosAdapter) ImgToken(bucket, key string) (interface{}, error)
ImgToken 获取上传凭证
type CosConf ¶
type CosConf struct {
Appid string `json:"appid"`
SecretId string `json:"secretId"`
SecretKey string `json:"secretKey"`
Storage []CosStorage `json:"storage"`
}
type CosStorage ¶
type CosTokenItem ¶
type CosTokenItemCredentials ¶
type CosTokenResp ¶
type CosTokenResp struct {
ImgToken CosTokenItem `json:"img_token"`
}
type OssAdapter ¶
type OssAdapter struct {
OssConf
}
func (*OssAdapter) ImgToken ¶
func (m *OssAdapter) ImgToken(bucket, key string) (interface{}, error)
ImgToken 获取上传凭证
type OssConf ¶
type OssConf struct {
AccessKey string `json:"access_key"`
SecretKey string `json:"secret_key"`
RoleArny string `json:"role_arny"`
Storage []OssStorage `json:"storage"`
}
type OssStorage ¶
Click to show internal directories.
Click to hide internal directories.