Versions in this module Expand all Collapse all v1 v1.0.557 Dec 13, 2022 Changes in this version + const EnvCredentialFile + const ExpiredTimeout + const SHA1 + const SHA256 + const StateClosed + const StateHalfOpen + const StateOpen + func BoolPtr(v bool) *bool + func BoolPtrs(vals []bool) []*bool + func Float64Ptr(v float64) *float64 + func Float64Ptrs(vals []float64) []*float64 + func Int64Ptr(v int64) *int64 + func Int64Ptrs(vals []int64) []*int64 + func IntPtr(v int) *int + func IntPtrs(vals []int) []*int + func Sign(s, secretKey, method string) string + func StringPtr(v string) *string + func StringPtrs(vals []string) []*string + func StringValues(ptrs []*string) []string + func Uint64Ptr(v uint64) *uint64 + func Uint64Ptrs(vals []uint64) []*uint64 + func UintPtr(v uint) *uint + func UintPtrs(vals []uint) []*uint + type Client struct + func NewClientWithProviders(region string, providers ...Provider) (client *Client, err error) + func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) + func NewCommonClient(cred CredentialIface, region string, clientProfile *profile.ClientProfile) (c *Client) + func (c *Client) GetCredential() CredentialIface + func (c *Client) GetRegion() string + func (c *Client) Init(region string) *Client + func (c *Client) Send(request tchttp.Request, response tchttp.Response) (err error) + func (c *Client) SendOctetStream(request tchttp.Request, response tchttp.Response) (err error) + func (c *Client) WithCredential(cred CredentialIface) *Client + func (c *Client) WithDebug(flag bool) *Client + func (c *Client) WithHttpTransport(transport http.RoundTripper) *Client + func (c *Client) WithProfile(clientProfile *profile.ClientProfile) *Client + func (c *Client) WithProvider(provider Provider) (*Client, error) + func (c *Client) WithRequestClient(rc string) *Client + func (c *Client) WithSecretId(secretId, secretKey string) *Client + func (c *Client) WithSignatureMethod(method string) *Client + type Credential struct + SecretId string + SecretKey string + Token string + func NewCredential(secretId, secretKey string) *Credential + func NewTokenCredential(secretId, secretKey, token string) *Credential + func (c *Credential) GetSecretId() string + func (c *Credential) GetSecretKey() string + func (c *Credential) GetToken() string + type CredentialIface interface + GetSecretId func() string + GetSecretKey func() string + GetToken func() string + type CvmRoleCredential struct + func (c *CvmRoleCredential) GetSecretId() string + func (c *CvmRoleCredential) GetSecretKey() string + func (c *CvmRoleCredential) GetToken() string + type CvmRoleProvider struct + func DefaultCvmRoleProvider() *CvmRoleProvider + func NewCvmRoleProvider(roleName string) *CvmRoleProvider + func (r *CvmRoleProvider) GetCredential() (CredentialIface, error) + type EnvProvider struct + func DefaultEnvProvider() *EnvProvider + func NewEnvProvider(secretIdEnvName, secretKeyEnvName string) *EnvProvider + func (p *EnvProvider) GetCredential() (CredentialIface, error) + type OIDCRoleArnProvider struct + func DefaultTkeOIDCRoleArnProvider() (*OIDCRoleArnProvider, error) + func NewOIDCRoleArnProvider(region, providerId, webIdentityToken, roleArn, roleSessionName string, ...) *OIDCRoleArnProvider + func (r *OIDCRoleArnProvider) GetCredential() (CredentialIface, error) + type ProfileProvider struct + func DefaultProfileProvider() *ProfileProvider + func (p *ProfileProvider) GetCredential() (CredentialIface, error) + type Provider interface + GetCredential func() (CredentialIface, error) + func DefaultProviderChain() Provider + func NewProviderChain(providers []Provider) Provider + type ProviderChain struct + Providers []Provider + func (c *ProviderChain) GetCredential() (CredentialIface, error) + type RoleArnCredential struct + func (c *RoleArnCredential) GetSecretId() string + func (c *RoleArnCredential) GetSecretKey() string + func (c *RoleArnCredential) GetToken() string + type RoleArnProvider struct + func DefaultRoleArnProvider(secretId, secretKey, roleArn string) *RoleArnProvider + func NewRoleArnProvider(secretId, secretKey, roleArn, sessionName string, duration int64) *RoleArnProvider + func (r *RoleArnProvider) GetCredential() (CredentialIface, error)