Documentation ¶
Index ¶
- Constants
- type StdIterator
- type StdStore
- func (s *StdStore) BeginTransaction(_ context.Context) (store.Transaction, error)
- func (s *StdStore) Delete(request string) error
- func (s *StdStore) Get(request string) ([]byte, error)
- func (s *StdStore) Iterator(prefix string) (store.Iterator, error)
- func (s *StdStore) LoadState() ([]byte, error)
- func (s *StdStore) Put(request string, requestData []byte) error
- func (s *StdStore) SetEncryptionKey(encryptionKey []byte) error
- func (s *StdStore) SetRecoveryData(recoveryData []byte)
- type StdTransaction
- func (t *StdTransaction) Commit(_ context.Context) error
- func (t *StdTransaction) Delete(request string) error
- func (t *StdTransaction) Get(request string) ([]byte, error)
- func (t *StdTransaction) Iterator(prefix string) (store.Iterator, error)
- func (t *StdTransaction) Put(request string, requestData []byte) error
- func (t *StdTransaction) Rollback()
Constants ¶
const ( // SealedDataFname is the file name in which the state is sealed on disk in seal_dir. SealedDataFname string = "sealed_data" // SealedKeyFname is the file name in which the key is sealed with the seal key on disk in seal_dir. SealedKeyFname string = "sealed_key" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StdIterator ¶
type StdIterator struct {
// contains filtered or unexported fields
}
StdIterator is the standard Iterator implementation.
func (*StdIterator) GetNext ¶
func (i *StdIterator) GetNext() (string, error)
GetNext implements the Iterator interface.
func (*StdIterator) HasNext ¶
func (i *StdIterator) HasNext() bool
HasNext implements the Iterator interface.
type StdStore ¶
type StdStore struct {
// contains filtered or unexported fields
}
StdStore is the standard implementation of the Store interface.
func (*StdStore) BeginTransaction ¶
BeginTransaction starts a new transaction.
func (*StdStore) Iterator ¶
Iterator returns an iterator for keys saved in StdStore with a given prefix. For an empty prefix this is an iterator for all keys in StdStore.
func (*StdStore) SetEncryptionKey ¶
SetEncryptionKey sets the encryption key for sealing and unsealing.
func (*StdStore) SetRecoveryData ¶
SetRecoveryData sets the recovery data that is added to the sealed data.
type StdTransaction ¶
type StdTransaction struct {
// contains filtered or unexported fields
}
StdTransaction is a transaction for StdStore.
func (*StdTransaction) Commit ¶
func (t *StdTransaction) Commit(_ context.Context) error
Commit ends a transaction and persists the changes.
func (*StdTransaction) Delete ¶
func (t *StdTransaction) Delete(request string) error
Delete removes a value.
func (*StdTransaction) Get ¶
func (t *StdTransaction) Get(request string) ([]byte, error)
Get retrieves a value.
func (*StdTransaction) Iterator ¶
func (t *StdTransaction) Iterator(prefix string) (store.Iterator, error)
Iterator returns an iterator for all keys in the transaction with a given prefix.
func (*StdTransaction) Put ¶
func (t *StdTransaction) Put(request string, requestData []byte) error
Put saves a value.
func (*StdTransaction) Rollback ¶
func (t *StdTransaction) Rollback()
Rollback aborts a transaction.