store

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("index not found")

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func WithDispatcher

func WithDispatcher(dispatcher types.Dispatcher) Option

func WithLogger

func WithLogger(logger logger.Logger) Option

type Options

type Options struct {
	Logger     types.Logger
	Dispatcher types.Dispatcher
}

type Store

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

func New

func New(opts ...Option) (*Store, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) Get

func (s *Store) Get(ctx context.Context, id uuid.UUID) (*types.Index, error)

func (*Store) Insert

func (s *Store) Insert(ctx context.Context, index *types.Index) error

func (*Store) List

func (s *Store) List(ctx context.Context, opts ...listoption.ListOption) ([]*types.Index, error)

func (*Store) Remove

func (s *Store) Remove(ctx context.Context, id uuid.UUID) error

func (*Store) RemoveByReference

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

TODO: remove this and just filter then call normal remove.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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