models

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompleteCommonParams

func CompleteCommonParams(request IRequest, region string)

func ContactParams

func ContactParams(req IRequest) (err error)

ContactParams 连接参数

func NewCmqError

func NewCmqError(code int, message, requestId string) error

func ParseFromHttpResponse

func ParseFromHttpResponse(hr *http.Response, response IResponse) (err error)

Types

type BatchDeleteMessageReq

type BatchDeleteMessageReq struct {
	*Request
	QueueName     string   `name:"queueName"`
	ReceiptHandle []string `name:"receiptHandle"`
}

func NewBatchDeleteMessageReq

func NewBatchDeleteMessageReq(queueName string) *BatchDeleteMessageReq

type BatchDeleteMessageResp

type BatchDeleteMessageResp struct {
	*Response
	ErrorList []DelError `json:"errorList"`
}

func NewBatchDeleteMessageResp

func NewBatchDeleteMessageResp() *BatchDeleteMessageResp

type BatchPublishMessageReq

type BatchPublishMessageReq struct {
	*Request
	TopicName  string    `name:"topicName"`
	MsgBody    []string  `name:"msgBody"`
	MsgTag     *[]string `name:"msgTag"`
	RoutingKey *string   `name:"routingKey"`
}

func NewBatchPublishMessageReq

func NewBatchPublishMessageReq(topicName string) *BatchPublishMessageReq

type BatchPublishMessageResp

type BatchPublishMessageResp struct {
	*Response
	MsgList []*PublishMsgId `json:"msgList"`
}

func NewBatchPublishMessageResp

func NewBatchPublishMessageResp() *BatchPublishMessageResp

type BatchReceiveMessageReq

type BatchReceiveMessageReq struct {
	*Request
	QueueName          string `name:"queueName"`
	NumOfMsg           int    `name:"numOfMsg"`
	PollingWaitSeconds *int   `name:"pollingWaitSeconds"`
}

func NewBatchReceiveMessageReq

func NewBatchReceiveMessageReq(queueName string, numOfMsg int) *BatchReceiveMessageReq

type BatchReceiveMessageResp

type BatchReceiveMessageResp struct {
	*Response
	MsgInfoList []*MsgInfo `json:"msgInfoList"`
}

func NewBatchReceiveMessageResp

func NewBatchReceiveMessageResp() *BatchReceiveMessageResp

type BatchSendMessageReq

type BatchSendMessageReq struct {
	*Request
	QueueName    string   `name:"queueName"`
	MsgBody      []string `name:"msgBody"`
	DelaySeconds *int     `name:"delaySeconds"`
}

func NewBatchSendMessageReq

func NewBatchSendMessageReq(queueName string) *BatchSendMessageReq

type BatchSendMessageResp

type BatchSendMessageResp struct {
	*Response
	MsgList []*SendMsgId `json:"msgList"`
}

func NewBatchSendMessageResp

func NewBatchSendMessageResp() *BatchSendMessageResp

type ClearSubscriptionFilterTagsReq

type ClearSubscriptionFilterTagsReq struct {
	*Request
	TopicName        string `name:"topicName"`
	SubscriptionName string `name:"subscriptionName"`
}

func NewClearSubscriptionFilterTagsReq

func NewClearSubscriptionFilterTagsReq(topicName string, subscriptionName string) *ClearSubscriptionFilterTagsReq

type ClearSubscriptionFilterTagsResp

type ClearSubscriptionFilterTagsResp struct {
	*Response
}

func NewClearSubscriptionFilterTagsResp

func NewClearSubscriptionFilterTagsResp() *ClearSubscriptionFilterTagsResp

type CmqErr

type CmqErr struct {
	Code      int
	Message   string
	RequestId string
}

func (*CmqErr) Error

func (e *CmqErr) Error() string

func (*CmqErr) GetCode

func (e *CmqErr) GetCode() int

func (*CmqErr) GetMessage

func (e *CmqErr) GetMessage() string

func (*CmqErr) GetRequestId

func (e *CmqErr) GetRequestId() string

type CreateTopicReq

type CreateTopicReq struct {
	*Request
	TopicName  string `name:"topicName"`
	MaxMsgSize int    `name:"maxMsgSize"`
	FilterType *int   `name:"maxMsgSize"`
}

