badger

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Unlicense Imports: 18 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadgerBackend

type BadgerBackend struct {
	Path                  string
	MaxLimit              int
	MaxLimitNegentropy    int
	BadgerOptionsModifier func(badger.Options) badger.Options

	// Experimental
	SkipIndexingTag func(event *nostr.Event, tagName string, tagValue string) bool
	// Experimental
	IndexLongerTag func(event *nostr.Event, tagName string, tagValue string) bool

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

func (*BadgerBackend) Close

func (b *BadgerBackend) Close()

func (*BadgerBackend) CountEvents

func (b *BadgerBackend) CountEvents(ctx context.Context, filter nostr.Filter) (int64, error)

func (*BadgerBackend) CountEventsHLL added in v0.14.2

func (b *BadgerBackend) CountEventsHLL(ctx context.Context, filter nostr.Filter, offset int) (int64, *hyperloglog.HyperLogLog, error)

func (*BadgerBackend) DeleteEvent

func (b *BadgerBackend) DeleteEvent(ctx context.Context, evt *nostr.Event) error

func (*BadgerBackend) Init

func (b *BadgerBackend) Init() error

func (*BadgerBackend) QueryEvents

func (b *BadgerBackend) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)

func (*BadgerBackend) ReplaceEvent added in v0.14.3

func (b *BadgerBackend) ReplaceEvent(ctx context.Context, evt *nostr.Event) error

func (*BadgerBackend) SaveEvent

func (b *BadgerBackend) SaveEvent(ctx context.Context, evt *nostr.Event) error

func (*BadgerBackend) Serial

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

Jump to

Keyboard shortcuts

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