fs

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

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