func NewCreateTopicReq

func NewCreateTopicReq(topicName string) *CreateTopicReq

type CreateTopicResp

type CreateTopicResp struct {
	*Response
	TopicId string `json:"topicId"`
}

func NewCreateTopicResp

func NewCreateTopicResp() *CreateTopicResp

type DeadLetterPolicy

type DeadLetterPolicy struct {
	DeadLetterQueue string `json:"deadLetterQueue"`
	Policy          int    `json:"policy"`
	MaxReceiveCount *int   `json:"maxReceiveCount"`
	MaxTimeToLive   *int   `json:"maxTimeToLive"`
}

type DelError

type DelError struct {
	Code          int    `json:"code"`
	Message       string `json:"message"`
	ReceiptHandle string `json:"receiptHandle"`
}

type DeleteMessageReq

type DeleteMessageReq struct {
	*Request
	QueueName     string `name:"queueName"`
	ReceiptHandle string `name:"receiptHandle"`
}

func NewDeleteMessageReq

func NewDeleteMessageReq(queueName, msgHandler string) *DeleteMessageReq

type DeleteMessageResp

type DeleteMessageResp struct {
	*Response
}

func NewDeleteMessageResp

func NewDeleteMessageResp() *DeleteMessageResp

type DeleteQueueReq

type DeleteQueueReq struct {
	*Request
	QueueName string `name:"queueName"`
}

func NewDeleteQueueReq

func NewDeleteQueueReq(queueName string) *DeleteQueueReq

type DeleteQueueResp

type DeleteQueueResp struct {
	*Response
}

func NewDeleteQueueResp

func NewDeleteQueueResp() *DeleteQueueResp

type DeleteTopicReq

type DeleteTopicReq struct {
	*Request
	TopicName string `name:"topicName"`
}

func NewDeleteTopicReq

func NewDeleteTopicReq(topicName string) *DeleteTopicReq

type DeleteTopicResp

type DeleteTopicResp struct {
	*Response
}

func NewDeleteTopicResp

func NewDeleteTopicResp() *DeleteTopicResp

type GetQueueAttributesReq

type GetQueueAttributesReq struct {
	*Request
	QueueName string `name:"queueName"`
}

func NewGetQueueAttributesReq

func NewGetQueueAttributesReq(queueName string) *GetQueueAttributesReq

type GetQueueAttributesResp

type GetQueueAttributesResp struct {
	*Response
	MaxMsgHeapNum       int `json:"maxMsgHeapNum"`
	PollingWaitSeconds  int `json:"pollingWaitSeconds"`
	VisibilityTimeout   int `json:"visibilityTimeout"`
	MaxMsgSize          int `json:"maxMsgSize"`
	MsgRetentionSeconds int `json:"msgRetentionSeconds"`
	CreateTime          int `json:"createTime"`
	LastModifyTime      int `json:"lastModifyTime"`
	ActiveMsgNum        int `json:"activeMsgNum"`
	InactiveMsgNum      int `json:"inactiveMsgNum"`
	RewindSeconds       int `json:"rewindSeconds"`
	RewindMsgNum        int `json:"rewindmsgNum"`
	MinMsgTime          int `json:"minMsgTime"`
}

func NewGetQueueAttributesResp

func NewGetQueueAttributesResp() *GetQueueAttributesResp

type GetSubscriptionAttributesReq

type GetSubscriptionAttributesReq struct {
	*Request
	TopicName        string `name:"topicName"`
	SubscriptionName string `name:"subscriptionName"`
}

func NewGetSubscriptionAttributesReq

func NewGetSubscriptionAttributesReq(topicName, subscriptionName string) *GetSubscriptionAttributesReq

type GetSubscriptionAttributesResp

type GetSubscriptionAttributesResp struct {
	*Response
	TopicOwner          string `json:"topicOwner"`
	MsgCount            int    `json:"msgCount"`
	Protocol            string `json:"protocol"`
	Endpoint            string `json:"endpoint"`
	NotifyStrategy      string `json:"notifyStrategy"`
	NotifyContentFormat string `json:"notifyContentFormat"`
	CreateTime          int    `json:"createTime"`
	LastModifyTime      int    `json:"lastModifyTime"`
	BindingKey          string `json:"bindingKey"`
}

