aws-go-sqs: github.com/nabeken/aws-go-sqs/queue/option Index | Files

package option

import "github.com/nabeken/aws-go-sqs/queue/option"

Package option provides adapters to change a parameter in SQS request.

Index

Package Files

option.go

Constants

const (
    DataTypeString = "String"
    DataTypeNumber = "Number"
    DataTypeBinary = "Binary"
)

The DataType is a type of data used in Attributes and Message Attributes.

func MessageAttributeValue Uses

func MessageAttributeValue(v interface{}) *sqs.MessageAttributeValue

MessageAttributeValue returns a appropriate sqs.MessageAttributeValue by type assersion of v. Types except string, []byte, int64 and int cause panicking.

type ReceiveMessageInput Uses

type ReceiveMessageInput func(req *sqs.ReceiveMessageInput)

The ReceiveMessageInput type is an adapter to change a parameter in sqs.ReceiveMessageInput.

func MaxNumberOfMessages Uses

func MaxNumberOfMessages(n int64) ReceiveMessageInput

MaxNumberOfMessages returns a ReceiveMessageInput that changes a max number of messages to receive to n.

func UseAllAttribute Uses

func UseAllAttribute() ReceiveMessageInput

UseAllAttribute returns a ReceiveMessageInput that changes a parameter to receive all messages regardless of attributes.

func UseAttributes Uses

func UseAttributes(attr ...string) ReceiveMessageInput

UseAttributes returns a ReceiveMessageInput that changes AttributeNames and MessageAttributeNames to attr.

func VisibilityTimeout Uses

func VisibilityTimeout(timeout int64) ReceiveMessageInput

VisibilityTimeout returns a ReceiveMessageInput that changes a message visibility timeout.

type SendMessageInput Uses

type SendMessageInput func(req *sqs.SendMessageInput)

The SendMessageInput type is an adapter to change a parameter in sqs.SendMessageInput.

func DelaySeconds Uses

func DelaySeconds(delay int64) SendMessageInput

DelaySeconds returns a SendMessageInput that changes DelaySeconds to delay in seconds.

func MessageAttributes Uses

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.

Package option imports 3 packages (graph) and is imported by 2 packages. Updated 2016-07-22. Refresh now. Tools for package owners.