sqlite

package
v0.0.0-...-90e5bb7 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNotFound = errors.New("key not found")
	ErrKeyExpired  = errors.New("key expired")
)
View Source
var (
	ErrIsNotDir  = errors.New("is not a directory")
	ErrCreateDir = errors.New("could not create directory")
	ErrStatDir   = errors.New("could not stat directory")
)

Functions

func NewDB

func NewDB(name string) (*sql.DB, error)

Types

type KV

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

func NewKV

func NewKV(name string, cleanUpFreq time.Duration) (*KV, error)

func (*KV) Close

func (kv *KV) Close() error

func (*KV) Delete

func (kv *KV) Delete(key string) error

func (*KV) Get

func (kv *KV) Get(key string) (string, error)

func (*KV) Set

func (kv *KV) Set(key string, value string) error

func (*KV) SetWithExpiry

func (kv *KV) SetWithExpiry(key string, value string, expiresIn time.Duration) error

Jump to

Keyboard shortcuts

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