in_memory

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemStore

type InMemStore struct {
	// contains filtered or unexported fields
}

InMemStore implements core.Storage using in-memory store.

func NewInMemStore

func NewInMemStore(network core.Network) *InMemStore

NewInMemStore is the constructor of InMemStore.

func NewInMemStoreWithEncryptor

func NewInMemStoreWithEncryptor(network core.Network, encryptor encryptor2.Encryptor, password []byte) *InMemStore

NewInMemStoreWithEncryptor is the constructor of InMemStore.

func (*InMemStore) DeleteAccount

func (store *InMemStore) DeleteAccount(accountId uuid.UUID) error

func (*InMemStore) ListAccounts

func (store *InMemStore) ListAccounts() ([]core.ValidatorAccount, error)

will return an empty array for no accounts

func (*InMemStore) MarshalJSON

func (store *InMemStore) MarshalJSON() ([]byte, error)

func (*InMemStore) Name

func (store *InMemStore) Name() string

Name provides the name of the store.

func (*InMemStore) Network

func (store *InMemStore) Network() core.Network

Network returns the network.

func (*InMemStore) OpenAccount

func (store *InMemStore) OpenAccount(accountId uuid.UUID) (core.ValidatorAccount, error)

will return nil,nil if no account was found

func (*InMemStore) OpenWallet

func (store *InMemStore) OpenWallet() (core.Wallet, error)

will return nil,nil if no wallet was found

func (*InMemStore) RetrieveHighestAttestation

func (store *InMemStore) RetrieveHighestAttestation(pubKey []byte) *eth.AttestationData

func (*InMemStore) RetrieveHighestProposal

func (store *InMemStore) RetrieveHighestProposal(pubKey []byte) *eth.BeaconBlock

func (*InMemStore) SaveAccount

func (store *InMemStore) SaveAccount(account core.ValidatorAccount) error

func (*InMemStore) SaveHighestAttestation

func (store *InMemStore) SaveHighestAttestation(pubKey []byte, attestation *eth.AttestationData) error

func (*InMemStore) SaveHighestProposal

func (store *InMemStore) SaveHighestProposal(pubKey []byte, block *eth.BeaconBlock) error

func (*InMemStore) SaveWallet

func (store *InMemStore) SaveWallet(wallet core.Wallet) error

SaveWallet implements core.Storage interface.

func (*InMemStore) SetEncryptor

func (store *InMemStore) SetEncryptor(encryptor encryptor2.Encryptor, password []byte)

func (*InMemStore) UnmarshalJSON

func (store *InMemStore) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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