# README
KV - Key-Value Store
Installation
To install the package, run:
go get github.com/go-zoox/kv
Getting Started
func TestMemoryKV(t *testing.T) {
m := kv.NewMemory()
if m.Size() != 0 {
t.Errorf("Expected size 0, got %d", m.Size())
}
m.Set("key", "value")
if m.Get("key") != "value" {
t.Error("Expected value to be 'value'")
}
if m.Size() != 1 {
t.Errorf("Expected size 1, got %d", m.Size())
}
}
Engines
- Memory
- Redis
- MongoDB
- SQLite
- FileSystem
- PostgreSQL
- MySQL
- DynamoDB
- JSONRPC
Inspired by
- srfrog/dict - Python-like dictionaries for Go
- adelowo/onecache - One caching API, Multiple backends
License
GoZoox is released under the MIT License.
# Functions
New returns a new KV.
NewError returns a new KVError.
NewFileSystem returns a new FileSystem KV.
NewMemory returns a new Memory KV.
NewRedis returns a new Redis KV.
# Constants
ErrConfigNotSet means config not set error.
ErrUnknownEngine means unknown engine error.
# Variables
Version is the current version of the package.