Documentation ¶
Index ¶
- func New(ctx context.Context, opts Opts) (*service, error)
- type Mock
- func (m *Mock) DeleteNotifications(ctx context.Context, id uuid.UUID) error
- func (m *Mock) KeyManager(ctx context.Context) *keymanager.Manager
- func (m *Mock) KeyStore(ctx context.Context) notifier.KeyStore
- func (m *Mock) Notifications(ctx context.Context, id uuid.UUID, page *notifier.Page) ([]notifier.Notification, notifier.Page, error)
- type Opts
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mock ¶
type Mock struct { Notifications_ func(ctx context.Context, id uuid.UUID, page *notifier.Page) ([]notifier.Notification, notifier.Page, error) DeleteNotifications_ func(ctx context.Context, id uuid.UUID) error KeyStore_ func(ctx context.Context) notifier.KeyStore KeyManager_ func(ctx context.Context) *keymanager.Manager }
Mock implements a mock notifier service
func (*Mock) DeleteNotifications ¶
func (*Mock) KeyManager ¶
func (m *Mock) KeyManager(ctx context.Context) *keymanager.Manager
type Opts ¶
type Opts struct { PollInterval time.Duration DeliveryInterval time.Duration Migrations bool ConnString string Matcher matcher.Service Indexer indexer.Service Webhook *webhook.Config AMQP *namqp.Config STOMP *stomp.Config }
Opts configures the notifier service
type Service ¶
type Service interface { // Retrieves an optional paginated set of notifications given an notification id Notifications(ctx context.Context, id uuid.UUID, page *notifier.Page) ([]notifier.Notification, notifier.Page, error) // Deletes the provided notification id DeleteNotifications(ctx context.Context, id uuid.UUID) error // KeyStore returns the notifier's KeyStore. KeyStore(ctx context.Context) notifier.KeyStore // KeyManager returns the notifier's KeyManager. KeyManager(ctx context.Context) *keymanager.Manager }
Service is an interface wrapping ClairV4's notifier functionality.
This remains an interface so remote clients may implement as well.
Click to show internal directories.
Click to hide internal directories.