Documentation ¶
Overview ¶
Package storage provides different backends for versioned data storage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotExist = errors.New("storage item does not exist")
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { URI() string Create(name string, data []byte) (string, error) Update(name string, data []byte) (Version, error) Delete(name string) error List() (Names, error) Get(name string) ([]byte, error) GetVersions(name string) ([]Version, error) GetVersion(name string, version Version) ([]byte, error) Log(name string, message string) error }
func NewFSStorage ¶
func NewFSStorage(path string, versionLimit VersionLimit) (Backend, error)
func NewMemoryStorage ¶
func NewMemoryStorage(versionLimit VersionLimit) Backend
Click to show internal directories.
Click to hide internal directories.