Versions in this module Expand all Collapse all v4 v4.1.2 Aug 3, 2021 Changes in this version + const DefaultDSN + func TestStore(ctx context.Context, t testing.TB) (*sqlx.DB, *Store, *KeyStore, func()) + type KeyStore struct + func NewKeyStore(pool *pgxpool.Pool) *KeyStore + func (k *KeyStore) BumpExpiration(ctx context.Context, ID uuid.UUID, n time.Duration) error + func (k *KeyStore) DeleteKey(ctx context.Context, ID uuid.UUID) error + func (k *KeyStore) GC(ctx context.Context) (int64, error) + func (k *KeyStore) KeyByID(ctx context.Context, ID uuid.UUID) (notifier.Key, error) + func (k *KeyStore) Keys(ctx context.Context) ([]notifier.Key, error) + func (k *KeyStore) PutKey(ctx context.Context, ID uuid.UUID, key *rsa.PublicKey, n time.Duration) error + type Store struct + func NewStore(pool *pgxpool.Pool) *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