store

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnimplemented ...
	ErrUnimplemented = errors.New("not implemented")

	// ErrNoNilValue ...
	ErrNoNilValue = errors.New("no nil value")

	// ErrNotExists ...
	ErrNotExists = errors.New("not exists")
)

Functions

This section is empty.

Types

type Storage

type Storage interface {
	// Open is called when the storage is opened.
	Open() error

	// Close is called when the storage is closed.
	Close() error

	// Has is called to check if a key exists.
	Has(key string) (bool, error)

	// Get is called to get a value.
	Get(key string) ([]byte, error)

	// Set is called to set a value.
	Set(key string, value []byte) error

	// Delete is called to delete a value.
	Delete(key string) error
}

Storage ...

type Unimplemented

type Unimplemented struct{}

Unimplemented ...

func (*Unimplemented) Close

func (s *Unimplemented) Close() error

Close ...

func (*Unimplemented) Delete

func (s *Unimplemented) Delete(key string) error

Delete ...

func (*Unimplemented) Get

func (s *Unimplemented) Get(key string) ([]byte, error)

Get ...

func (*Unimplemented) Has

func (s *Unimplemented) Has(key string) (bool, error)

Has ...

func (*Unimplemented) Open

func (s *Unimplemented) Open() error

Open ...

func (*Unimplemented) Set

func (s *Unimplemented) Set(key string, value []byte) error

Set ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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