shards

package
v0.0.0-...-aa892d2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Key keys

Common storage keys

View Source
var Value values

Common storage values

Functions

func DeleteKey

func DeleteKey(disk *walletapi.Wallet_Disk, t string, key []byte) (err error)

Delete a key-value from datashards

func DeleteSettingsKey

func DeleteSettingsKey(key []byte) (err error)

Delete a key-value setting from datashards

func GetDBType

func GetDBType() string

Get datashards DB type

func GetEncryptedValue

func GetEncryptedValue(disk *walletapi.Wallet_Disk, t string, key []byte) (result []byte, err error)

Get an encrypted key-value from datashards and then decrypt it

func GetEndpoint

func GetEndpoint() (endpoint string, err error)

Get endpoint value from datashards

func GetNetwork

func GetNetwork() (network string, err error)

Get network value from datashards

func GetPath

func GetPath() string

Get the current datashards storage path

func GetSettingsValue

func GetSettingsValue(key []byte) (result []byte, err error)

Get a key-value setting from datashards

func GetShard

func GetShard(disk *walletapi.Wallet_Disk) (result string)

Get a datashard's path, synced with Engram's DB structure

func GetValue

func GetValue(t string, key []byte) (result []byte, err error)

Get a key-value from datashards

func IsValidDBType

func IsValidDBType(db string) bool

Is db a valid type for datashard storage

func SetDBType

func SetDBType(db string) (err error)

Set datashards DB type if IsValidDBType

func SetPath

func SetPath(path string) (datashards string, err error)

SetPath can be used to set a custom path for datashard storage

func StoreEncryptedValue

func StoreEncryptedValue(disk *walletapi.Wallet_Disk, t string, key, value []byte) (err error)

Encrypt a key-value and then store it in datashards

func StoreEndpoint

func StoreEndpoint(value string) (err error)

Store endpoint value in datashards

func StoreNetwork

func StoreNetwork(value string) (err error)

Store network value in datashards

func StoreSettingsValue

func StoreSettingsValue(key, value []byte) (err error)

Store a key-value setting in datashards

func StoreValue

func StoreValue(t string, key, value []byte) (err error)

Store a key-value in datashards

Types

This section is empty.

Jump to

Keyboard shortcuts

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