persistence

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ItemBucket = "items"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Items

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

func New

func New(cfg natscli.Config) (*Items, error)

func (*Items) GetByID

func (i *Items) GetByID(ctx context.Context, id string) (*model.Item, error)

func (*Items) ListAll

func (i *Items) ListAll(ctx context.Context, page common.Page) ([]*model.Item, error)

ListAll obtains all items from storage, using the supplied pagination information

func (*Items) ListAvailableAt

func (i *Items) ListAvailableAt(ctx context.Context, date time.Time, page common.Page) ([]*model.Item, error)

ListAvailableAt currently isn't implemented - more complicated implementation, will need to be able to query on the availability schedule which will likely want a different storage structure for this data.

func (*Items) Update

func (i *Items) Update(ctx context.Context, item *model.Item) (*model.Item, error)

Jump to

Keyboard shortcuts

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