db

package
v0.0.0-...-4d8b1e1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrItemNotFound = errors.New("item not found")
)

Functions

This section is empty.

Types

type NotificationsDynamoDB

type NotificationsDynamoDB struct {
	TableName string
	Client    dynamodbiface.DynamoDBAPI
}

NotificationsDynamoDB is an implementation of Store interface that is capable of working with AWS DynamoDB

func NewNotificationsStore

func NewNotificationsStore(table string, sess *session.Session) *NotificationsDynamoDB

NewNotificationsStore returns new instance of NotificationsDynamoDB

func (*NotificationsDynamoDB) AddBounce

func (s *NotificationsDynamoDB) AddBounce(email, from string, isTransient bool) error

func (*NotificationsDynamoDB) AddComplaint

func (s *NotificationsDynamoDB) AddComplaint(email, from string) error

func (*NotificationsDynamoDB) Notifications

func (s *NotificationsDynamoDB) Notifications() (notifications []*common.SesNotification, err error)

type NotificationsMapStore

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

func NewNotificationsMapStore

func NewNotificationsMapStore() *NotificationsMapStore

func (*NotificationsMapStore) AddBounce

func (s *NotificationsMapStore) AddBounce(email, from string, isTransient bool) error

func (*NotificationsMapStore) AddComplaint

func (s *NotificationsMapStore) AddComplaint(email, from string) error

func (*NotificationsMapStore) Notifications

func (s *NotificationsMapStore) Notifications() (notifications []*common.SesNotification, err error)

type SubscribersDynamoDB

type SubscribersDynamoDB struct {
	TableName string
	Client    dynamodbiface.DynamoDBAPI
}

func NewSubscribersStore

func NewSubscribersStore(table string, sess *session.Session) *SubscribersDynamoDB

NewSubscribersStore creates an instance of SubscribersDynamoDB struct

func (*SubscribersDynamoDB) AddSubscriber

func (s *SubscribersDynamoDB) AddSubscriber(sr *common.Subscriber) error

func (*SubscribersDynamoDB) AddSubscribers

func (s *SubscribersDynamoDB) AddSubscribers(subscribers []*common.Subscriber) error

func (*SubscribersDynamoDB) AddSubscribersChunk

func (s *SubscribersDynamoDB) AddSubscribersChunk(subscribers []*common.Subscriber) error

func (*SubscribersDynamoDB) ConfirmSubscriber

func (s *SubscribersDynamoDB) ConfirmSubscriber(newsletter, email string) error

func (*SubscribersDynamoDB) DeleteSubscribers

func (s *SubscribersDynamoDB) DeleteSubscribers(keys []*common.SubscriberKey) error

func (*SubscribersDynamoDB) DeleteSubscribersChunk

func (s *SubscribersDynamoDB) DeleteSubscribersChunk(keys []*common.SubscriberKey) error

func (*SubscribersDynamoDB) GetSubscriber

func (s *SubscribersDynamoDB) GetSubscriber(newsletter, email string) (*common.Subscriber, error)

func (*SubscribersDynamoDB) RemoveSubscriber

func (s *SubscribersDynamoDB) RemoveSubscriber(newsletter, email string) error

func (*SubscribersDynamoDB) Subscribers

func (s *SubscribersDynamoDB) Subscribers(newsletter string) (subscribers []*common.Subscriber, err error)

type SubscribersMapStore

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

func NewSubscribersMapStore

func NewSubscribersMapStore() *SubscribersMapStore

func (*SubscribersMapStore) AddSubscriber

func (s *SubscribersMapStore) AddSubscriber(sr *common.Subscriber) error

func (*SubscribersMapStore) AddSubscribers

func (s *SubscribersMapStore) AddSubscribers(subscribers []*common.Subscriber) error

func (*SubscribersMapStore) ConfirmSubscriber

func (s *SubscribersMapStore) ConfirmSubscriber(newsletter, email string) error

func (*SubscribersMapStore) Count

func (s *SubscribersMapStore) Count() int

func (*SubscribersMapStore) DeleteSubscribers

func (s *SubscribersMapStore) DeleteSubscribers(keys []*common.SubscriberKey) error

func (*SubscribersMapStore) GetSubscriber

func (s *SubscribersMapStore) GetSubscriber(newsletter, email string) (*common.Subscriber, error)

func (*SubscribersMapStore) RemoveSubscriber

func (s *SubscribersMapStore) RemoveSubscriber(newsletter, email string) error

func (*SubscribersMapStore) Subscribers

func (s *SubscribersMapStore) Subscribers(newsletter string) (subscribers []*common.Subscriber, err error)

Jump to

Keyboard shortcuts

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