keyvaluestorage

package
v0.11.13 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const IndexerCName = "common.keyvalue.indexer"

Variables

This section is empty.

Functions

This section is empty.

Types

type Decryptor

type Decryptor = func(kv innerstorage.KeyValue) (value []byte, err error)

type Indexer

type Indexer interface {
	app.Component
	Index(decryptor Decryptor, keyValue ...innerstorage.KeyValue) error
}

type NoOpIndexer

type NoOpIndexer struct{}

func (NoOpIndexer) Index

func (n NoOpIndexer) Index(decryptor Decryptor, keyValue ...innerstorage.KeyValue) error

func (NoOpIndexer) Init

func (n NoOpIndexer) Init(a *app.App) (err error)

func (NoOpIndexer) Name

func (n NoOpIndexer) Name() (name string)

type Storage

type Storage interface {
	Id() string
	Prepare() error
	Set(ctx context.Context, key string, value []byte) error
	SetRaw(ctx context.Context, keyValue ...*spacesyncproto.StoreKeyValue) error
	GetAll(ctx context.Context, key string, get func(decryptor Decryptor, values []innerstorage.KeyValue) error) error
	Iterate(ctx context.Context, f func(decryptor Decryptor, key string, values []innerstorage.KeyValue) (bool, error)) error
	InnerStorage() innerstorage.KeyValueStorage
}

func New

func New(
	ctx context.Context,
	storageId string,
	store anystore.DB,
	headStorage headstorage.HeadStorage,
	keys *accountdata.AccountKeys,
	syncClient syncstorage.SyncClient,
	aclList list.AclList,
	indexer Indexer,
) (Storage, error)

Directories

Path Synopsis
Package mock_keyvaluestorage is a generated GoMock package.
Package mock_keyvaluestorage is a generated GoMock package.

Jump to

Keyboard shortcuts

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