Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseBackend ¶
type DatabaseBackend struct { DataSourceName string // contains filtered or unexported fields }
DatabaseBackend implements a database data store.
func (*DatabaseBackend) Close ¶
func (dbb *DatabaseBackend) Close() error
Close disconnects an active database session.
func (*DatabaseBackend) GetLatestLedgerSequence ¶
func (dbb *DatabaseBackend) GetLatestLedgerSequence() (uint32, error)
GetLatestLedgerSequence returns the most recent ledger sequence number present in the database.
func (*DatabaseBackend) GetLedger ¶
func (dbb *DatabaseBackend) GetLedger(sequence uint32) (bool, LedgerCloseMeta, error)
GetLedger returns the LedgerCloseMeta for the given ledger sequence number. The first returned value is false when the ledger does not exist in the database.
type LedgerBackend ¶
type LedgerBackend interface { GetLatestLedgerSequence() (sequence uint32, err error) // The first returned value is false when the ledger does not exist in a backend. GetLedger(sequence uint32) (bool, LedgerCloseMeta, error) Close() error }
LedgerBackend represents the interface to a ledger data store.
type LedgerCloseMeta ¶
type LedgerCloseMeta struct { LedgerHeader xdr.LedgerHeaderHistoryEntry TransactionEnvelope []xdr.TransactionEnvelope TransactionResult []xdr.TransactionResultPair TransactionMeta []xdr.TransactionMeta TransactionFeeChanges []xdr.LedgerEntryChanges }
LedgerCloseMeta is the information needed to reconstruct the history of transactions in a given ledger.
type MockDatabaseBackend ¶
func (*MockDatabaseBackend) Close ¶
func (m *MockDatabaseBackend) Close() error
func (*MockDatabaseBackend) GetLatestLedgerSequence ¶
func (m *MockDatabaseBackend) GetLatestLedgerSequence() (uint32, error)
func (*MockDatabaseBackend) GetLedger ¶
func (m *MockDatabaseBackend) GetLedger(sequence uint32) (bool, LedgerCloseMeta, error)
Click to show internal directories.
Click to hide internal directories.