Documentation
¶
Overview ¶
Package option provides adapters to change a parameter in SQS request.
Index ¶
Constants ¶
const ( DataTypeString = "String" DataTypeNumber = "Number" DataTypeBinary = "Binary" )
The DataType is a type of data used in Attributes and Message Attributes.
Variables ¶
This section is empty.
Functions ¶
func MessageAttributeValue ¶
func MessageAttributeValue(v interface{}) types.MessageAttributeValue
MessageAttributeValue returns a appropriate sqs.MessageAttributeValue by type assersion of v. Types except string, []byte, int64 and int cause panicking.
Types ¶
type ReceiveMessageInput ¶
type ReceiveMessageInput func(req *sqs.ReceiveMessageInput)
The ReceiveMessageInput type is an adapter to change a parameter in sqs.ReceiveMessageInput.
func MaxNumberOfMessages ¶
func MaxNumberOfMessages(n int32) ReceiveMessageInput
MaxNumberOfMessages returns a ReceiveMessageInput that changes a max number of messages to receive to n.
func UseAllAttribute ¶
func UseAllAttribute() ReceiveMessageInput
UseAllAttribute returns a ReceiveMessageInput that changes a parameter to receive all messages regardless of attributes.
func UseAttributes ¶
func UseAttributes(attr ...string) ReceiveMessageInput
UseAttributes returns a ReceiveMessageInput that changes AttributeNames and MessageAttributeNames to attr.
func VisibilityTimeout ¶
func VisibilityTimeout(timeout int32) ReceiveMessageInput
VisibilityTimeout returns a ReceiveMessageInput that changes a message visibility timeout.
func WaitTimeSeconds ¶
func WaitTimeSeconds(n int32) ReceiveMessageInput
WaitTimeSeconds returns a ReceiveMessageInput that changes WaitTimeSeconds parameter.
type SendMessageInput ¶
type SendMessageInput func(req *sqs.SendMessageInput)
The SendMessageInput type is an adapter to change a parameter in sqs.SendMessageInput.
func DelaySeconds ¶
func DelaySeconds(delay int32) SendMessageInput
DelaySeconds returns a SendMessageInput that changes DelaySeconds to delay in seconds.
func MessageAttributes ¶
func MessageAttributes(attrs map[string]interface{}) SendMessageInput
MessageAttributes returns a SendMessageInput that changes MessageAttributes to attrs. A string value in attrs sets to DataTypeString. A []byte value in attrs sets to DataTypeBinary. A int and int64 value in attrs sets to DataTypeNumber. Other types cause panicking.