database

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDatabase

type IDatabase interface {
	GetString(key string) (string, error)
	GetListWithPrefix(prefix string, limit int64) ([]string, error)
	Set(key string, value any, expiration time.Duration)
	SetWithSortKey(pk string, sk string, value any, expiration time.Duration)
	Get(key string) ([]byte, error)
	Delete(key string) error
}

func GetDatabase

func GetDatabase(dbName database.Name) (IDatabase, error)

func GetMainDatabase

func GetMainDatabase() (IDatabase, error)

func Init

func Init(dbName database.Name) (IDatabase, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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