cams

package
v1.62.548 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 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

func GetEndpointMap() map[string]string

GetEndpointMap Get Endpoint Data Map

func GetEndpointType

func GetEndpointType() string

GetEndpointType Get Endpoint Type Value

func SetClientProperty

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

SetClientProperty Set Property by Reflect

func SetEndpointDataToClient

func SetEndpointDataToClient(client *Client)

SetEndpointDataToClient Set EndpointMap and ENdpointType

Types

type CheckContactsRequest added in v1.61.551

type CheckContactsRequest struct {
	*requests.RpcRequest
	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
	ChannelType          string           `position:"Body" name:"ChannelType"`
	From                 string           `position:"Body" name:"From"`
	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
	Contacts             string           `position:"Body" name:"Contacts"`
}

CheckContactsRequest is the request struct for api CheckContacts

func CreateCheckContactsRequest added in v1.61.551

func CreateCheckContactsRequest() (request *CheckContactsRequest)

CreateCheckContactsRequest creates a request to invoke CheckContacts API

type CheckContactsResponse added in v1.61.551

type CheckContactsResponse struct {
	*responses.BaseResponse
	RequestId     string          `json:"RequestId" xml:"RequestId"`
	ResultCode    string          `json:"ResultCode" xml:"ResultCode"`
	ResultMessage string          `json:"ResultMessage" xml:"ResultMessage"`
	Contacts      []ContactStatus `json:"Contacts" xml:"Contacts"`
}

CheckContactsResponse is the response struct for api CheckContacts

func CreateCheckContactsResponse added in v1.61.551

func CreateCheckContactsResponse() (response *CheckContactsResponse)

CreateCheckContactsResponse creates a response to parse from CheckContacts response

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

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

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) CheckContacts added in v1.61.551

func (client *Client) CheckContacts(request *CheckContactsRequest) (response *CheckContactsResponse, err error)

CheckContacts invokes the cams.CheckContacts API synchronously

func (*Client) CheckContactsWithCallback added in v1.61.551

func (client *Client) CheckContactsWithCallback(request *CheckContactsRequest, callback func(response *CheckContactsResponse, err error)) <-chan int

CheckContactsWithCallback invokes the cams.CheckContacts API asynchronously

func (*Client) CheckContactsWithChan added in v1.61.551

func (client *Client) CheckContactsWithChan(request *CheckContactsRequest) (<-chan *CheckContactsResponse, <-chan error)

CheckContactsWithChan invokes the cams.CheckContacts API asynchronously

func (*Client) SendMessage

func (client *Client) SendMessage(request *SendMessageRequest) (response *SendMessageResponse, err error)

SendMessage invokes the cams.SendMessage API synchronously

func (*Client) SendMessageWithCallback

func (client *Client) SendMessageWithCallback(request *SendMessageRequest, callback func(response *SendMessageResponse, err error)) <-chan int

SendMessageWithCallback invokes the cams.SendMessage API asynchronously

func (*Client) SendMessageWithChan

func (client *Client) SendMessageWithChan(request *SendMessageRequest) (<-chan *SendMessageResponse, <-chan error)

SendMessageWithChan invokes the cams.SendMessage API asynchronously

type ContactStatus added in v1.61.551

type ContactStatus struct {
	PhoneNumber string `json:"PhoneNumber" xml:"PhoneNumber"`
	Status      string `json:"Status" xml:"Status"`
}

ContactStatus is a nested struct in cams response

type Contacts added in v1.61.551

type Contacts struct {
	ContactStatus []ContactStatus `json:"ContactStatus" xml:"ContactStatus"`
}

Contacts is a nested struct in cams response

type Module

type Module struct {
	FromId    string `json:"FromId" xml:"FromId"`
	ToId      string `json:"ToId" xml:"ToId"`
	MessageId string `json:"MessageId" xml:"MessageId"`
}

Module is a nested struct in cams response

type SendMessageRequest

type SendMessageRequest struct {
	*requests.RpcRequest
	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
	MessageType          string           `position:"Body" name:"MessageType"`
	TemplateBodyParams   string           `position:"Body" name:"TemplateBodyParams"`
	Link                 string           `position:"Body" name:"Link"`
	Caption              string           `position:"Body" name:"Caption"`
	Type                 string           `position:"Body" name:"Type"`
	ChannelType          string           `position:"Body" name:"ChannelType"`
	From                 string           `position:"Body" name:"From"`
	Text                 string           `position:"Body" name:"Text"`
	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
	To                   string           `position:"Body" name:"To"`
	TemplateCode         string           `position:"Body" name:"TemplateCode"`
}

SendMessageRequest is the request struct for api SendMessage

func CreateSendMessageRequest

func CreateSendMessageRequest() (request *SendMessageRequest)

CreateSendMessageRequest creates a request to invoke SendMessage API

type SendMessageResponse

type SendMessageResponse struct {
	*responses.BaseResponse
	RequestId     string `json:"RequestId" xml:"RequestId"`
	ResultCode    string `json:"ResultCode" xml:"ResultCode"`
	ResultMessage string `json:"ResultMessage" xml:"ResultMessage"`
	Module        Module `json:"Module" xml:"Module"`
}

SendMessageResponse is the response struct for api SendMessage

func CreateSendMessageResponse

func CreateSendMessageResponse() (response *SendMessageResponse)

CreateSendMessageResponse creates a response to parse from SendMessage response

Jump to

Keyboard shortcuts

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