sns

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg iaws.Config) *sns.SNS

New returns a configured SNS client.

Types

type API

type API struct {
	Client snsiface.SNSAPI
}

API wraps an SNS client interface.

func (*API) IsEnabled

func (a *API) IsEnabled() bool

IsEnabled checks whether a new client has been set.

func (*API) Publish

func (a *API) Publish(ctx aws.Context, arn string, data []byte) (*sns.PublishOutput, error)

Publish is a convenience wrapper for publishing a message to an SNS topic.

func (*API) PublishBatch

func (a *API) PublishBatch(ctx aws.Context, topic string, data [][]byte) (*sns.PublishBatchOutput, error)

PublishBatch is a convenience wrapper for publishing a batch of messages to an SNS topic.

func (*API) Setup

func (a *API) Setup(cfg iaws.Config)

Setup creates an SNS client.

Jump to

Keyboard shortcuts

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