bolt

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Subscriptions

type Subscriptions struct {
	// contains filtered or unexported fields
}

Subscriptions implements engine.Subscriptions over the BoltDB storage. It contains three top-level buckets: subscriptions: key - subscriptionID, val - subscription tracker_refs_to_subs: k: tracker name, v: nested bucket with

k: subscriptionID, v: timestamp in RFC3339 nano

tracker_trigger_to_subs: k - reference in "trackerName:triggerName" form, v: subscriptionID

func NewSubscription

func NewSubscription(fileName string, options bolt.Options, log logx.Logger) (*Subscriptions, error)

NewSubscription creates buckets and initial data processing

func (*Subscriptions) Create

Create creates a subscription in the storage.

func (*Subscriptions) Delete

func (b *Subscriptions) Delete(_ context.Context, subID string) error

Delete subscription by id.

func (*Subscriptions) Get

Get subscription by id.

func (*Subscriptions) List

func (b *Subscriptions) List(_ context.Context, trackerName string) ([]store.Subscription, error)

List lists the subscriptions registered on the given tracker.

func (*Subscriptions) Update

Update totally rewrites the provided subscription entry.

type Tickets

type Tickets struct {
	// contains filtered or unexported fields
}

Tickets implements engine.Tickets over BoltDB. tickets: key - ticketID, val - ticket refs: key - reference, val - ticketID

func NewTickets

func NewTickets(fileName string, options bolt.Options) (*Tickets, error)

NewTickets creates buckets and initial data processing

func (*Tickets) Create

func (b *Tickets) Create(ctx context.Context, ticket store.Ticket) (string, error)

Create creates ticket in the storage.

func (*Tickets) Get

Get returns ticket by the given engine.GetRequest.

func (*Tickets) Update

func (b *Tickets) Update(_ context.Context, ticket store.Ticket) error

Update updates ticket by its ID.

Jump to

Keyboard shortcuts

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