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

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