common

package
v3.0.91+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SHA256 = "HmacSHA256"
	SHA1   = "HmacSHA1"
)

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(v bool) *bool

func Float64Ptr

func Float64Ptr(v float64) *float64

func Int64Ptr

func Int64Ptr(v int64) *int64

func IntPtr

func IntPtr(v int) *int

func Sign

func Sign(s, secretKey, method string) string

func StringPtr

func StringPtr(v string) *string

func StringPtrs

func StringPtrs(vals []string) []*string

func StringValues

func StringValues(ptrs []*string) []string

func Uint64Ptr

func Uint64Ptr(v uint64) *uint64

func UintPtr

func UintPtr(v uint) *uint

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

func (*Client) GetRegion

func (c *Client) GetRegion() string

func (*Client) Init

func (c *Client) Init(region string) *Client

func (*Client) Send

func (c *Client) Send(request tchttp.Request, response tchttp.Response) (err error)

func (*Client) WithCredential

func (c *Client) WithCredential(cred *Credential) *Client

func (*Client) WithHttpTransport

func (c *Client) WithHttpTransport(transport http.RoundTripper) *Client

func (*Client) WithProfile

func (c *Client) WithProfile(clientProfile *profile.ClientProfile) *Client

func (*Client) WithSecretId

func (c *Client) WithSecretId(secretId, secretKey string) *Client

func (*Client) WithSignatureMethod

func (c *Client) WithSignatureMethod(method string) *Client

type Credential

type Credential struct {
	SecretId  string
	SecretKey string
	Token     string
}

func NewCredential

func NewCredential(secretId, secretKey string) *Credential

func NewTokenCredential

func NewTokenCredential(secretId, secretKey, token string) *Credential

func (*Credential) GetCredentialParams

func (c *Credential) GetCredentialParams() map[string]string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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