shopping

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ItemPrefix = "SHOPPING_ITEM:"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Name     string           `json:"name"`
	Quantity int              `json:"quantity"`
	Note     string           `json:"note"`
	AddedBy  core.DisplayName `json:"addedBy"`
	Added    time.Time        `json:"added"`
}

func (Item) Key

func (i Item) Key() []byte

func (Item) Prefix

func (i Item) Prefix() []byte

type ItemProvider

type ItemProvider interface {
	All() ([]Item, error)
	Delete(name string) error
	Get(name string) (Item, error)
	Set(item Item) error
}

type Providers

type Providers struct {
	Items ItemProvider
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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