option

package
v0.0.0-...-d4c1772 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2018 License: MIT Imports: 3 Imported by: 4

Documentation

Overview

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

Index

Constants

View Source
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{}) *sqs.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 int64) 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 int64) ReceiveMessageInput

VisibilityTimeout returns a ReceiveMessageInput that changes a message visibility timeout.

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 int64) 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.

Jump to

Keyboard shortcuts

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