Documentation ¶ Index ¶ Variables type Storage func New(dir string) *Storage[T] func (storage *Storage[T]) Delete(key string) error func (storage *Storage[T]) Get(key string) (T, error) func (storage *Storage[T]) Put(key string, value T) error func (storage *Storage[T]) Range(f func(string, T) error) error Constants ¶ This section is empty. Variables ¶ View Source var ( ErrNotExist = errors.New("entry does not exist") ErrInternal = errors.New("internal error") ) Functions ¶ This section is empty. Types ¶ type Storage ¶ type Storage struct { // contains filtered or unexported fields } func New ¶ func New(dir string) *Storage[T] func (*Storage[T]) Delete ¶ added in v1.0.2 func (storage *Storage[T]) Delete(key string) error func (*Storage[T]) Get ¶ added in v1.0.2 func (storage *Storage[T]) Get(key string) (T, error) func (*Storage[T]) Put ¶ added in v1.0.2 func (storage *Storage[T]) Put(key string, value T) error func (*Storage[T]) Range ¶ added in v1.0.2 func (storage *Storage[T]) Range(f func(string, T) error) error Source Files ¶ View all Source files errors.gostorage.go Click to show internal directories. Click to hide internal directories.