Versions in this module Expand all Collapse all v0 v0.16.0 Dec 11, 2024 Changes in this version + var ErrMessage = errors.New("failed to convert to SuperMQ message") + var ErrNotify = errors.New("error sending notification") + type Notifier interface + Notify func(from string, to []string, msg *messaging.Message) error + type Page struct + Subscriptions []Subscription + Total uint + type PageMetadata struct + Contact string + Limit int + Offset uint + Topic string + type Service interface + CreateSubscription func(ctx context.Context, token string, sub Subscription) (string, error) + ListSubscriptions func(ctx context.Context, token string, pm PageMetadata) (Page, error) + RemoveSubscription func(ctx context.Context, token, id string) error + ViewSubscription func(ctx context.Context, token, id string) (Subscription, error) + func New(authn smqauthn.Authentication, subs SubscriptionsRepository, ...) Service + type Subscription struct + Contact string + ID string + OwnerID string + Topic string + type SubscriptionsRepository interface + Remove func(ctx context.Context, id string) error + Retrieve func(ctx context.Context, id string) (Subscription, error) + RetrieveAll func(ctx context.Context, pm PageMetadata) (Page, error) + Save func(ctx context.Context, sub Subscription) (string, error)