Documentation ¶
Overview ¶
This file is auto-generated, don't edit it. Thanks. *
- This is for OpenApi SDK
Index ¶
- func DefaultAny(inputValue interface{}, defaultValue interface{}) (_result interface{})
- type Client
- func (client *Client) CallApi(params *Params, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)
- func (client *Client) CheckConfig(config *Config) (_err error)
- func (client *Client) DoROARequest(action *string, version *string, protocol *string, method *string, ...) (_result map[string]interface{}, _err error)
- func (client *Client) DoROARequestWithForm(action *string, version *string, protocol *string, method *string, ...) (_result map[string]interface{}, _err error)
- func (client *Client) DoRPCRequest(action *string, version *string, protocol *string, method *string, ...) (_result map[string]interface{}, _err error)
- func (client *Client) DoRequest(params *Params, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)
- func (client *Client) Execute(params *Params, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)
- func (client *Client) GetAccessKeyId() (_result *string, _err error)
- func (client *Client) GetAccessKeySecret() (_result *string, _err error)
- func (client *Client) GetRpcHeaders() (_result map[string]*string, _err error)
- func (client *Client) GetSecurityToken() (_result *string, _err error)
- func (client *Client) GetUserAgent() (_result *string)
- func (client *Client) Init(config *Config) (_err error)
- func (client *Client) SetRpcHeaders(headers map[string]*string) (_err error)
- type Config
- func (s Config) GoString() string
- func (s *Config) SetAccessKeyId(v string) *Config
- func (s *Config) SetAccessKeySecret(v string) *Config
- func (s *Config) SetConnectTimeout(v int) *Config
- func (s *Config) SetCredential(v credential.Credential) *Config
- func (s *Config) SetEndpoint(v string) *Config
- func (s *Config) SetEndpointType(v string) *Config
- func (s *Config) SetHttpProxy(v string) *Config
- func (s *Config) SetHttpsProxy(v string) *Config
- func (s *Config) SetMaxIdleConns(v int) *Config
- func (s *Config) SetMethod(v string) *Config
- func (s *Config) SetNetwork(v string) *Config
- func (s *Config) SetNoProxy(v string) *Config
- func (s *Config) SetOpenPlatformEndpoint(v string) *Config
- func (s *Config) SetProtocol(v string) *Config
- func (s *Config) SetReadTimeout(v int) *Config
- func (s *Config) SetRegionId(v string) *Config
- func (s *Config) SetSecurityToken(v string) *Config
- func (s *Config) SetSignatureAlgorithm(v string) *Config
- func (s *Config) SetSignatureVersion(v string) *Config
- func (s *Config) SetSocks5NetWork(v string) *Config
- func (s *Config) SetSocks5Proxy(v string) *Config
- func (s *Config) SetSuffix(v string) *Config
- func (s *Config) SetType(v string) *Config
- func (s *Config) SetUserAgent(v string) *Config
- func (s Config) String() string
- type OpenApiRequest
- func (s OpenApiRequest) GoString() string
- func (s *OpenApiRequest) SetBody(v interface{}) *OpenApiRequest
- func (s *OpenApiRequest) SetHeaders(v map[string]*string) *OpenApiRequest
- func (s *OpenApiRequest) SetHostMap(v map[string]*string) *OpenApiRequest
- func (s *OpenApiRequest) SetQuery(v map[string]*string) *OpenApiRequest
- func (s *OpenApiRequest) SetStream(v io.Reader) *OpenApiRequest
- func (s OpenApiRequest) String() string
- type Params
- func (s Params) GoString() string
- func (s *Params) SetAction(v string) *Params
- func (s *Params) SetAuthType(v string) *Params
- func (s *Params) SetBodyType(v string) *Params
- func (s *Params) SetMethod(v string) *Params
- func (s *Params) SetPathname(v string) *Params
- func (s *Params) SetProtocol(v string) *Params
- func (s *Params) SetReqBodyType(v string) *Params
- func (s *Params) SetStyle(v string) *Params
- func (s *Params) SetVersion(v string) *Params
- func (s Params) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAny ¶
func DefaultAny(inputValue interface{}, defaultValue interface{}) (_result interface{})
*
- If inputValue is not null, return it or return defaultValue
- @param inputValue users input value
- @param defaultValue default value
- @return the final result
Types ¶
type Client ¶
type Client struct { Endpoint *string RegionId *string Protocol *string Method *string UserAgent *string EndpointRule *string EndpointMap map[string]*string Suffix *string ReadTimeout *int ConnectTimeout *int HttpProxy *string HttpsProxy *string Socks5Proxy *string Socks5NetWork *string NoProxy *string Network *string ProductId *string MaxIdleConns *int EndpointType *string OpenPlatformEndpoint *string Credential credential.Credential SignatureVersion *string SignatureAlgorithm *string Headers map[string]*string Spi spi.Client }
func NewClient ¶
*
- Init client with Config
- @param config config contains the necessary information to create a client
func (*Client) CallApi ¶
func (client *Client) CallApi(params *Params, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)
func (*Client) CheckConfig ¶
*
- If the endpointRule and config.endpoint are empty, throw error
- @param config config contains the necessary information to create a client
func (*Client) DoROARequest ¶
func (client *Client) DoROARequest(action *string, version *string, protocol *string, method *string, authType *string, pathname *string, bodyType *string, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)
*
- Encapsulate the request and invoke the network
- @param action api name
- @param version product version
- @param protocol http or https
- @param method e.g. GET
- @param authType authorization type e.g. AK
- @param pathname pathname of every api
- @param bodyType response body type e.g. String
- @param request object of OpenApiRequest
- @param runtime which controls some details of call api, such as retry times
- @return the response
func (*Client) DoROARequestWithForm ¶
func (client *Client) DoROARequestWithForm(action *string, version *string, protocol *string, method *string, authType *string, pathname *string, bodyType *string, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)
*
- Encapsulate the request and invoke the network with form body
- @param action api name
- @param version product version
- @param protocol http or https
- @param method e.g. GET
- @param authType authorization type e.g. AK
- @param pathname pathname of every api
- @param bodyType response body type e.g. String
- @param request object of OpenApiRequest
- @param runtime which controls some details of call api, such as retry times
- @return the response
func (*Client) DoRPCRequest ¶
func (client *Client) DoRPCRequest(action *string, version *string, protocol *string, method *string, authType *string, bodyType *string, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)
*
- Encapsulate the request and invoke the network
- @param action api name
- @param version product version
- @param protocol http or https
- @param method e.g. GET
- @param authType authorization type e.g. AK
- @param bodyType response body type e.g. String
- @param request object of OpenApiRequest
- @param runtime which controls some details of call api, such as retry times
- @return the response
func (*Client) DoRequest ¶
func (client *Client) DoRequest(params *Params, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)
*
- Encapsulate the request and invoke the network
- @param action api name
- @param version product version
- @param protocol http or https
- @param method e.g. GET
- @param authType authorization type e.g. AK
- @param bodyType response body type e.g. String
- @param request object of OpenApiRequest
- @param runtime which controls some details of call api, such as retry times
- @return the response
func (*Client) Execute ¶
func (client *Client) Execute(params *Params, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)
*
- Encapsulate the request and invoke the network
- @param action api name
- @param version product version
- @param protocol http or https
- @param method e.g. GET
- @param authType authorization type e.g. AK
- @param bodyType response body type e.g. String
- @param request object of OpenApiRequest
- @param runtime which controls some details of call api, such as retry times
- @return the response
func (*Client) GetAccessKeySecret ¶
*
- Get accesskey secret by using credential
- @return accesskey secret
type Config ¶
type Config struct { // accesskey id AccessKeyId *string `json:"accessKeyId,omitempty" xml:"accessKeyId,omitempty"` // accesskey secret AccessKeySecret *string `json:"accessKeySecret,omitempty" xml:"accessKeySecret,omitempty"` // security token SecurityToken *string `json:"securityToken,omitempty" xml:"securityToken,omitempty"` // http protocol Protocol *string `json:"protocol,omitempty" xml:"protocol,omitempty"` // http method Method *string `json:"method,omitempty" xml:"method,omitempty"` // region id RegionId *string `json:"regionId,omitempty" xml:"regionId,omitempty"` // read timeout ReadTimeout *int `json:"readTimeout,omitempty" xml:"readTimeout,omitempty"` // connect timeout ConnectTimeout *int `json:"connectTimeout,omitempty" xml:"connectTimeout,omitempty"` // http proxy HttpProxy *string `json:"httpProxy,omitempty" xml:"httpProxy,omitempty"` // https proxy HttpsProxy *string `json:"httpsProxy,omitempty" xml:"httpsProxy,omitempty"` // credential Credential credential.Credential `json:"credential,omitempty" xml:"credential,omitempty"` // endpoint Endpoint *string `json:"endpoint,omitempty" xml:"endpoint,omitempty"` // proxy white list NoProxy *string `json:"noProxy,omitempty" xml:"noProxy,omitempty"` // max idle conns MaxIdleConns *int `json:"maxIdleConns,omitempty" xml:"maxIdleConns,omitempty"` // network for endpoint Network *string `json:"network,omitempty" xml:"network,omitempty"` // user agent UserAgent *string `json:"userAgent,omitempty" xml:"userAgent,omitempty"` // suffix for endpoint Suffix *string `json:"suffix,omitempty" xml:"suffix,omitempty"` // socks5 proxy Socks5Proxy *string `json:"socks5Proxy,omitempty" xml:"socks5Proxy,omitempty"` // socks5 network Socks5NetWork *string `json:"socks5NetWork,omitempty" xml:"socks5NetWork,omitempty"` // endpoint type EndpointType *string `json:"endpointType,omitempty" xml:"endpointType,omitempty"` // OpenPlatform endpoint OpenPlatformEndpoint *string `json:"openPlatformEndpoint,omitempty" xml:"openPlatformEndpoint,omitempty"` // Deprecated // credential type Type *string `json:"type,omitempty" xml:"type,omitempty"` // Signature Version SignatureVersion *string `json:"signatureVersion,omitempty" xml:"signatureVersion,omitempty"` // Signature Algorithm SignatureAlgorithm *string `json:"signatureAlgorithm,omitempty" xml:"signatureAlgorithm,omitempty"` }
*
- Model for initing client
func (*Config) SetAccessKeyId ¶
func (*Config) SetAccessKeySecret ¶
func (*Config) SetConnectTimeout ¶
func (*Config) SetCredential ¶
func (s *Config) SetCredential(v credential.Credential) *Config
func (*Config) SetEndpoint ¶
func (*Config) SetEndpointType ¶
func (*Config) SetHttpProxy ¶
func (*Config) SetHttpsProxy ¶
func (*Config) SetMaxIdleConns ¶
func (*Config) SetNetwork ¶
func (*Config) SetNoProxy ¶
func (*Config) SetOpenPlatformEndpoint ¶
func (*Config) SetProtocol ¶
func (*Config) SetReadTimeout ¶
func (*Config) SetRegionId ¶
func (*Config) SetSecurityToken ¶
func (*Config) SetSignatureAlgorithm ¶
func (*Config) SetSignatureVersion ¶
func (*Config) SetSocks5NetWork ¶
func (*Config) SetSocks5Proxy ¶
func (*Config) SetUserAgent ¶
type OpenApiRequest ¶
type OpenApiRequest struct { Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"` Query map[string]*string `json:"query,omitempty" xml:"query,omitempty"` Body interface{} `json:"body,omitempty" xml:"body,omitempty"` Stream io.Reader `json:"stream,omitempty" xml:"stream,omitempty"` HostMap map[string]*string `json:"hostMap,omitempty" xml:"hostMap,omitempty"` }
func (OpenApiRequest) GoString ¶
func (s OpenApiRequest) GoString() string
func (*OpenApiRequest) SetBody ¶
func (s *OpenApiRequest) SetBody(v interface{}) *OpenApiRequest
func (*OpenApiRequest) SetHeaders ¶
func (s *OpenApiRequest) SetHeaders(v map[string]*string) *OpenApiRequest
func (*OpenApiRequest) SetHostMap ¶
func (s *OpenApiRequest) SetHostMap(v map[string]*string) *OpenApiRequest
func (*OpenApiRequest) SetQuery ¶
func (s *OpenApiRequest) SetQuery(v map[string]*string) *OpenApiRequest
func (*OpenApiRequest) SetStream ¶
func (s *OpenApiRequest) SetStream(v io.Reader) *OpenApiRequest
func (OpenApiRequest) String ¶
func (s OpenApiRequest) String() string
type Params ¶
type Params struct { Action *string `json:"action,omitempty" xml:"action,omitempty" require:"true"` Version *string `json:"version,omitempty" xml:"version,omitempty" require:"true"` Protocol *string `json:"protocol,omitempty" xml:"protocol,omitempty" require:"true"` Pathname *string `json:"pathname,omitempty" xml:"pathname,omitempty" require:"true"` Method *string `json:"method,omitempty" xml:"method,omitempty" require:"true"` AuthType *string `json:"authType,omitempty" xml:"authType,omitempty" require:"true"` BodyType *string `json:"bodyType,omitempty" xml:"bodyType,omitempty" require:"true"` ReqBodyType *string `json:"reqBodyType,omitempty" xml:"reqBodyType,omitempty" require:"true"` Style *string `json:"style,omitempty" xml:"style,omitempty"` }
func (*Params) SetAuthType ¶
func (*Params) SetBodyType ¶
func (*Params) SetPathname ¶
func (*Params) SetProtocol ¶
func (*Params) SetReqBodyType ¶
func (*Params) SetVersion ¶
Click to show internal directories.
Click to hide internal directories.