Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store interface { SaveSubscription(ctx context.Context, sub Subscription) error PopSubscription(ctx context.Context, subscriptionID string) (Subscription, error) LoadSubscriptions(ctx context.Context, query SubscriptionQuery, h SubscriptionHandler) error IncrementSubscriptionSequenceNumber(ctx context.Context, subscriptionID string) (uint64, error) }
type Subscription ¶
type Subscription struct { ID string // Id URL string // href CorrelationID string // uuid Type Type Accept []string // application/json or application/vnd.ocf+cbor EventTypes events.EventTypes DeviceID string // filled for device and resource events Href string // filled for resource events SequenceNumber uint64 UserID string SigningSecret string }
type SubscriptionHandler ¶
type SubscriptionHandler interface {
Handle(ctx context.Context, iter SubscriptionIter) (err error)
}
type SubscriptionIter ¶
type SubscriptionIter interface { Next(ctx context.Context, sub *Subscription) bool Err() error }
type SubscriptionQuery ¶
Click to show internal directories.
Click to hide internal directories.