jsonstorage

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL