Documentation
¶
Index ¶
- Constants
- type BoltBackend
- func (b *BoltBackend) Close()
- func (b *BoltBackend) CountEvents(filter nostr.Filter) (uint32, error)
- func (b *BoltBackend) CountEventsHLL(filter nostr.Filter, offset int) (uint32, *hyperloglog.HyperLogLog, error)
- func (b *BoltBackend) DeleteEvent(id nostr.ID) error
- func (b *BoltBackend) Init() error
- func (b *BoltBackend) QueryEvents(filter nostr.Filter, maxLimit int) iter.Seq[nostr.Event]
- func (b *BoltBackend) ReplaceEvent(evt nostr.Event) error
- func (b *BoltBackend) SaveEvent(evt nostr.Event) error
Constants ¶
View Source
const (
DB_VERSION byte = 'v'
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltBackend ¶
type BoltBackend struct {
Path string
MapSize int64
DB *bbolt.DB
EnableHLLCacheFor func(kind nostr.Kind) (useCache bool, skipSavingActualEvent bool)
}
func (*BoltBackend) Close ¶
func (b *BoltBackend) Close()
func (*BoltBackend) CountEvents ¶
func (b *BoltBackend) CountEvents(filter nostr.Filter) (uint32, error)
func (*BoltBackend) CountEventsHLL ¶
func (b *BoltBackend) CountEventsHLL(filter nostr.Filter, offset int) (uint32, *hyperloglog.HyperLogLog, error)
CountEventsHLL is like CountEvents, but it will build a hyperloglog value while iterating through results, following NIP-45
func (*BoltBackend) DeleteEvent ¶
func (b *BoltBackend) DeleteEvent(id nostr.ID) error
func (*BoltBackend) Init ¶
func (b *BoltBackend) Init() error
func (*BoltBackend) QueryEvents ¶
func (*BoltBackend) ReplaceEvent ¶
func (b *BoltBackend) ReplaceEvent(evt nostr.Event) error
Click to show internal directories.
Click to hide internal directories.