Documentation ¶
Index ¶
- func New(location string, hash crypto.Hash) storages.Storage
- func NewDefault(location string) storages.Storage
- func NewEncodedFile(filename string, encoderFunc EncoderFunc, decoderFunc DecoderFunc) (*encodedNamespace, error)
- func NewFlat(location string) storages.NamespacedStorage
- func NewJSONFile(filename string) (*encodedNamespace, error)
- type DecoderFunc
- type EncoderFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New file storage where each item stores in single file with path based on hashed key. Additionally near each file, meta file also generates
func NewDefault ¶
Same as NewHash but with SHA256 by default
func NewEncodedFile ¶
func NewEncodedFile(filename string, encoderFunc EncoderFunc, decoderFunc DecoderFunc) (*encodedNamespace, error)
New single file storage with custom encoder and decoder
func NewFlat ¶
func NewFlat(location string) storages.NamespacedStorage
func NewJSONFile ¶
New single file storage with JSON encoding
Types ¶
type DecoderFunc ¶
Decode bytes to value
type EncoderFunc ¶
Converter from some data to bytes
Click to show internal directories.
Click to hide internal directories.