Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NoSuchKeyError = errors.New("no such key in database") InvalidTypeError = errors.New("invalid result type") )
Functions ¶
Types ¶
type ComposedKVDatabase ¶
type ComposedKVDatabase struct {
// contains filtered or unexported fields
}
func NewComposedKVDatabase ¶
func NewComposedKVDatabase(filePath string) *ComposedKVDatabase
func (*ComposedKVDatabase) Delete ¶
func (db *ComposedKVDatabase) Delete(key []byte) error
func (*ComposedKVDatabase) Get ¶
func (db *ComposedKVDatabase) Get(key []byte) (value []byte, err error)
func (*ComposedKVDatabase) Set ¶
func (db *ComposedKVDatabase) Set(key, value []byte) error
type IKVDatabase ¶
type IKVDatabase interface { Set(key, value []byte) error Get(key []byte) ([]byte, error) Delete(key []byte) error }
var EktDB IKVDatabase
func GetDBInst ¶
func GetDBInst() IKVDatabase
type LevelDB ¶
func NewLevelDB ¶
type MemKVDatabase ¶
func NewMemKVDatabase ¶
func NewMemKVDatabase() *MemKVDatabase
func (*MemKVDatabase) Delete ¶
func (db *MemKVDatabase) Delete(key []byte) error
func (*MemKVDatabase) Set ¶
func (db *MemKVDatabase) Set(key, value []byte) error
Click to show internal directories.
Click to hide internal directories.