Documentation ¶
Index ¶
- type Store
- func (s *Store) Created(ctx context.Context) ([]uuid.UUID, error)
- func (s *Store) DeleteNotifications(ctx context.Context, id uuid.UUID) error
- func (s *Store) Deleted(ctx context.Context) ([]uuid.UUID, error)
- func (s *Store) Failed(ctx context.Context) ([]uuid.UUID, error)
- func (s *Store) Notifications(ctx context.Context, id uuid.UUID, page *notifier.Page) ([]notifier.Notification, notifier.Page, error)
- func (s *Store) PutNotifications(ctx context.Context, opts notifier.PutOpts) error
- func (s *Store) PutReceipt(ctx context.Context, updater string, r notifier.Receipt) error
- func (s *Store) Receipt(ctx context.Context, id uuid.UUID) (notifier.Receipt, error)
- func (s *Store) ReceiptByUOID(ctx context.Context, id uuid.UUID) (notifier.Receipt, error)
- func (s *Store) SetDeleted(ctx context.Context, id uuid.UUID) error
- func (s *Store) SetDelivered(ctx context.Context, id uuid.UUID) error
- func (s *Store) SetDeliveryFailed(ctx context.Context, id uuid.UUID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements the notifier.Store interface
func (*Store) DeleteNotifications ¶
DeleteNotifications garbage collects all notifications associated with a notification id.
Normally Receipter.SetDeleted will be issues first, however application logic may decide to gc notifications which have not been set deleted after some period of time, thus this condition should not be checked.
func (*Store) Notifications ¶
func (s *Store) Notifications(ctx context.Context, id uuid.UUID, page *notifier.Page) ([]notifier.Notification, notifier.Page, error)
Notifications retrieves the list of notifications associated with a notification id
func (*Store) PutNotifications ¶
PutNotifications persists the provided notifications and associates them with the provided notification id
PutNotifications must update the latest update operation for the provided updater in such a way that UpdateOperation returns the the provided update operation id when queried with the updater name
PutNotifications must create a Receipt with status created status on successful persistence of notifications in such a way that Receipter.Created() returns the persisted notification id.
func (*Store) PutReceipt ¶
func (*Store) ReceiptByUOID ¶
ReceiptByUOID returns the Receipt for a given notification UOID
func (*Store) SetDeleted ¶
SetDeleted marks the provided notification id as deleted
func (*Store) SetDelivered ¶
SetDelivered marks the provided notification id as delivered