func NewGetSubscriptionAttributesResp

func NewGetSubscriptionAttributesResp() *GetSubscriptionAttributesResp

type GetTopicAttributesReq

type GetTopicAttributesReq struct {
	*Request
	TopicName string `name:"topicName"`
}

func NewGetTopicAttributesReq

func NewGetTopicAttributesReq(topicName string) *GetTopicAttributesReq

type GetTopicAttributesResp

type GetTopicAttributesResp struct {
	*Response
	MsgCount            int `json:"msgCount"`
	MaxMsgSize          int `json:"maxMsgSize"`
	MsgRetentionSeconds int `json:"msgRetentionSeconds"`
	CreateTime          int `json:"createTime"`
	LastModifyTime      int `json:"lastModifyTime"`
	FilterType          int `json:"filterType"`
}

func NewGetTopicAttributesResp

func NewGetTopicAttributesResp() *GetTopicAttributesResp

type IRequest

type IRequest interface {
	GetParams() map[string]string
	GetAction() string
	GetBodyReader() io.Reader
	GetType() string
	GetHttpMethod() string
}

type IResponse

type IResponse interface {
	GetCode() int
	GetMessage() string
	GetRequestId() string
}

type ListQueueReq

type ListQueueReq struct {
	*Request
	SearchWord string `name:"searchWord"`
	Offset     *int   `name:"offset"`
	Limit      *int   `name:"limit"`
}

func NewListQueueReq

func NewListQueueReq() *ListQueueReq

type ListQueueResp

type ListQueueResp struct {
	*Response
	TotalCount int      `json:"totalCount"`
	QueueList  []*Queue `json:"queueList"`
}

func NewListQueueResp

func NewListQueueResp() *ListQueueResp

type ListSubscriptionByTopicReq

type ListSubscriptionByTopicReq struct {
	*Request
	TopicName  string `name:"topicName"`
	SearchWord string `name:"searchWord"`
	Offset     *int   `name:"offset"`
	Limit      *int   `name:"limit"`
}

func NewListSubscriptionByTopicReq

func NewListSubscriptionByTopicReq(topicName string) *ListSubscriptionByTopicReq

type ListSubscriptionByTopicResp

type ListSubscriptionByTopicResp struct {
	*Response
	TotalCount       int          `json:"totalCount"`
	SubscriptionList []*TopicList `json:"subscriptionList"`
}

func NewListSubscriptionByTopicResp

func NewListSubscriptionByTopicResp() *ListSubscriptionByTopicResp

type ListTopicReq

type ListTopicReq struct {
	*Request
	SearchWord *string `name:"searchWord"`
	Offset     *int    `name:"offset"`
	Limit      *int    `name:"limit"`
}

func NewListTopicReq

func NewListTopicReq() *ListTopicReq

type ListTopicResp

type ListTopicResp struct {
	*Response
	TotalCount int      `json:"totalCount"`
	TopicList  []*Topic `json:"topicList"`
}

func NewListTopicResp

func NewListTopicResp() *ListTopicResp

type MsgInfo

type MsgInfo struct {
	MsgBody          string `json:"msgBody"`
	MsgId            string `json:"msgId"`
	ReceiptHandle    string `json:"receiptHandle"`
	EnqueueTime      int    `json:"enqueueTime"`
	FirstDequeueTime int    `json:"firstDequeueTime"`
	NextVisibleTime  int    `json:"nextVisibleTime"`
	DequeueCount     int    `json:"dequeueCount"`
}

type PublishMessageReq

type PublishMessageReq struct {
	*Request
	TopicName  string    `name:"topicName"`
	MsgBody    string    `name:"msgBody"`
	MsgTag     *[]string `name:"msgTag"`
	RoutingKey *string   `name:"routingKey"`
}

func NewPublishMessageReq

func NewPublishMessageReq(t, body string) *PublishMessageReq

type PublishMessageResp

type PublishMessageResp struct {
	*Response
}

func NewPublishMessageResp

func NewPublishMessageResp() *PublishMessageResp

type PublishMsgId

type PublishMsgId struct {
	MsgId string `json:"msgId"`
}

type Queue

type Queue struct {
	QueueId   string `json:"queueId"`
	QueueName string `json:"queueName"`
}

type QueueCreateReq

