sqs

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetQueuePrefix

func GetQueuePrefix() string

Get the prefix for DynamoDB table

func Long

func Long(v int) *int64

func String

func String(v string) *string

Types

type AmazonSQS

type AmazonSQS struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *AmazonSQS

Create new AmazonSQS struct

func (*AmazonSQS) CreateQueue

func (svc *AmazonSQS) CreateQueue(in *SDK.CreateQueueInput) error

Create new SQS Queue

func (*AmazonSQS) CreateQueueWithName

func (svc *AmazonSQS) CreateQueueWithName(name string) error

CreateQueueWithName creates new SQS Queue by the name

func (*AmazonSQS) GetQueue

func (svc *AmazonSQS) GetQueue(queue string) (*Queue, error)

Get a queue

func (*AmazonSQS) IsExistQueue added in v0.9.2

func (svc *AmazonSQS) IsExistQueue(name string) (bool, error)

Create new SQS Queue

type Message added in v0.9.2

type Message struct {
	// contains filtered or unexported fields
}

SQS Message wrapper struct

func NewMessage added in v0.9.2

func NewMessage(msg *SDK.Message) *Message

func (Message) Body added in v0.9.2

func (m Message) Body() string

func (Message) GetMessageID added in v0.9.2

func (m Message) GetMessageID() *string

func (Message) GetReceiptHandle added in v0.9.2

func (m Message) GetReceiptHandle() *string

func (Message) String added in v0.9.2

func (m Message) String() string

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

SQS Queue wrapper struct

func NewQueue

func NewQueue(name string, url *string, cli *SDK.SQS) *Queue

func (*Queue) AddDeleteList

func (q *Queue) AddDeleteList(msg interface{})

Add a message to the delete spool

func (*Queue) AddMessage

func (q *Queue) AddMessage(message string)

Add message to the send spool

func (*Queue) AddMessageMap

func (q *Queue) AddMessageMap(message map[string]interface{}) error

Add message spool from map data

func (*Queue) AutoDelete

func (q *Queue) AutoDelete(b bool)

Set auto delete flag to this queue

func (*Queue) CountMessage

func (q *Queue) CountMessage() (int, int, error)

Count left messages on the Queue

func (*Queue) DeleteListItems

func (q *Queue) DeleteListItems() error

Execute delete operation in the delete spool

func (*Queue) DeleteMessage

func (q *Queue) DeleteMessage(msg *Message) error

Delete a message from server

func (*Queue) Fetch

func (q *Queue) Fetch(num int) ([]*Message, error)

Get message from the queue with limit

func (*Queue) FetchBody

func (q *Queue) FetchBody(num int) []string

Get only the body of messages ** cannot handle deletion manually as lack of MessageId and ReceiptHandle **

func (*Queue) FetchBodyOne

func (q *Queue) FetchBodyOne() string

Get the body of a single message ** cannot handle deletion manually as lack of MessageId and ReceiptHandle **

func (*Queue) FetchOne

func (q *Queue) FetchOne() (*Message, error)

Get a single message

func (*Queue) Purge

func (q *Queue) Purge() error

Delete all messages on the Queue

func (*Queue) Send

func (q *Queue) Send() error

Send messages in the send spool

func (*Queue) SetExpire

func (q *Queue) SetExpire(sec int)

Set visibility timeout for message

type SQSError added in v0.9.2

type SQSError struct {
	// contains filtered or unexported fields
}

func NewError added in v0.9.2

func NewError(msg string) *SQSError

func NewErrorList added in v0.9.2

func NewErrorList(msgList []string) *SQSError

func (*SQSError) AddMessage added in v0.9.2

func (e *SQSError) AddMessage(msg string)

func (SQSError) Error added in v0.9.2

func (e SQSError) Error() string

func (*SQSError) HasError added in v0.9.2

func (e *SQSError) HasError() bool

Jump to

Keyboard shortcuts

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