notification

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTopic added in v1.0.6

func CreateTopic(n *sns.SNS, topicName string, timeoutDuration ...time.Duration) (topicArn string, err error)

CreateTopic will create a new sns notification's topic

func ListTopics added in v1.0.6

func ListTopics(n *sns.SNS, timeoutDuration ...time.Duration) (topicArnsList []string, err error)

ListTopics will return list of all topic arns for the given sns object

func NewNotificationAdapter

func NewNotificationAdapter(awsRegion awsregion.AWSRegion, httpOptions *awshttp2.HttpClientSettings) (*sns.SNS, error)

NewNotificationAdapter creates a new sns service provider, and auto connect for use

func Publish added in v1.0.6

func Publish(n *sns.SNS, topicArn string, message string, attributes map[string]*snsaws.MessageAttributeValue, timeoutDuration ...time.Duration) (messageId string, err error)

Publish will publish a message to sns notification system for subscribers to consume

func Subscribe added in v1.0.6

func Subscribe(n *sns.SNS, topicArn string, protocol snsprotocol.SNSProtocol, endPoint string, timeoutDuration ...time.Duration) (subscriptionArn string, err error)

Subscribe will subscribe client to a sns notification's topic arn

func Unsubscribe added in v1.0.6

func Unsubscribe(n *sns.SNS, subscriptionArn string, timeoutDuration ...time.Duration) error

Unsubscribe will unsubscribe a subscription from sns notification system

Types

This section is empty.

Jump to

Keyboard shortcuts

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