Documentation ¶
Overview ¶
Package dieci implements basic API for Dieci data store
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEncrypt is a shield error for any encyption failure ErrEncrypt = errors.New("encryption failed") // ErrDecrypt is a shield error for any decyption failure ErrDecrypt = errors.New("decryption failed") )
Functions ¶
func ValidateKey ¶
ValidateKey attempt to decode byte slice into sno ID to confirm that it's a valid key.
Types ¶
type Backend ¶
type Backend interface { Read([]byte) ([]byte, error) Exists([]byte) (bool, error) Write([]byte, []byte) error }
Backend is an interface for Dieci backend implementation
func NewBadgerBackend ¶
NewBadgerBackend returns new instance of Badger backend for a given transaction
type BadgerBackend ¶
type BadgerBackend struct {
// contains filtered or unexported fields
}
BadgerBackend implements backedn with BadgerDB
func (*BadgerBackend) Exists ¶
func (bb *BadgerBackend) Exists(k []byte) (bool, error)
Exists confirms if given key exists in Badger backend
type Datalog ¶
type Datalog struct {
// contains filtered or unexported fields
}
Datalog represents a datastore's datalog
func NewDatalog ¶
NewDatalog returns a new datalog for a given transaction
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index represents an index of a datalog file
type PKI ¶
type PKI struct {
// contains filtered or unexported fields
}
PKI represent an interface to PKI service (e.g Valut)
func (*PKI) GenerateNonce ¶
GenerateNonce creates a new random nonce
Click to show internal directories.
Click to hide internal directories.