Documentation ¶
Index ¶
- func Prettify(i interface{}) string
- type BaseClient
- func (client *BaseClient) Default(str string, defaultStr string) string
- func (client *BaseClient) DefaultNumber(num int, defaultNum int) int
- func (client *BaseClient) GetAccessKeyId() string
- func (client *BaseClient) GetAccessKeySecret() string
- func (client *BaseClient) GetEndpoint(product string, regionid string) string
- func (client *BaseClient) GetNonce() string
- func (client *BaseClient) GetSignature(request *tea.Request, secret string) string
- func (client *BaseClient) GetTimestamp() string
- func (client *BaseClient) GetUserAgent(useragent string) string
- func (client *BaseClient) HasError(body map[string]interface{}) bool
- func (client *BaseClient) InitClient(config map[string]interface{}) (err error)
- func (client *BaseClient) Json(response *tea.Response) (result map[string]interface{}, err error)
- func (client *BaseClient) Query(filter map[string]interface{}) map[string]string
- func (client *BaseClient) Sign(stringToSign, accessKeySecret, secretSuffix string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseClient ¶
type BaseClient struct { RegionId string `json:"RegionId" xml:"RegionId"` Protocol string `json:"Protocol" xml:"Protocol"` Endpoint string `json:"Endpoint" xml:"Endpoint"` UserAgent string `json:"UserAgent" xml:"UserAgent"` SecurityToken string `json:"SecurityToken" xml:"SecurityToken"` ReadTimeout int `json:"ReadTimeout" xml:"ReadTimeout"` ConnectTimeout int `json:"ConnectTimeout" xml:"ConnectTimeout"` HttpProxy string `json:"HttpProxy" xml:"HttpProxy"` HttpsProxy string `json:"HttpsProxy" xml:"HttpsProxy"` NoProxy string `json:"NoProxy" xml:"NoProxy"` LocalAddr string `json:"LocalAddr" xml:"LocalAddr"` MaxIdleConns int `json:"MaxIdleConns" xml:"MaxIdleConns"` EndpointType string `json:"EndpointType" xml:"EndpointType"` OpenPlatformEndpoint string `json:"OpenPlatformEndpoint" xml:"OpenPlatformEndpoint"` // contains filtered or unexported fields }
client is for calling oss api
func (*BaseClient) Default ¶
func (client *BaseClient) Default(str string, defaultStr string) string
If realStr is not "", return realStr, or return defaultStr
func (*BaseClient) DefaultNumber ¶
func (client *BaseClient) DefaultNumber(num int, defaultNum int) int
If num is not 0, return num, or return defaultNum
func (*BaseClient) GetAccessKeyId ¶
func (client *BaseClient) GetAccessKeyId() string
func (*BaseClient) GetAccessKeySecret ¶
func (client *BaseClient) GetAccessKeySecret() string
func (*BaseClient) GetEndpoint ¶
func (client *BaseClient) GetEndpoint(product string, regionid string) string
func (*BaseClient) GetNonce ¶
func (client *BaseClient) GetNonce() string
func (*BaseClient) GetSignature ¶
func (client *BaseClient) GetSignature(request *tea.Request, secret string) string
Get Signature according to reqeust and bucketName
func (*BaseClient) GetUserAgent ¶
func (client *BaseClient) GetUserAgent(useragent string) string
func (*BaseClient) HasError ¶
func (client *BaseClient) HasError(body map[string]interface{}) bool
Determine whether the request failed
func (*BaseClient) InitClient ¶
func (client *BaseClient) InitClient(config map[string]interface{}) (err error)
func (*BaseClient) Json ¶
func (client *BaseClient) Json(response *tea.Response) (result map[string]interface{}, err error)
func (*BaseClient) Query ¶
func (client *BaseClient) Query(filter map[string]interface{}) map[string]string
Parse filter to produce a map[string]string
func (*BaseClient) Sign ¶
func (client *BaseClient) Sign(stringToSign, accessKeySecret, secretSuffix string) string
Click to show internal directories.
Click to hide internal directories.