memory

package
v0.0.0-...-3a0902d Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStorage

func NewStorage() (*storage.Storage, error)

func NewStore

func NewStore() *store

Types

type BasketStore

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

func NewBasketStore

func NewBasketStore() *BasketStore

func (BasketStore) All

func (s BasketStore) All() []entities.Entity

func (BasketStore) Delete

func (s BasketStore) Delete(itemId string) error

func (*BasketStore) FindById

func (bs *BasketStore) FindById(basketId string) (*entities.Basket, error)

func (BasketStore) Save

func (s BasketStore) Save(item entities.Entity) (string, error)

func (BasketStore) Update

func (s BasketStore) Update(item entities.Entity) error

type ProductStore

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

func NewProductStore

func NewProductStore() *ProductStore

func (*ProductStore) All

func (ps *ProductStore) All() []*entities.Product

func (ProductStore) Delete

func (s ProductStore) Delete(itemId string) error

func (*ProductStore) FindById

func (ps *ProductStore) FindById(productId string) (*entities.Product, error)

func (ProductStore) Save

func (s ProductStore) Save(item entities.Entity) (string, error)

func (ProductStore) Update

func (s ProductStore) Update(item entities.Entity) error

Jump to

Keyboard shortcuts

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