cachekv

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: GPL-3.0 Imports: 19 Imported by: 0

README

cachekv

kv store

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchInsert

func BatchInsert(dbName string, entries map[string][]byte) error

func CreateDatabase

func CreateDatabase(dbName string, secure bool) error

func GetEntry

func GetEntry(dbName string, key string) ([]byte, error)

func InsertEntry

func InsertEntry(dbName string, key string, value []byte) error

func ListDatabases

func ListDatabases() ([]string, error)

func RemoveEntry

func RemoveEntry(dbName string, key string) error

func UpdateConfigurations

func UpdateConfigurations(config *Config) error

func UpdateEntry

func UpdateEntry(dbName string, key string, value []byte) error

Types

type Config

type Config struct {
	StorePath   string `json:"store_path"`
	SecureNewDb bool   `json:"secure_new_db"`
	MetaStore   string `json:"meta_store"`
	MetaFile    string `json:"meta_file"`
}

func ListConfigurations

func ListConfigurations() (*Config, error)

type DbObject

type DbObject struct {
	DbPath      string `json:"db_path"`
	DbFile      string `json:"db_file"`
	Secure      bool   `json:"secure"`
	Created     int64  `json:"created"`
	Active      bool   `json:"active"`
	LastRotated int64  `json:"last_rotated"`
	Deleted     int64  `json:"deleted"`
}

type Event

type Event struct {
	Type    EventType `json:"type"`
	Comment string    `json:"comment"`
	TSTamp  int64     `json:"tstamp"`
}

type EventType

type EventType int
const (
	EventTypeWrite EventType
	EventTypeRead
	EventTypeCreate
	EventTypeDelete
	EventTypeUpdate
	EventTypeConfigChange
)

type Storage

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

Jump to

Keyboard shortcuts

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