strtree

package module
v0.0.0-...-0608a93 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MPL-2.0 Imports: 9 Imported by: 1

README

strtree

Extremely simple key/value in-memory DB

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNeedPointer = errors.New("Gob encoder must be a pointer")
View Source
var ErrNotFound = errors.New("Not found")
View Source
var ErrUnknown = errors.New("Unknown type on data")

Functions

func Register

func Register(m Marshaler) error

Types

type Marshaler

type Marshaler interface {
	Marshal(io.Writer) error
	Unmarshal(io.Reader) error
	Get() interface{}
}

type NativeMarshaler

type NativeMarshaler interface {
	Marshaler
	Set(interface{})
}

type Node

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

func (*Node) Fetch

func (n *Node) Fetch(s string) (*Node, int, int, error)

func (*Node) Get

func (n *Node) Get(s string) (interface{}, error)

func (*Node) GobDecode

func (n *Node) GobDecode(input []byte) error

func (*Node) GobEncode

func (n *Node) GobEncode() ([]byte, error)

func (Node) List

func (n Node) List() []Value

func (*Node) Set

func (n *Node) Set(s string, val interface{}) error

func (Node) String

func (n Node) String() string

type Value

type Value struct {
	Key  string
	Data interface{}
}

func (Value) String

func (kv Value) String() string

Jump to

Keyboard shortcuts

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