type QueueCreateReq struct {
	*Request
	QueueName           string            `name:"queueName"`
	MaxMsgHeapNum       *int              `name:"maxMsgHeapNum"`
	PollingWaitSeconds  *int              `name:"pollingWaitSeconds"`
	VisibilityTimeout   *int              `name:"visibilityTimeout"`
	MaxMsgSize          *int              `name:"maxMsgSize"`
	MsgRetentionSeconds *int              `name:"msgRetentionSeconds"`
	RewindSeconds       *int              `name:"rewindSeconds"`
	DeadLetterPolicy    *DeadLetterPolicy `name:"deadLetterPolicy"`
}

func NewCreateQueueRequest

func NewCreateQueueRequest(n string) *QueueCreateReq

type QueueCreateResp

type QueueCreateResp struct {
	*Response
	QueueId string `json:"queueId"`
}

func NewCreateQueueResp

func NewCreateQueueResp() *QueueCreateResp

type ReceiveMessageReq

type ReceiveMessageReq struct {
	*Request
	QueueName          string `name:"queueName"`
	PollingWaitSeconds *int   `name:"pollingWaitSeconds"`
}

func NewReceiveMessageReq

func NewReceiveMessageReq(n string) *ReceiveMessageReq

type ReceiveMessageResp

type ReceiveMessageResp struct {
	*Response
	MsgBody          string `json:"msgBody"`
	ReceiptHandle    string `json:"receiptHandle"`
	EnqueueTime      int    `json:"enqueueTime"`
	FirstDequeueTime int    `json:"firstDequeueTime"`
	NextVisibleTime  int    `json:"nextVisibleTime"`
	DequeueCount     int    `json:"dequeueCount"`
}

func NewReceiveMessageResp

func NewReceiveMessageResp() *ReceiveMessageResp

type Request

type Request struct {
	Action          string `name:"Action"`
	Region          string `name:"Region"`
	Timestamp       uint64 `name:"Timestamp"`
	Nonce           uint64 `name:"Nonce"`
	SecretId        string `name:"SecretId"`
	Signature       string `name:"Signature"`
	SignatureMethod string `name:"SignatureMethod"`
	Token           string `name:"Token"`
	// contains filtered or unexported fields
}

func InitReq

func InitReq(a string, t string) *Request

func (*Request) GetAction

func (r *Request) GetAction() string

func (*Request) GetBodyReader

func (r *Request) GetBodyReader() io.Reader

func (*Request) GetHttpMethod

func (r *Request) GetHttpMethod() string

func (*Request) GetParams

func (r *Request) GetParams() map[string]string

func (*Request) GetType

func (r *Request) GetType() string

type Response

type Response struct {
	Code      int    `json:"code"`
	Message   string `json:"message"`
	RequestId string `json:"requestId"`
	MsgId     string `json:"msgId"`
}

func (*Response) GetCode

func (r *Response) GetCode() int

func (*Response) GetMessage

func (r *Response) GetMessage() string

func (*Response) GetRequestId

func (r *Response) GetRequestId() string

type RewindQueueReq

type RewindQueueReq struct {
	*Request
	QueueName        string `name:"queueName"`
	StartConsumeTime int    `name:"startConsumeTime"` // Unix时间戳
}

func NewRewindQueueReq

func NewRewindQueueReq(queueName string, startConsumeTime int) *RewindQueueReq

type RewindQueueResp

type RewindQueueResp struct {
	*Response
}

func NewRewindQueueResp

func NewRewindQueueResp() *RewindQueueResp

type SendMessageReq

type SendMessageReq struct {
	*Request
	QueueName    string `name:"queueName"`
	MsgBody      string `name:"msgBody"`
	DelaySeconds *int   `name:"delaySeconds"`
}

func NewSendMessageReq

func NewSendMessageReq(queueName, body string) *SendMessageReq

type SendMessageResp

type SendMessageResp struct {
	*Response
}

func NewSendMessageResp

func NewSendMessageResp() *SendMessageResp

type SendMsgId

type SendMsgId struct {
	MsgId string `json:"msgId"`
}

func (*SendMsgId) String

func (sm *SendMsgId) String() string

type SetQueueAttributesReq

