Documentation ¶
Index ¶
- Variables
- func GetEndpointMap() map[string]string
- func GetEndpointType() string
- func SetClientProperty(client *Client, propertyName string, propertyValue interface{})
- func SetEndpointDataToClient(client *Client)
- type CheckContactsRequest
- type CheckContactsResponse
- type Client
- func NewClient() (client *Client, err error)
- func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error)
- func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error)
- func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error)
- func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error)
- func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error)
- func NewClientWithRamRoleArnAndPolicy(regionId string, ...) (client *Client, err error)
- func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error)
- func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error)
- func (client *Client) CheckContacts(request *CheckContactsRequest) (response *CheckContactsResponse, err error)
- func (client *Client) CheckContactsWithCallback(request *CheckContactsRequest, ...) <-chan int
- func (client *Client) CheckContactsWithChan(request *CheckContactsRequest) (<-chan *CheckContactsResponse, <-chan error)
- func (client *Client) SendMessage(request *SendMessageRequest) (response *SendMessageResponse, err error)
- func (client *Client) SendMessageWithCallback(request *SendMessageRequest, ...) <-chan int
- func (client *Client) SendMessageWithChan(request *SendMessageRequest) (<-chan *SendMessageResponse, <-chan error)
- type ContactStatus
- type Contacts
- type Module
- type SendMessageRequest
- type SendMessageResponse
Constants ¶
This section is empty.
Variables ¶
var EndpointMap map[string]string
EndpointMap Endpoint Data
var EndpointType = "regional"
EndpointType regional or central
Functions ¶
func SetClientProperty ¶
SetClientProperty Set Property by Reflect
func SetEndpointDataToClient ¶
func SetEndpointDataToClient(client *Client)
SetEndpointDataToClient Set EndpointMap and ENdpointType
Types ¶
type CheckContactsRequest ¶
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 ¶
func CreateCheckContactsRequest() (request *CheckContactsRequest)
CreateCheckContactsRequest creates a request to invoke CheckContacts API
type CheckContactsResponse ¶
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 ¶
func CreateCheckContactsResponse() (response *CheckContactsResponse)
CreateCheckContactsResponse creates a response to parse from CheckContacts response
type Client ¶
Client is the sdk client struct, each func corresponds to an OpenAPI
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 ¶
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 ¶
func (client *Client) CheckContacts(request *CheckContactsRequest) (response *CheckContactsResponse, err error)
CheckContacts invokes the cams.CheckContacts API synchronously
func (*Client) CheckContactsWithCallback ¶
func (client *Client) CheckContactsWithCallback(request *CheckContactsRequest, callback func(response *CheckContactsResponse, err error)) <-chan int
CheckContactsWithCallback invokes the cams.CheckContacts API asynchronously
func (*Client) CheckContactsWithChan ¶
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 ¶
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 ¶
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