mongodb

package
v2.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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"`
	SigningSecret  string
	Initialized    bool `bson:"initialized"`
	AccessToken    string
}

type Store

type Store struct {
	*pkgMongo.Store
}

func NewStore

func NewStore(ctx context.Context, cfg pkgMongo.Config, tls *tls.Config, tracerProvider trace.TracerProvider) (*Store, error)

func (*Store) IncrementSubscriptionSequenceNumber

func (s *Store) IncrementSubscriptionSequenceNumber(ctx context.Context, subscriptionID string) (uint64, error)

func (*Store) LoadSubscriptions

func (s *Store) LoadSubscriptions(ctx context.Context, query store.SubscriptionQuery, h store.SubscriptionHandler) error

func (*Store) PopSubscription

func (s *Store) PopSubscription(ctx context.Context, subscriptionID string) (sub store.Subscription, err error)

func (*Store) SaveSubscription

func (s *Store) SaveSubscription(ctx context.Context, sub store.Subscription) error

func (*Store) SetInitialized

func (s *Store) SetInitialized(ctx context.Context, subscriptionID string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL