sqs

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package sqs handles interactions with aws-sdk-go/service/sqs

Index

Constants

View Source
const (

	// ErrNoPointerParameterAllowed is used when a ptr parameter is not allowed
	ErrNoPointerParameterAllowed = "NoPointerParameterAllowed"

	// ErrEmptyParameter is used when a required parameter is empty
	ErrEmptyParameter = "EmptyParameter"
)
View Source
const (

	// QueueName represents a parameter named queueName
	QueueName = "queueName"
	// QueueUrl represents a parameter named queueUrl
	QueueUrl = "queueUrl"
	// Input represents a parameter named input
	Input = "input"
)

Variables

This section is empty.

Functions

func NewCreateQueueInput

func NewCreateQueueInput(queueName string) (*sqs.CreateQueueInput, error)

NewCreateQueueInput creates a new queue given its name

func NewGetQueueAttributesInput

func NewGetQueueAttributesInput(queueUrl string) (*sqs.GetQueueAttributesInput, error)

NewGetQueueAttributesInput returns a new *sqs.GetQueueAttributesInput given a queueUrl

func NewGetQueueUrlInput added in v1.0.1

func NewGetQueueUrlInput(queueName string) (*sqs.GetQueueUrlInput, error)

NewGetQueueUrlInput returns a new *sqs.GetQueueUrlInput given a queue name

func NewSendMessageInput

func NewSendMessageInput(input interface{}, queueUrl string, base64Encode bool) (*sqs.SendMessageInput, error)

NewSendMessageInput returns a new *sqs.SendMessageInput initialized with queueUrl and messageBody. If base64Encode = true then the messageBody will be encoded in base64

Types

type GetQueueUrlInput added in v1.0.1

type GetQueueUrlInput struct {
	*sqs.GetQueueUrlInput
}

GetQueueUrlInput embeds *sqs.GetQueueUrlInput

type SQS

type SQS struct {
	*sqs.SQS
}

SQS embeds *sns.SNS

func New

func New(svc *pkgAws.Session, endpoint string) (*SQS, error)

New returns a new *SQS

func (*SQS) SQSCreateQueue

func (svc *SQS) SQSCreateQueue(queue string) error

SQSCreateQueue creates an sns queue given a queue name

func (*SQS) SQSGetQueueAttributes

func (svc *SQS) SQSGetQueueAttributes(queueUrl string) (*sqs.GetQueueAttributesOutput, error)

SQSGetQueueAttributes returns error if queue does not exist, get queue attributes otherwise

func (*SQS) SQSGetQueueUrl added in v1.0.1

func (svc *SQS) SQSGetQueueUrl(queueUrl string) (string, error)

SQSGetQueueUrl gets a queue's url given its name

func (*SQS) SQSSendMessage

func (svc *SQS) SQSSendMessage(input interface{}, queueName string, base64Encode bool) error

SQSSendMessage sends a message on SQS

Jump to

Keyboard shortcuts

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