saf

package
v1.62.763 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EndpointMap map[string]string

EndpointMap Endpoint Data

View Source
var EndpointType = "regional"

EndpointType regional or central

Functions

func GetEndpointMap added in v1.61.33

func GetEndpointMap() map[string]string

GetEndpointMap Get Endpoint Data Map

func GetEndpointType added in v1.61.33

func GetEndpointType() string

GetEndpointType Get Endpoint Type Value

func SetClientProperty added in v1.61.33

func SetClientProperty(client *Client, propertyName string, propertyValue interface{})

SetClientProperty Set Property by Reflect

func SetEndpointDataToClient added in v1.61.33

func SetEndpointDataToClient(client *Client)

SetEndpointDataToClient Set EndpointMap and ENdpointType

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://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

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://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

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 NewClientWithProvider added in v1.61.33

func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error)

NewClientWithProvider creates a sdk client with providers usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

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://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithRamRoleArnAndPolicy added in v1.61.33

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

NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

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 usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

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://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func (*Client) ExecuteExtendService added in v1.61.289

func (client *Client) ExecuteExtendService(request *ExecuteExtendServiceRequest) (response *ExecuteExtendServiceResponse, err error)

ExecuteExtendService invokes the saf.ExecuteExtendService API synchronously

func (*Client) ExecuteExtendServiceWithCallback added in v1.61.289

func (client *Client) ExecuteExtendServiceWithCallback(request *ExecuteExtendServiceRequest, callback func(response *ExecuteExtendServiceResponse, err error)) <-chan int

ExecuteExtendServiceWithCallback invokes the saf.ExecuteExtendService API asynchronously

func (*Client) ExecuteExtendServiceWithChan added in v1.61.289

func (client *Client) ExecuteExtendServiceWithChan(request *ExecuteExtendServiceRequest) (<-chan *ExecuteExtendServiceResponse, <-chan error)

ExecuteExtendServiceWithChan invokes the saf.ExecuteExtendService API asynchronously

func (*Client) ExecuteRequest

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

ExecuteRequest invokes the saf.ExecuteRequest API synchronously

func (*Client) ExecuteRequestML added in v1.61.464

func (client *Client) ExecuteRequestML(request *ExecuteRequestMLRequest) (response *ExecuteRequestMLResponse, err error)

ExecuteRequestML invokes the saf.ExecuteRequestML API synchronously

func (*Client) ExecuteRequestMLWithCallback added in v1.61.464

func (client *Client) ExecuteRequestMLWithCallback(request *ExecuteRequestMLRequest, callback func(response *ExecuteRequestMLResponse, err error)) <-chan int

ExecuteRequestMLWithCallback invokes the saf.ExecuteRequestML API asynchronously

func (*Client) ExecuteRequestMLWithChan added in v1.61.464

func (client *Client) ExecuteRequestMLWithChan(request *ExecuteRequestMLRequest) (<-chan *ExecuteRequestMLResponse, <-chan error)

ExecuteRequestMLWithChan invokes the saf.ExecuteRequestML API asynchronously

func (*Client) ExecuteRequestSG added in v1.61.173

func (client *Client) ExecuteRequestSG(request *ExecuteRequestSGRequest) (response *ExecuteRequestSGResponse, err error)

ExecuteRequestSG invokes the saf.ExecuteRequestSG API synchronously

func (*Client) ExecuteRequestSGWithCallback added in v1.61.173

func (client *Client) ExecuteRequestSGWithCallback(request *ExecuteRequestSGRequest, callback func(response *ExecuteRequestSGResponse, err error)) <-chan int

ExecuteRequestSGWithCallback invokes the saf.ExecuteRequestSG API asynchronously

func (*Client) ExecuteRequestSGWithChan added in v1.61.173

func (client *Client) ExecuteRequestSGWithChan(request *ExecuteRequestSGRequest) (<-chan *ExecuteRequestSGResponse, <-chan error)

ExecuteRequestSGWithChan invokes the saf.ExecuteRequestSG API asynchronously

func (*Client) ExecuteRequestWithCallback

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

ExecuteRequestWithCallback invokes the saf.ExecuteRequest API asynchronously

func (*Client) ExecuteRequestWithChan

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

ExecuteRequestWithChan invokes the saf.ExecuteRequest API asynchronously

func (*Client) RequestDecision added in v1.61.1360

func (client *Client) RequestDecision(request *RequestDecisionRequest) (response *RequestDecisionResponse, err error)

RequestDecision invokes the saf.RequestDecision API synchronously

func (*Client) RequestDecisionWithCallback added in v1.61.1360

func (client *Client) RequestDecisionWithCallback(request *RequestDecisionRequest, callback func(response *RequestDecisionResponse, err error)) <-chan int

RequestDecisionWithCallback invokes the saf.RequestDecision API asynchronously

func (*Client) RequestDecisionWithChan added in v1.61.1360

func (client *Client) RequestDecisionWithChan(request *RequestDecisionRequest) (<-chan *RequestDecisionResponse, <-chan error)

RequestDecisionWithChan invokes the saf.RequestDecision API asynchronously

