Documentation ¶
Index ¶
- Constants
- func ToUrlValues(i interface{}) (values url.Values)
- func UnmarshalResultInto(data []byte, result interface{}) error
- type ApiInfo
- type BaseResp
- type Client
- func (client *Client) CtxJson(ctx context.Context, api string, query url.Values, body string) ([]byte, int, error)
- func (client *Client) CtxPost(ctx context.Context, api string, query url.Values, form url.Values) ([]byte, int, error)
- func (client *Client) CtxPostWithContentType(ctx context.Context, api string, query url.Values, body string, ct string) ([]byte, int, error)
- func (client *Client) CtxQuery(ctx context.Context, api string, query url.Values) ([]byte, int, error)
- 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) SetRetrySettings(retrySettings *RetrySettings)
- 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
- type Credentials
- type ErrorObj
- type InnerToken
- type Policy
- type RequestParam
- type ResponseMetadata
- type RetrySettings
- type SecurityToken2
- type ServiceInfo
- type SignRequest
- type Statement
Constants ¶
View Source
const ( RegionCnNorth1 = "cn-north-1" RegionUsEast1 = "us-east-1" RegionApSingapore = "ap-singapore-1" )
View Source
const ( StatementEffectAllow = "Allow" StatementEffectDeny = "Deny" )
View Source
const SDKName = "volc-sdk-golang"
View Source
const SDKVersion = "v1.0.82"
Variables ¶
This section is empty.
Functions ¶
func ToUrlValues ¶
func UnmarshalResultInto ¶
Types ¶
type Client ¶
type Client struct { Client *http.Client ServiceInfo *ServiceInfo ApiInfoList map[string]*ApiInfo }
Client
func NewClient ¶
func NewClient(info *ServiceInfo, apiInfoList map[string]*ApiInfo) *Client
NewClient
func (*Client) CtxPost ¶
func (client *Client) CtxPost(ctx context.Context, api string, query url.Values, form url.Values) ([]byte, int, error)
CtxPost Initiate a Post request
func (*Client) CtxPostWithContentType ¶
func (client *Client) CtxPostWithContentType(ctx context.Context, api string, query url.Values, body string, ct string) ([]byte, int, error)
CtxPostWithContentType Initiate a post request with a custom Content-Type, Content-Type cannot be empty
func (*Client) GetSignUrl ¶
GetSignUrl
func (*Client) PostWithContentType ¶
func (*Client) SetRetrySettings ¶
func (client *Client) SetRetrySettings(retrySettings *RetrySettings)
SetRetrySettings
func (*Client) SetSessionToken ¶
SetSessionToken
func (*Client) SetTimeout ¶
type CommonResponse ¶
type CommonResponse struct { ResponseMetadata ResponseMetadata Result interface{} `json:"Result,omitempty"` }
Unified JSON return results
type Credentials ¶
type Credentials struct { AccessKeyID string SecretAccessKey string Service string Region string SessionToken string }
func (Credentials) Clone ¶
func (cred Credentials) Clone() Credentials
type InnerToken ¶
type RequestParam ¶
type ResponseMetadata ¶
type RetrySettings ¶
type SecurityToken2 ¶
type ServiceInfo ¶
type ServiceInfo struct { Timeout time.Duration Scheme string Host string Header http.Header Credentials Credentials Retry RetrySettings }
func (*ServiceInfo) Clone ¶
func (serviceInfo *ServiceInfo) Clone() *ServiceInfo
type SignRequest ¶
type SignRequest struct { XDate string XNotSignBody string XCredential string XAlgorithm string XSignedHeaders string XSignedQueries string XSignature string XSecurityToken string Host string ContentType string XContentSha256 string Authorization string }
func GetSignRequest ¶
func GetSignRequest(requestParam RequestParam, credentials Credentials) SignRequest
type Statement ¶
type Statement struct { Effect string Action []string Resource []string Condition string `json:",omitempty"` }
func NewAllowStatement ¶
func NewDenyStatement ¶
Click to show internal directories.
Click to hide internal directories.