Versions in this module Expand all Collapse all v1 v1.0.2 Nov 29, 2023 v1.0.0 Nov 29, 2023 Changes in this version + const RegionApSingapore + const RegionUsEast1 + const StatementEffectAllow + const StatementEffectDeny + func Sign4(request *http.Request, credential Credentials) *http.Request + type ApiInfo struct + Form url.Values + Header http.Header + Method string + Path string + Query url.Values + Timeout time.Duration + type BaseResp struct + CreatedTime int64 + Status string + UpdatedTime int64 + type Client struct + ApiInfoList map[string]*ApiInfo + Client http.Client + SdkVersion string + ServiceInfo *ServiceInfo + func NewClient(info *ServiceInfo, apiInfoList map[string]*ApiInfo) *Client + func (client *Client) GetSignUrl(api string, query url.Values) (string, error) + func (client *Client) Json(api string, query url.Values, body string) ([]byte, int, error) + func (client *Client) Post(api string, query url.Values, form url.Values) ([]byte, int, error) + func (client *Client) PostWithContentType(api string, query url.Values, body string, ct string) ([]byte, int, error) + func (client *Client) Query(api string, query url.Values) ([]byte, int, error) + func (client *Client) SetAccessKey(ak string) + func (client *Client) SetCredential(c Credentials) + func (client *Client) SetHost(host string) + func (client *Client) SetScheme(scheme string) + func (client *Client) SetSecretKey(sk string) + func (client *Client) SetSessionToken(token string) + func (client *Client) SetTimeout(timeout time.Duration) + func (client *Client) SignSts2(inlinePolicy *Policy, expire time.Duration) (*SecurityToken2, error) + type CommonResponse struct + ResponseMetadata ResponseMetadata + Result interface{} + type Credentials struct + AccessKeyID string + Region string + SecretAccessKey string + Service string + SessionToken string + func (c Credentials) Sign(request *http.Request) *http.Request + func (c Credentials) SignUrl(request *http.Request) string + func (cred Credentials) Clone() Credentials + type ErrorObj struct + Code string + CodeN int + Message string + type InnerToken struct + AccessKeyId string + ExpiredTime int64 + LTAccessKeyId string + PolicyString string + Signature string + SignedSecretAccessKey string + type Policy struct + Statement []*Statement + type ResponseMetadata struct + Action string + Error *ErrorObj + Region string + RequestId string + Service string + Version string + type SecurityToken2 struct + AccessKeyID string + CurrentTime string + ExpiredTime string + SecretAccessKey string + SessionToken string + type ServiceInfo struct + Credentials Credentials + Header http.Header + Host string + Scheme string + Timeout time.Duration + func (serviceInfo *ServiceInfo) Clone() *ServiceInfo + type Statement struct + Action []string + Condition string + Effect string + Resource []string + func NewAllowStatement(actions, resources []string) *Statement + func NewDenyStatement(actions, resources []string) *Statement