badger

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: CC0-1.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Path     string
	MaxLimit int

	*badger.DB
	// contains filtered or unexported fields
}

func (*Backend) Close

func (b *Backend) Close()

func (*Backend) CountEvents

func (b *Backend) CountEvents(ctx context.Context, filter *nip1.Filter) (int64, error)

func (*Backend) DeleteEvent

func (b *Backend) DeleteEvent(ctx context.Context, evt *nip1.Event) error

func (*Backend) Init

func (b *Backend) Init() error

func (*Backend) QueryEvents

func (b *Backend) QueryEvents(ctx context.Context, filter *nip1.Filter) (evChan chan *nip1.Event, e error)

func (*Backend) SaveEvent

func (b *Backend) SaveEvent(ctx context.Context, evt *nip1.Event) error

func (*Backend) Serial

func (b *Backend) Serial() []byte

Jump to

Keyboard shortcuts

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