sns

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: 8 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (

	// ErrEmptyParameter is used when a required parameter is empty
	ErrEmptyParameter = "EmptyParameter"

	// ErrNoPointerParameter is used when a parameter is expected to be a pointer but it wasn't
	ErrNoPointerParameter = "NoPointerParameter"

	// ErrPointerParameterNotAllowed is used when a parameter is expected to be not a pointer but it wasn't
	ErrPointerParameterNotAllowed = "PointerParameterNotAllowed"
)
View Source
const (

	// MessageStructure represents the default MessageStructure for SNS
	MessageStructure = "json"
	// Endpoint represents the parameter named endpoint
	Endpoint = "endpoint"
	// Input represents the parameter named input
	Input = "input"
	// Message represents the parameter named message
	Message = "message"
)

Variables

This section is empty.

Functions

func NewPublishInput

func NewPublishInput(input interface{}, endpoint string) (*sns.PublishInput, error)

NewPublishInput returns a new *PublishInput given a body and an endpoint

func UnmarshalMessage added in v1.0.1

func UnmarshalMessage(message string, input interface{}) error

UnmarshalMessage unmarshal an SNS Message to a given interface

Types

type Body

type Body struct {
	Default string `json:"default"`
}

Body is used to initialize a valid SNS message

type SNS

type SNS struct {
	*sns.SNS
}

SNS embeds sns.SNS to be used to call New

func New

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

New returns a new *SNS embedding *sns.SNS

func (*SNS) SnsPublish

func (svc *SNS) SnsPublish(input interface{}, targetArn string) (err error)

SnsPublish publishes an input on a given SNS targetArn

Jump to

Keyboard shortcuts

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