type SetQueueAttributesReq struct {
	*Request
	QueueName           string `name:"queueName"`
	MaxMsgHeapNum       *int   `name:"maxMsgHeapNum"`
	PollingWaitSeconds  *int   `name:"pollingWaitSeconds"`
	VisibilityTimeout   *int   `name:"visibilityTimeout"`
	MaxMsgSize          *int   `name:"maxMsgSize"`
	MsgRetentionSeconds *int   `name:"msgRetentionSeconds"`
	RewindSeconds       *int   `name:"rewindSeconds"`
}

func NewSetQueueAttributesReq

func NewSetQueueAttributesReq(queueName string) *SetQueueAttributesReq

type SetQueueAttributesResp

type SetQueueAttributesResp struct {
	*Response
	MaxMsgHeapNum       int `json:"maxMsgHeapNum"`
	PollingWaitSeconds  int `json:"pollingWaitSeconds"`
	VisibilityTimeout   int `json:"visibilityTimeout"`
	MaxMsgSize          int `json:"maxMsgSize"`
	MsgRetentionSeconds int `json:"msgRetentionSeconds"`
	RewindSeconds       int `json:"rewindSeconds"`
}

func NewSetQueueAttributesResp

func NewSetQueueAttributesResp() *SetQueueAttributesResp

type SetSubscriptionAttributesReq

type SetSubscriptionAttributesReq struct {
	*Request
	TopicName           string    `name:"topicName"`
	SubscriptionName    string    `name:"subscriptionName"`
	NotifyStrategy      *string   `name:"notifyStrategy"`
	NotifyContentFormat *string   `name:"notifyContentFormat"`
	FilterTag           *[]string `name:"filterTag"`
	BindingKey          []string  `name:"bindingKey"`
}

func NewSetSubscriptionAttributesReq

func NewSetSubscriptionAttributesReq(topicName, subscriptionName string) *SetSubscriptionAttributesReq

type SetSubscriptionAttributesResp

type SetSubscriptionAttributesResp struct {
	*Response
}

func NewSetSubscriptionAttributesResp

func NewSetSubscriptionAttributesResp() *SetSubscriptionAttributesResp

type SetTopicAttributesReq

type SetTopicAttributesReq struct {
	*Request
	TopicName  string `name:"topicName"`
	MaxMsgSize *int   `name:"maxMsgSize"`
}

func NewSetTopicAttributesReq

func NewSetTopicAttributesReq(topicName string) *SetTopicAttributesReq

type SetTopicAttributesResp

type SetTopicAttributesResp struct {
	*Response
}

func NewSetTopicAttributesResp

func NewSetTopicAttributesResp() *SetTopicAttributesResp

type SubscribeReq

type SubscribeReq struct {
	*Request
	TopicName           string    `name:"topicName"`
	SubscriptionName    string    `name:"subscriptionName"`
	Protocol            string    `name:"protocol"`
	Endpoint            string    `name:"endpoint"`
	NotifyStrategy      *string   `name:"notifyStrategy"`
	NotifyContentFormat *string   `name:"notifyContentFormat"`
	FilterTag           *[]string `name:"filterTag"`
	BindingKey          []string  `name:"bindingKey"`
}

func NewSubscribeRep

func NewSubscribeRep(q, sname, protocol, endpoint string) *SubscribeReq

type SubscribeResp

type SubscribeResp struct {
	*Response
}

func NewSubscribeResp

func NewSubscribeResp() *SubscribeResp

type Topic

type Topic struct {
	TopicId   string `json:"topicId"`
	TopicName string `json:"topicName"`
}

type TopicList

type TopicList struct {
	SubscriptionId   string `json:"subscriptionId"`
	SubscriptionName string `json:"subscriptionName"`
	Protocol         string `json:"protocol"`
	Endpoint         string `json:"endpoint"`
}

type UnsubscribeReq

type UnsubscribeReq struct {
	*Request
	TopicName        string `name:"topicName"`
	SubscriptionName string `name:"subscriptionName"`
}

func NewUnsubscribeReq

func NewUnsubscribeReq(topicName, subscriptionName string) *UnsubscribeReq

type UnsubscribeResp

type UnsubscribeResp struct {
	*Response
}

func NewUnsubscribeResp

func NewUnsubscribeResp() *UnsubscribeResp

Jump to

Keyboard shortcuts

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