awsutil

package
v1.0.59 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDynamoTables

func CreateDynamoTables(db *dynamo.DB, tables []DynamoTableDefinition) (err error)

func NewDynamoDBClient

func NewDynamoDBClient(session *Session) *dynamo.DB

Types

type DynamoProvisionedCapacity

type DynamoProvisionedCapacity struct {
	ReadUnits  int64
	WriteUnits int64
}

type DynamoTableDefinition

type DynamoTableDefinition struct {
	Name                    string
	From                    interface{}
	ProvisionedCapacityMode bool
	ProvisionedCapacity     *DynamoProvisionedCapacity
}

type S3Client

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

func NewS3Client

func NewS3Client(session *Session) *S3Client

func (*S3Client) Download

func (client *S3Client) Download(bucket, key string, writer io.WriterAt) error

func (*S3Client) Upload

func (client *S3Client) Upload(bucket, key string, reader io.Reader) error

type SNSTopicDefinition

type SNSTopicDefinition struct {
	Name              string
	QueueSubscription string
}

type SQSClient

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

func NewSQSClient

func NewSQSClient(session *Session) *SQSClient

func (*SQSClient) Close

func (client *SQSClient) Close()

func (*SQSClient) CreateQueues

func (client *SQSClient) CreateQueues(queues []SQSQueueDefinition) (err error)

func (*SQSClient) CreateTopics

func (client *SQSClient) CreateTopics(topics []SNSTopicDefinition) (err error)

func (*SQSClient) PublishToQueue

func (client *SQSClient) PublishToQueue(queueName, payload string) error

func (*SQSClient) PublishToQueueJSON

func (client *SQSClient) PublishToQueueJSON(queueName string, value interface{}) error

func (*SQSClient) PublishToTopic

func (client *SQSClient) PublishToTopic(topicName, payload string) error

func (*SQSClient) PublishToTopicJSON

func (client *SQSClient) PublishToTopicJSON(topicName string, value interface{}) error

func (*SQSClient) Subscribe

func (client *SQSClient) Subscribe(queueName string, opts ...SQSSubscribeOpt) <-chan *SQSMessage

type SQSMessage

type SQSMessage struct {
	Message *sqs.Message
	Body    string
}

type SQSQueueDefinition

type SQSQueueDefinition struct {
	Name      string
	Ephemeral bool
}

type SQSSubscribeConfig

type SQSSubscribeConfig struct {
	VisibilityTimeout   int64
	MaxNumberOfMessages int64
}

type SQSSubscribeOpt

type SQSSubscribeOpt = func(*SQSSubscribeConfig)

func MaxNumberOfMessages

func MaxNumberOfMessages(message int64) SQSSubscribeOpt

func VisibilityTimeout

func VisibilityTimeout(timeout int64) SQSSubscribeOpt

type Session

type Session struct {
	*session.Session
	// contains filtered or unexported fields
}

func NewSession

func NewSession() *Session

Jump to

Keyboard shortcuts

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