kvsrv

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IBoltDbClient

type IBoltDbClient interface {
	Open() error
	Close() error
	Has(key string) (bool, error)
	Gets(keys []string) (map[string]string, error)
	Get(key string) (string, error)
	Dels(keys []string) error
	Del(key string) error
	Sets(keys map[string]string) error
	Set(key string, value string) error
	Select(key string) error
}

func NewClient

func NewClient(addr string, port string) IBoltDbClient

type IKvUtils

type IKvUtils interface {
	Open() error
	Close() error
	Has(key string) (bool, error)
	GetJson(key string, value interface{}) error
	SetJson(key string, value interface{}) error
	Gets(keys []string) (map[string]string, error)
	GetOrDefault(key string, def string) string
	GetOrEmpty(key string) string
	Get(key string) (string, error)
	Dels(keys []string) error
	Del(key string) error
	Sets(keys map[string]string) error
	Set(key string, value string) error
	SetBytes(key []byte, value []byte) error
	Select(key string) error
	Foreach(fun func(key string, value string) error) error
	WithServer(port int) error
}

func Build

func Build(file string) IKvUtils

func New

func New(file string) IKvUtils

type KvParam

type KvParam struct {
	Name  string
	Value string
}

type KvParams

type KvParams struct {
	Name map[string]string
}

type KvValue

type KvValue struct {
	Error error
	Value string
}

type KvValues

type KvValues struct {
	Error error
	Value map[string]string
}

Jump to

Keyboard shortcuts

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