type Data

type Data struct {
	InvokeResult string `json:"InvokeResult" xml:"InvokeResult"`
}

Data is a nested struct in saf response

type ExecuteExtendServiceRequest added in v1.61.289

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

ExecuteExtendServiceRequest is the request struct for api ExecuteExtendService

func CreateExecuteExtendServiceRequest added in v1.61.289

func CreateExecuteExtendServiceRequest() (request *ExecuteExtendServiceRequest)

CreateExecuteExtendServiceRequest creates a request to invoke ExecuteExtendService API

type ExecuteExtendServiceResponse added in v1.61.289

type ExecuteExtendServiceResponse struct {
	*responses.BaseResponse
	HttpStatusCode string `json:"HttpStatusCode" xml:"HttpStatusCode"`
	Code           string `json:"Code" xml:"Code"`
	Message        string `json:"Message" xml:"Message"`
	RequestId      string `json:"RequestId" xml:"RequestId"`
	Success        bool   `json:"Success" xml:"Success"`
	Data           Data   `json:"Data" xml:"Data"`
}

ExecuteExtendServiceResponse is the response struct for api ExecuteExtendService

func CreateExecuteExtendServiceResponse added in v1.61.289

func CreateExecuteExtendServiceResponse() (response *ExecuteExtendServiceResponse)

CreateExecuteExtendServiceResponse creates a response to parse from ExecuteExtendService response

type ExecuteRequestMLRequest added in v1.61.464

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

ExecuteRequestMLRequest is the request struct for api ExecuteRequestML

func CreateExecuteRequestMLRequest added in v1.61.464

func CreateExecuteRequestMLRequest() (request *ExecuteRequestMLRequest)

CreateExecuteRequestMLRequest creates a request to invoke ExecuteRequestML API

type ExecuteRequestMLResponse added in v1.61.464

type ExecuteRequestMLResponse struct {
	*responses.BaseResponse
	Code      int                    `json:"Code" xml:"Code"`
	Message   string                 `json:"Message" xml:"Message"`
	Data      map[string]interface{} `json:"Data" xml:"Data"`
	RequestId string                 `json:"RequestId" xml:"RequestId"`
}

ExecuteRequestMLResponse is the response struct for api ExecuteRequestML

func CreateExecuteRequestMLResponse added in v1.61.464

func CreateExecuteRequestMLResponse() (response *ExecuteRequestMLResponse)

CreateExecuteRequestMLResponse creates a response to parse from ExecuteRequestML 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
	Code      int                    `json:"Code" xml:"Code"`
	Message   string                 `json:"Message" xml:"Message"`
	Data      map[string]interface{} `json:"Data" xml:"Data"`
	RequestId string                 `json:"RequestId" xml:"RequestId"`
}

ExecuteRequestResponse is the response struct for api ExecuteRequest

func CreateExecuteRequestResponse

func CreateExecuteRequestResponse() (response *ExecuteRequestResponse)

CreateExecuteRequestResponse creates a response to parse from ExecuteRequest response

type ExecuteRequestSGRequest added in v1.61.173

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

ExecuteRequestSGRequest is the request struct for api ExecuteRequestSG

func CreateExecuteRequestSGRequest added in v1.61.173

func CreateExecuteRequestSGRequest() (request *ExecuteRequestSGRequest)

CreateExecuteRequestSGRequest creates a request to invoke ExecuteRequestSG API

type ExecuteRequestSGResponse added in v1.61.173

type ExecuteRequestSGResponse struct {
	*responses.BaseResponse
	Code      int                    `json:"Code" xml:"Code"`
	Message   string                 `json:"Message" xml:"Message"`
	Data      map[string]interface{} `json:"Data" xml:"Data"`
	RequestId string                 `json:"RequestId" xml:"RequestId"`
}

ExecuteRequestSGResponse is the response struct for api ExecuteRequestSG

func CreateExecuteRequestSGResponse added in v1.61.173

func CreateExecuteRequestSGResponse() (response *ExecuteRequestSGResponse)

CreateExecuteRequestSGResponse creates a response to parse from ExecuteRequestSG response

type RequestDecisionRequest added in v1.61.1360

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

RequestDecisionRequest is the request struct for api RequestDecision

func CreateRequestDecisionRequest added in v1.61.1360

func CreateRequestDecisionRequest() (request *RequestDecisionRequest)

CreateRequestDecisionRequest creates a request to invoke RequestDecision API

type RequestDecisionResponse added in v1.61.1360

type RequestDecisionResponse struct {
	*responses.BaseResponse
	RequestId string                 `json:"RequestId" xml:"RequestId"`
	Code      int64                  `json:"Code" xml:"Code"`
	Message   string                 `json:"Message" xml:"Message"`
	Data      map[string]interface{} `json:"Data" xml:"Data"`
}

RequestDecisionResponse is the response struct for api RequestDecision

func CreateRequestDecisionResponse added in v1.61.1360

func CreateRequestDecisionResponse() (response *RequestDecisionResponse)

CreateRequestDecisionResponse creates a response to parse from RequestDecision response

Jump to

Keyboard shortcuts

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