Documentation
¶
Index ¶
- type Config
- type DBSub
- type Option
- type Store
- func (s *Store) Clear(ctx context.Context) error
- func (s *Store) Close(ctx context.Context) error
- func (s *Store) DBName() string
- func (s *Store) IncrementSubscriptionSequenceNumber(ctx context.Context, subscriptionID string) (uint64, error)
- func (s *Store) LoadSubscriptions(ctx context.Context, query store.SubscriptionQuery, ...) error
- func (s *Store) PopSubscription(ctx context.Context, subscriptionID string) (sub store.Subscription, err error)
- func (s *Store) SaveSubscription(ctx context.Context, sub store.Subscription) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBSub ¶
type DBSub struct { ID string `bson:"_id"` URL string CorrelationID string // uuid Type store.Type Accept []string EventTypes events.EventTypes DeviceID string `bson:"deviceid"` Href string `bson:"href"` SequenceNumber uint64 `bson:"sequencenumber"` UserID string `bson:"userid"` SigningSecret string }
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements an Store for MongoDB.
func NewStoreWithSession ¶
func NewStoreWithSession(ctx context.Context, client *mongo.Client, dbPrefix string) (*Store, error)
NewStoreWithSession creates a new Store with a session.
func (*Store) IncrementSubscriptionSequenceNumber ¶
func (*Store) LoadSubscriptions ¶
func (s *Store) LoadSubscriptions(ctx context.Context, query store.SubscriptionQuery, h store.SubscriptionHandler) error
func (*Store) PopSubscription ¶
func (*Store) SaveSubscription ¶
Click to show internal directories.
Click to hide internal directories.