sns

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package sns provides an in-memory mock implementation of AWS Simple Notification Service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

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

Mock is an in-memory mock implementation of the AWS SNS service.

func New

func New(opts *config.Options) *Mock

New creates a new SNS mock with the given configuration options.

func (*Mock) CreateTopic

func (m *Mock) CreateTopic(_ context.Context, cfg driver.TopicConfig) (*driver.TopicInfo, error)

CreateTopic creates a new SNS topic.

func (*Mock) DeleteTopic

func (m *Mock) DeleteTopic(_ context.Context, id string) error

DeleteTopic deletes an SNS topic by name.

func (*Mock) GetTopic

func (m *Mock) GetTopic(_ context.Context, id string) (*driver.TopicInfo, error)

GetTopic retrieves information about an SNS topic.

func (*Mock) ListSubscriptions

func (m *Mock) ListSubscriptions(_ context.Context, topicID string) ([]driver.SubscriptionInfo, error)

ListSubscriptions lists all subscriptions for an SNS topic.

func (*Mock) ListTopics

func (m *Mock) ListTopics(_ context.Context) ([]driver.TopicInfo, error)

ListTopics lists all SNS topics.

func (*Mock) Publish

func (m *Mock) Publish(_ context.Context, input driver.PublishInput) (*driver.PublishOutput, error)

Publish publishes a message to an SNS topic.

func (*Mock) SetMonitoring

func (m *Mock) SetMonitoring(mon mondriver.Monitoring)

SetMonitoring sets the monitoring backend for auto-metric generation.

func (*Mock) Subscribe

Subscribe creates a subscription to an SNS topic.

func (*Mock) Unsubscribe

func (m *Mock) Unsubscribe(_ context.Context, subscriptionID string) error

Unsubscribe removes a subscription from an SNS topic.

Jump to

Keyboard shortcuts

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