...

Package client

import "github.com/alibabacloud-go/darabonba-openapi/client"
Overview
Index

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 NewClient(config *Config) (*Client, error)
    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, authType *string, pathname *string, bodyType *string, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)
    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)
    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)
    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) GetBearerToken() (_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) GetType() (_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) SetGlobalParameters(v *GlobalParameters) *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 GlobalParameters
    func (s GlobalParameters) GoString() string
    func (s *GlobalParameters) SetHeaders(v map[string]*string) *GlobalParameters
    func (s *GlobalParameters) SetQueries(v map[string]*string) *GlobalParameters
    func (s GlobalParameters) String() string
type OpenApiRequest
    func (s OpenApiRequest) GoString() string
    func (s *OpenApiRequest) SetBody(v interface{}) *OpenApiRequest
    func (s *OpenApiRequest) SetEndpointOverride(v string) *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

Package files

client.go

func DefaultAny

func DefaultAny(inputValue interface{}, defaultValue interface{}) (_result interface{})

*

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.ClientInterface
    GlobalParameters     *GlobalParameters
}

func NewClient

func NewClient(config *Config) (*Client, error)

*

func (*Client) CallApi

func (client *Client) CallApi(params *Params, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)

func (*Client) CheckConfig

func (client *Client) CheckConfig(config *Config) (_err error)

*

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)

*

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)

*

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)

*

func (*Client) DoRequest

func (client *Client) DoRequest(params *Params, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)

*

func (*Client) Execute

func (client *Client) Execute(params *Params, request *OpenApiRequest, runtime *util.RuntimeOptions) (_result map[string]interface{}, _err error)

*

func (*Client) GetAccessKeyId

func (client *Client) GetAccessKeyId() (_result *string, _err error)

*

func (*Client) GetAccessKeySecret

func (client *Client) GetAccessKeySecret() (_result *string, _err error)

*

func (*Client) GetBearerToken

func (client *Client) GetBearerToken() (_result *string, _err error)

*

func (*Client) GetRpcHeaders

func (client *Client) GetRpcHeaders() (_result map[string]*string, _err error)

*

func (*Client) GetSecurityToken

func (client *Client) GetSecurityToken() (_result *string, _err error)

*

func (*Client) GetType

func (client *Client) GetType() (_result *string, _err error)

*

func (*Client) GetUserAgent

func (client *Client) GetUserAgent() (_result *string)

*

func (*Client) Init

func (client *Client) Init(config *Config) (_err error)

func (*Client) SetRpcHeaders

func (client *Client) SetRpcHeaders(headers map[string]*string) (_err error)

*

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"`
    // Global Parameters
    GlobalParameters *GlobalParameters `json:"globalParameters,omitempty" xml:"globalParameters,omitempty"`
}

func (Config) GoString

func (s Config) GoString() string

func (*Config) SetAccessKeyId

func (s *Config) SetAccessKeyId(v string) *Config

func (*Config) SetAccessKeySecret

func (s *Config) SetAccessKeySecret(v string) *Config

func (*Config) SetConnectTimeout

func (s *Config) SetConnectTimeout(v int) *Config

func (*Config) SetCredential

func (s *Config) SetCredential(v credential.Credential) *Config

func (*Config) SetEndpoint

func (s *Config) SetEndpoint(v string) *Config

func (*Config) SetEndpointType

func (s *Config) SetEndpointType(v string) *Config

func (*Config) SetGlobalParameters

func (s *Config) SetGlobalParameters(v *GlobalParameters) *Config

func (*Config) SetHttpProxy

func (s *Config) SetHttpProxy(v string) *Config

func (*Config) SetHttpsProxy

func (s *Config) SetHttpsProxy(v string) *Config

func (*Config) SetMaxIdleConns

func (s *Config) SetMaxIdleConns(v int) *Config

func (*Config) SetMethod

func (s *Config) SetMethod(v string) *Config

func (*Config) SetNetwork

func (s *Config) SetNetwork(v string) *Config

func (*Config) SetNoProxy

func (s *Config) SetNoProxy(v string) *Config

func (*Config) SetOpenPlatformEndpoint

func (s *Config) SetOpenPlatformEndpoint(v string) *Config

func (*Config) SetProtocol

func (s *Config) SetProtocol(v string) *Config

func (*Config) SetReadTimeout

func (s *Config) SetReadTimeout(v int) *Config

func (*Config) SetRegionId

func (s *Config) SetRegionId(v string) *Config

func (*Config) SetSecurityToken

func (s *Config) SetSecurityToken(v string) *Config

func (*Config) SetSignatureAlgorithm

func (s *Config) SetSignatureAlgorithm(v string) *Config

func (*Config) SetSignatureVersion

func (s *Config) SetSignatureVersion(v string) *Config

func (*Config) SetSocks5NetWork

func (s *Config) SetSocks5NetWork(v string) *Config

func (*Config) SetSocks5Proxy

func (s *Config) SetSocks5Proxy(v string) *Config

func (*Config) SetSuffix

func (s *Config) SetSuffix(v string) *Config

func (*Config) SetType

func (s *Config) SetType(v string) *Config

func (*Config) SetUserAgent

func (s *Config) SetUserAgent(v string) *Config

func (Config) String

func (s Config) String() string

type GlobalParameters

type GlobalParameters struct {
    Headers map[string]*string `json:"headers,omitempty" xml:"headers,omitempty"`
    Queries map[string]*string `json:"queries,omitempty" xml:"queries,omitempty"`
}

func (GlobalParameters) GoString

func (s GlobalParameters) GoString() string

func (*GlobalParameters) SetHeaders

func (s *GlobalParameters) SetHeaders(v map[string]*string) *GlobalParameters

func (*GlobalParameters) SetQueries

func (s *GlobalParameters) SetQueries(v map[string]*string) *GlobalParameters

func (GlobalParameters) String

func (s GlobalParameters) String() string

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"`
    EndpointOverride *string            `json:"endpointOverride,omitempty" xml:"endpointOverride,omitempty"`
}

func (OpenApiRequest) GoString

func (s OpenApiRequest) GoString() string

func (*OpenApiRequest) SetBody

func (s *OpenApiRequest) SetBody(v interface{}) *OpenApiRequest

func (*OpenApiRequest) SetEndpointOverride

func (s *OpenApiRequest) SetEndpointOverride(v string) *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) GoString

func (s Params) GoString() string

func (*Params) SetAction

func (s *Params) SetAction(v string) *Params

func (*Params) SetAuthType

func (s *Params) SetAuthType(v string) *Params

func (*Params) SetBodyType

func (s *Params) SetBodyType(v string) *Params

func (*Params) SetMethod

func (s *Params) SetMethod(v string) *Params

func (*Params) SetPathname

func (s *Params) SetPathname(v string) *Params

func (*Params) SetProtocol

func (s *Params) SetProtocol(v string) *Params

func (*Params) SetReqBodyType

func (s *Params) SetReqBodyType(v string) *Params

func (*Params) SetStyle

func (s *Params) SetStyle(v string) *Params

func (*Params) SetVersion

func (s *Params) SetVersion(v string) *Params

func (Params) String

func (s Params) String() string