storage

package
v0.0.0-...-7779a7b Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

type Contract interface {
	CloseDB() (err error)
	Add(data map[string][]byte) (err error)
	Get(key string) (val []byte, err error)
	GetWithPrefix(prefix string) (values [][]byte, err error)
	Del(keys ...string) (err error)
	KeyExists(key string) (exists bool, err error)
}

type Storage

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

func New

func New(path string) (*Storage, error)

func (*Storage) Add

func (s *Storage) Add(data map[string][]byte) (err error)

func (*Storage) CloseDB

func (s *Storage) CloseDB() (err error)

func (*Storage) Del

func (s *Storage) Del(keys ...string) (err error)

func (*Storage) Get

func (s *Storage) Get(key string) (val []byte, err error)

func (*Storage) GetWithPrefix

func (s *Storage) GetWithPrefix(prefix string) (values [][]byte, err error)

func (*Storage) KeyExists

func (s *Storage) KeyExists(key string) (exists bool, err error)

Jump to

Keyboard shortcuts

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