saf

package
v0.0.0-...-bbc24d0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	sdk.Client
}

Client is the sdk client struct, each func corresponds to an OpenAPI

func NewClient

func NewClient() (client *Client, err error)

NewClient creates a sdk client with environment variables

func NewClientWithAccessKey

func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error)

NewClientWithAccessKey is a shortcut to create sdk client with accesskey usage: https://help.aliyun.com/document_detail/66217.html

func NewClientWithEcsRamRole

func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error)

NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role usage: https://help.aliyun.com/document_detail/66223.html

func NewClientWithOptions

func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error)

NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential this is the common api to create a sdk client

func NewClientWithRamRoleArn

func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error)

NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn usage: https://help.aliyun.com/document_detail/66222.html

func NewClientWithRsaKeyPair

func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error)

NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair attention: rsa key pair auth is only Japan regions available

func NewClientWithStsToken

func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error)

NewClientWithStsToken is a shortcut to create sdk client with sts token usage: https://help.aliyun.com/document_detail/66222.html

func (*Client) ExecuteRequest

func (client *Client) ExecuteRequest(request *ExecuteRequestRequest) (response *ExecuteRequestResponse, err error)

ExecuteRequest invokes the saf.ExecuteRequest API synchronously api document: https://help.aliyun.com/api/saf/executerequest.html

func (*Client) ExecuteRequestWithCallback

func (client *Client) ExecuteRequestWithCallback(request *ExecuteRequestRequest, callback func(response *ExecuteRequestResponse, err error)) <-chan int

ExecuteRequestWithCallback invokes the saf.ExecuteRequest API asynchronously api document: https://help.aliyun.com/api/saf/executerequest.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) ExecuteRequestWithChan

func (client *Client) ExecuteRequestWithChan(request *ExecuteRequestRequest) (<-chan *ExecuteRequestResponse, <-chan error)

ExecuteRequestWithChan invokes the saf.ExecuteRequest API asynchronously api document: https://help.aliyun.com/api/saf/executerequest.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

type Data

type Data struct {
	Tags   string `json:"Tags" xml:"Tags"`
	Score  string `json:"Score" xml:"Score"`
	Extend string `json:"Extend" xml:"Extend"`
}

Data is a nested struct in saf response

type ExecuteRequestRequest

type ExecuteRequestRequest struct {
	*requests.RpcRequest
	ServiceParameters string `position:"Query" name:"ServiceParameters"`
	Service           string `position:"Query" name:"Service"`
}

ExecuteRequestRequest is the request struct for api ExecuteRequest

func CreateExecuteRequestRequest

func CreateExecuteRequestRequest() (request *ExecuteRequestRequest)

CreateExecuteRequestRequest creates a request to invoke ExecuteRequest API

type ExecuteRequestResponse

type ExecuteRequestResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
	Code      int    `json:"Code" xml:"Code"`
	Message   string `json:"Message" xml:"Message"`
	Data      Data   `json:"Data" xml:"Data"`
}

ExecuteRequestResponse is the response struct for api ExecuteRequest

func CreateExecuteRequestResponse

func CreateExecuteRequestResponse() (response *ExecuteRequestResponse)

CreateExecuteRequestResponse creates a response to parse from ExecuteRequest response

Jump to

Keyboard shortcuts

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