Documentation
¶
Overview ¶
Package fs implements a key-value store that stores keys as file names and values as file content.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶ added in v0.7.0
type Store struct { // Dir is the directory where key-value entries // are located. The store will read / write // values from / to files in this directory. Dir string // ErrorLog specifies an optional logger for errors // when files cannot be opened, deleted or contain // invalid content. // If nil, logging is done via the log package's // standard logger. ErrorLog *log.Logger }
Store is a file system key-value store that stores keys as file names in a directory.
func (*Store) Create ¶ added in v0.7.0
Create stores the key in a new file in the KeyStore directory if and only if no file with the given name does not exists.
If such a file already exists it returns kes.ErrKeyExists.
func (*Store) Delete ¶ added in v0.7.0
Delete removes the file with the given name in the KeyStore directory, if it exists. It does not return an error if the file does not exist.
Click to show internal directories.
Click to hide internal directories.