storage

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Unlicense Imports: 1 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BucketNotFoundError

func BucketNotFoundError(bucket []byte) error

BucketNotFoundError returns an error for bucket-not-found

func InternalError

func InternalError(s string) error

InternalError something go wrong internal

func IsErrorBucketNotFound

func IsErrorBucketNotFound(err error) bool

IsErrorBucketNotFound returns if it is an ErrorBucketNotFound

func IsErrorKeyNotFound

func IsErrorKeyNotFound(err error) bool

IsErrorKeyNotFound returns if it is an ErrorKeyNotFound

func KeyNotFoundError

func KeyNotFoundError(key []byte) error

KeyNotFoundError returns an error for key-not-found

Types

type ErrorBucketNotFound

type ErrorBucketNotFound struct {
	// contains filtered or unexported fields
}

ErrorBucketNotFound bucket-not-found error type

type ErrorInternal

type ErrorInternal struct {
	// contains filtered or unexported fields
}

ErrorInternal internal error

type ErrorKeyNotFound

type ErrorKeyNotFound struct {
	// contains filtered or unexported fields
}

ErrorKeyNotFound key-not-found error type

type NSStorage

type NSStorage interface {
	Storage
	GetNS(namespace, key []byte) ([]byte, error)
}

NSStorage defines an interface to a namespaced storage

type Storage

type Storage interface {
	Get(key []byte) ([]byte, error)
	Load(string) error
}

Storage defines an interface to a storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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