Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStrategy ¶
type FileStrategy struct {
// contains filtered or unexported fields
}
FileStrategy is a Storage that reads/persists data to/from a file at the provided path
func (*FileStrategy) Read ¶
func (fs *FileStrategy) Read() ([]byte, error)
Read reads data from the file at the provided path
func (*FileStrategy) Write ¶
func (fs *FileStrategy) Write(data []byte) error
Write writes data to the file at the provided path
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage represents something that can write user data to some form of Storage
func (*Storage) ReadUserConfig ¶
ReadUserConfig reads the user data from Storage
type Strategy ¶
Strategy represents a means of reading and writing data
func NewFileStrategy ¶
NewFileStrategy returns a new FileStrategy given a location on disk to store data
Click to show internal directories.
Click to hide internal directories.