Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthTime ¶
type AuthTime struct { SignStartTime time.Time SignEndTime time.Time KeyStartTime time.Time KeyEndTime time.Time }
AuthTime 用于生成签名所需的 q-sign-time 和 q-key-time 相关参数
type AuthorizationTransport ¶
type AuthorizationTransport struct { SecretID string SecretKey string SessionToken string // 签名多久过期 Expire time.Duration Transport http.RoundTripper // contains filtered or unexported fields }
AuthorizationTransport 给请求增加 Authorization header
func (*AuthorizationTransport) GetCredential ¶
func (t *AuthorizationTransport) GetCredential() (string, string, string)
GetCredential get the ak, sk, token
func (*AuthorizationTransport) SetCredential ¶
func (t *AuthorizationTransport) SetCredential(ak, sk, token string)
SetCredential update the SecretID(ak), SercretKey(sk), sessiontoken
type Config ¶
type Config struct { AppId string // 腾讯云appId SecretId string // 腾讯云secretId SecretKey string // 腾讯云secretKey COSSubPath string // 腾讯云对象存储子目录名 COSBucketName string // 腾讯云对象存储桶名 COSRegion string // 腾讯云对象存储区域名 COSDomain string // 腾讯云对象存储资源访问域名,如自定义COS访问域名,或自定义COS的DNS访问域名,腾讯云也提供默认访问域名,如下: }
腾讯云配置对象,以下任何一项为空时,都会尝试取配置文件中的配置,如果配置文件没配置会采用代码中写的默认配置值
Click to show internal directories.
Click to hide internal directories.