service

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Prettify

func Prettify(i interface{}) string

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) GetTimestamp

func (client *BaseClient) GetTimestamp() string

Get Date in GMT

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL