Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Storage ¶
type Storage interface {
//Update updates the file of the given filename in the storage with the given data
Update(filename string, data []byte) error
//Read reads the file of the given filename from the storage
Read(filename string) ([]byte, error)
}
Storage interface definition of a storage for persisting files
func NewStorage ¶
NewStorage creates a new storage for file at the given directory
func NewStorageAtUserHome ¶
func NewStorageAtUserHome() Storage
NewStorageAtUserHome creates a new storage for files at the user home directory
Click to show internal directories.
Click to hide internal directories.