Documentation ¶
Index ¶
- type HashStore
- type SQLiteStore
- func (s *SQLiteStore) AddChainStats(index types.ChainIndex, cs explorer.ChainStats)
- func (s *SQLiteStore) AddFileContractElement(fce types.FileContractElement)
- func (s *SQLiteStore) AddSiacoinElement(sce types.SiacoinElement)
- func (s *SQLiteStore) AddSiafundElement(sfe types.SiafundElement)
- func (s *SQLiteStore) AddState(index types.ChainIndex, context consensus.State)
- func (s *SQLiteStore) AddTransaction(txn types.Transaction, addresses []types.Address, block types.ChainIndex)
- func (s *SQLiteStore) AddUnspentSiacoinElement(address types.Address, id types.ElementID)
- func (s *SQLiteStore) AddUnspentSiafundElement(address types.Address, id types.ElementID)
- func (s *SQLiteStore) ChainStats(index types.ChainIndex) (cs explorer.ChainStats, err error)
- func (s *SQLiteStore) Commit() (err error)
- func (s *SQLiteStore) FileContractElement(id types.ElementID) (fce types.FileContractElement, err error)
- func (s *SQLiteStore) RemoveElement(id types.ElementID)
- func (s *SQLiteStore) RemoveUnspentSiacoinElement(address types.Address, id types.ElementID)
- func (s *SQLiteStore) RemoveUnspentSiafundElement(address types.Address, id types.ElementID)
- func (s *SQLiteStore) SiacoinElement(id types.ElementID) (sce types.SiacoinElement, err error)
- func (s *SQLiteStore) SiafundElement(id types.ElementID) (sfe types.SiafundElement, err error)
- func (s *SQLiteStore) Size() (uint64, error)
- func (s *SQLiteStore) State(index types.ChainIndex) (context consensus.State, err error)
- func (s *SQLiteStore) Transaction(id types.TransactionID) (txn types.Transaction, err error)
- func (s *SQLiteStore) Transactions(address types.Address, amount, offset int) ([]types.TransactionID, error)
- func (s *SQLiteStore) UnspentSiacoinElements(address types.Address) ([]types.ElementID, error)
- func (s *SQLiteStore) UnspentSiafundElements(address types.Address) ([]types.ElementID, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashStore ¶
type HashStore struct {
// contains filtered or unexported fields
}
func NewHashStore ¶
NewHashStore returns a new HashStore.
func (*HashStore) MerkleProof ¶
MerkleProof implements explorer.HashStore.
func (*HashStore) ModifyLeaf ¶
func (hs *HashStore) ModifyLeaf(elem types.StateElement) error
ModifyLeaf overwrites hashes in the tree with the proof hashes in the provided element.
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
SQLiteStore implements explorer.Store using a SQLite database.
func NewEphemeralStore ¶
func NewEphemeralStore() *SQLiteStore
NewEphemeralStore returns a new in-memory SQLiteStore.
func NewStore ¶
func NewStore(path string) (*SQLiteStore, error)
NewStore creates a new SQLiteStore for storing explorer data.
func (*SQLiteStore) AddChainStats ¶
func (s *SQLiteStore) AddChainStats(index types.ChainIndex, cs explorer.ChainStats)
AddChainStats implements explorer.Store.
func (*SQLiteStore) AddFileContractElement ¶
func (s *SQLiteStore) AddFileContractElement(fce types.FileContractElement)
AddFileContractElement implements explorer.Store.
func (*SQLiteStore) AddSiacoinElement ¶
func (s *SQLiteStore) AddSiacoinElement(sce types.SiacoinElement)
AddSiacoinElement implements explorer.Store.
func (*SQLiteStore) AddSiafundElement ¶
func (s *SQLiteStore) AddSiafundElement(sfe types.SiafundElement)
AddSiafundElement implements explorer.Store.
func (*SQLiteStore) AddState ¶
func (s *SQLiteStore) AddState(index types.ChainIndex, context consensus.State)
AddState implements explorer.Store.
func (*SQLiteStore) AddTransaction ¶
func (s *SQLiteStore) AddTransaction(txn types.Transaction, addresses []types.Address, block types.ChainIndex)
AddTransaction implements explorer.Store.
func (*SQLiteStore) AddUnspentSiacoinElement ¶
func (s *SQLiteStore) AddUnspentSiacoinElement(address types.Address, id types.ElementID)
AddUnspentSiacoinElement implements explorer.Store.
func (*SQLiteStore) AddUnspentSiafundElement ¶
func (s *SQLiteStore) AddUnspentSiafundElement(address types.Address, id types.ElementID)
AddUnspentSiafundElement implements explorer.Store.
func (*SQLiteStore) ChainStats ¶
func (s *SQLiteStore) ChainStats(index types.ChainIndex) (cs explorer.ChainStats, err error)
ChainStats implements explorer.Store.
func (*SQLiteStore) Commit ¶
func (s *SQLiteStore) Commit() (err error)
Commit implements explorer.Store.
func (*SQLiteStore) FileContractElement ¶
func (s *SQLiteStore) FileContractElement(id types.ElementID) (fce types.FileContractElement, err error)
FileContractElement implements explorer.Store.
func (*SQLiteStore) RemoveElement ¶
func (s *SQLiteStore) RemoveElement(id types.ElementID)
RemoveElement implements explorer.Store.
func (*SQLiteStore) RemoveUnspentSiacoinElement ¶
func (s *SQLiteStore) RemoveUnspentSiacoinElement(address types.Address, id types.ElementID)
RemoveUnspentSiacoinElement implements explorer.Store.
func (*SQLiteStore) RemoveUnspentSiafundElement ¶
func (s *SQLiteStore) RemoveUnspentSiafundElement(address types.Address, id types.ElementID)
RemoveUnspentSiafundElement implements explorer.Store.
func (*SQLiteStore) SiacoinElement ¶
func (s *SQLiteStore) SiacoinElement(id types.ElementID) (sce types.SiacoinElement, err error)
SiacoinElement implements explorer.Store.
func (*SQLiteStore) SiafundElement ¶
func (s *SQLiteStore) SiafundElement(id types.ElementID) (sfe types.SiafundElement, err error)
SiafundElement implements explorer.Store.
func (*SQLiteStore) Size ¶
func (s *SQLiteStore) Size() (uint64, error)
Size implements explorer.Store.
func (*SQLiteStore) State ¶
func (s *SQLiteStore) State(index types.ChainIndex) (context consensus.State, err error)
State implements explorer.Store.
func (*SQLiteStore) Transaction ¶
func (s *SQLiteStore) Transaction(id types.TransactionID) (txn types.Transaction, err error)
Transaction implements explorer.Store.
func (*SQLiteStore) Transactions ¶
func (s *SQLiteStore) Transactions(address types.Address, amount, offset int) ([]types.TransactionID, error)
Transactions implements explorer.Store.
func (*SQLiteStore) UnspentSiacoinElements ¶
UnspentSiacoinElements implements explorer.Store.
func (*SQLiteStore) UnspentSiafundElements ¶
UnspentSiafundElements implements explorer.Store.