gitstore

package
v0.0.0-...-9268282 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDuplicate = errors.New("duplicate event")

ErrDuplicate indicates that an event was already persisted.

Functions

This section is empty.

Types

type Store

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

Store adapts the shared SQLite event store to the Git engine contract.

func Open

func Open(ctx context.Context, path string) (*Store, error)

Open creates a caller-owned SQLite store.

func Wrap

func Wrap(store *storage.Store) *Store

Wrap adapts an existing host store without taking lifecycle ownership.

func (*Store) Close

func (s *Store) Close() error

func (*Store) Exists

func (s *Store) Exists(ctx context.Context, id string, kind int) (bool, error)

func (*Store) Latest

func (s *Store) Latest(ctx context.Context, kind int, pubkey, identifier string) (nostr.Event, bool, error)

func (*Store) Query

func (s *Store) Query(ctx context.Context, f nostr.Filter, now int64, limit int) ([]nostr.Event, error)

func (*Store) Save

func (s *Store) Save(ctx context.Context, e nostr.Event, now int64) error

Jump to

Keyboard shortcuts

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