Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileSystemCartRepository ¶
type FileSystemCartRepository struct {
// contains filtered or unexported fields
}
FileSystemCartRepository stores carts filesystem
func FileSystemCartStoreFromFile ¶
func FileSystemCartStoreFromFile(path string) (*FileSystemCartRepository, func(), error)
FileSystemCartStoreFromFile creates a CartStore from the contents of a JSON file found at path
func NewFileSystemCartStore ¶
func NewFileSystemCartStore(file *os.File) (*FileSystemCartRepository, error)
func (*FileSystemCartRepository) Get ¶
func (f *FileSystemCartRepository) Get(id string) (*shopping.Cart, error)
func (*FileSystemCartRepository) Save ¶
func (f *FileSystemCartRepository) Save(cart *shopping.Cart) error
Click to show internal directories.
Click to hide internal directories.