storage

package
v0.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type FileStore

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

func NewFileStore

func NewFileStore(root string) (*FileStore, error)

func (*FileStore) Get

func (s *FileStore) Get(collection, id string, dest any) error

func (*FileStore) List

func (s *FileStore) List(collection string, dest any) error

func (*FileStore) Put

func (s *FileStore) Put(collection, id string, value any) error

type PostgresStore

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

func NewPostgresStore

func NewPostgresStore(databaseURL string) (*PostgresStore, error)

func (*PostgresStore) Close

func (s *PostgresStore) Close() error

func (*PostgresStore) Get

func (s *PostgresStore) Get(collection, id string, dest any) error

func (*PostgresStore) List

func (s *PostgresStore) List(collection string, dest any) error

func (*PostgresStore) Put

func (s *PostgresStore) Put(collection, id string, value any) error

func (*PostgresStore) RunMigrations

func (s *PostgresStore) RunMigrations(dir string) error

type Store

type Store interface {
	Put(collection, id string, value any) error
	Get(collection, id string, dest any) error
	List(collection string, dest any) error
}

Jump to

Keyboard shortcuts

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