Categorygithub.com/go-zoox/kv
modulepackage
1.5.9
Repository: https://github.com/go-zoox/kv.git
Documentation: pkg.go.dev

# README

KV - Key-Value Store

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

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

License

GoZoox is released under the MIT License.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# 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.

# Structs

Error is the error type for KV.

# Type aliases

Config is the interface for KV Config.
KV is the interface for all KV implementations.