postgres

package
v1.0.0-rc.9 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: LGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLayerZeroListQ added in v1.0.0

func NewLayerZeroListQ(db *pgdb.DB) data.LayerZeroListStorage

func NewSystemContractsStorage added in v1.0.0

func NewSystemContractsStorage(db *pgdb.DB) data.SystemContractsStorage

func UnionAll added in v1.0.0

func UnionAll(mainQuery *squirrel.SelectBuilder, query squirrel.SelectBuilder) error

Types

type AllVotings

type AllVotings struct {
	Cvotings      []data.ConstitutionVoting
	GUvotings     []data.GeneralUpdateVoting
	EUvotings     []data.EmergencyUpdateVoting
	Rvotings      []data.RootsVoting
	RSvotings     []data.RootnodesSlashingVoting
	VSvotings     []data.ValidatorsSlashingVoting
	EPQFIMvotings []data.EpqfiMembershipVoting
	EPQFIPvotings []data.EpqfiParametersVoting
	EPDRMvotings  []data.EpdrMembershipVoting
	EPDRPvotings  []data.EpdrParametersVoting
	EPRSMvotings  []data.EprsMembershipVoting
	EPRSPvotings  []data.EprsParametersVoting
	CRAvotings    []data.ContractRegistryAddressVoting
	CRUvotings    []data.ContractRegistryUpgradeVoting
}

type BlockStorage

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

BlockStorage implements data.BlockStorage.

func (*BlockStorage) Erase

func (s *BlockStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*BlockStorage) GetBlockEarlierThan

func (s *BlockStorage) GetBlockEarlierThan(timestamp int64) (*data.Block, error)

func (*BlockStorage) GetByNumber

func (s *BlockStorage) GetByNumber(number uint64) (*data.Block, error)

func (*BlockStorage) GetLatest

func (s *BlockStorage) GetLatest() (*data.Block, error)

GetLatest block.

func (*BlockStorage) Insert

func (s *BlockStorage) Insert(block *data.Block) error

func (*BlockStorage) Select

func (s *BlockStorage) Select(params *data.SelectBlocksParams) ([]data.Block, error)

Select blocks with params.

type ConstitutionVotingStorage

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

ConstitutionVotingStorage implements data.ConstitutionVotingStorage.

func (*ConstitutionVotingStorage) Erase

func (s *ConstitutionVotingStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*ConstitutionVotingStorage) GetByNumber

func (s *ConstitutionVotingStorage) GetByNumber(number uint64) (*data.ConstitutionVoting, error)

func (*ConstitutionVotingStorage) GetEarliestUnfinishedVotings

func (s *ConstitutionVotingStorage) GetEarliestUnfinishedVotings() ([]data.ConstitutionVoting, error)

func (*ConstitutionVotingStorage) GetLatest

GetLatest block.

func (*ConstitutionVotingStorage) Insert

func (*ConstitutionVotingStorage) Select

Select votings with params.

func (*ConstitutionVotingStorage) Update

type ContractRegistryAddressVotingStorage

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

ContractRegistryAddressVotingStorage implements data.ContractRegistryAddressVotingStorage.

func (*ContractRegistryAddressVotingStorage) Erase

Erase all history starting fromID inclusively.

func (*ContractRegistryAddressVotingStorage) GetByNumber

func (*ContractRegistryAddressVotingStorage) GetEarliestUnfinishedVotings

func (s *ContractRegistryAddressVotingStorage) GetEarliestUnfinishedVotings() ([]data.ContractRegistryAddressVoting, error)

func (*ContractRegistryAddressVotingStorage) GetLatest

GetLatest block.

func (*ContractRegistryAddressVotingStorage) Insert

func (*ContractRegistryAddressVotingStorage) Select

Select votings with params.

func (*ContractRegistryAddressVotingStorage) Update

type ContractRegistryUpgradeVotingStorage

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

ContractRegistryUpgradeVotingStorage implements data.ContractRegistryUpgradeVotingStorage.

func (*ContractRegistryUpgradeVotingStorage) Erase

Erase all history starting fromID inclusively.

func (*ContractRegistryUpgradeVotingStorage) GetByNumber

func (*ContractRegistryUpgradeVotingStorage) GetEarliestUnfinishedVotings

func (s *ContractRegistryUpgradeVotingStorage) GetEarliestUnfinishedVotings() ([]data.ContractRegistryUpgradeVoting, error)

func (*ContractRegistryUpgradeVotingStorage) GetLatest

GetLatest block.

func (*ContractRegistryUpgradeVotingStorage) Insert

func (*ContractRegistryUpgradeVotingStorage) Select

Select votings with params.

func (*ContractRegistryUpgradeVotingStorage) Update

type EmergencyUpdateVotingStorage

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

EmergencyUpdateVotingStorage implements data.EmergencyUpdateVotingStorage.

func (*EmergencyUpdateVotingStorage) Erase

func (s *EmergencyUpdateVotingStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*EmergencyUpdateVotingStorage) GetByNumber

func (*EmergencyUpdateVotingStorage) GetEarliestUnfinishedVotings

func (s *EmergencyUpdateVotingStorage) GetEarliestUnfinishedVotings() ([]data.EmergencyUpdateVoting, error)

func (*EmergencyUpdateVotingStorage) GetLatest

GetLatest block.

func (*EmergencyUpdateVotingStorage) Insert

func (*EmergencyUpdateVotingStorage) Select

Select votings with params.

func (*EmergencyUpdateVotingStorage) Update

type EpdrMembershipVotingStorage

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

EpdrMembershipVotingStorage implements data.EpdrMembershipVotingStorage.

func (*EpdrMembershipVotingStorage) Erase

func (s *EpdrMembershipVotingStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*EpdrMembershipVotingStorage) GetByNumber

func (*EpdrMembershipVotingStorage) GetEarliestUnfinishedVotings

func (s *EpdrMembershipVotingStorage) GetEarliestUnfinishedVotings() ([]data.EpdrMembershipVoting, error)

func (*EpdrMembershipVotingStorage) GetLatest

GetLatest block.

func (*EpdrMembershipVotingStorage) Insert

func (*EpdrMembershipVotingStorage) Select

Select votings with params.

func (*EpdrMembershipVotingStorage) Update

type EpdrParametersVotingStorage

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

EpdrParametersVotingStorage implements data.EpdrParametersVotingStorage.

func (*EpdrParametersVotingStorage) Erase

func (s *EpdrParametersVotingStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*EpdrParametersVotingStorage) GetByNumber

func (*EpdrParametersVotingStorage) GetEarliestUnfinishedVotings

func (s *EpdrParametersVotingStorage) GetEarliestUnfinishedVotings() ([]data.EpdrParametersVoting, error)

func (*EpdrParametersVotingStorage) GetLatest

GetLatest epdr parameters voting.

func (*EpdrParametersVotingStorage) Insert

func (*EpdrParametersVotingStorage) Select

Select votings with params.

func (*EpdrParametersVotingStorage) Update

type EpqfiMembershipVotingStorage

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

EpqfiMembershipVotingStorage implements data.EpqfiMembershipVotingStorage.

func (*EpqfiMembershipVotingStorage) Erase

func (s *EpqfiMembershipVotingStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*EpqfiMembershipVotingStorage) GetByNumber

func (*EpqfiMembershipVotingStorage) GetEarliestUnfinishedVotings

func (s *EpqfiMembershipVotingStorage) GetEarliestUnfinishedVotings() ([]data.EpqfiMembershipVoting, error)

func (*EpqfiMembershipVotingStorage) GetLatest

GetLatest epqfi membership voting.

func (*EpqfiMembershipVotingStorage) Insert

func (*EpqfiMembershipVotingStorage) Select

Select votings with params.

func (*EpqfiMembershipVotingStorage) Update

type EpqfiParametersVotingStorage

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

EpqfiParametersVotingStorage implements data.EpqfiParametersVotingStorage.

func (*EpqfiParametersVotingStorage) Erase

func (s *EpqfiParametersVotingStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*EpqfiParametersVotingStorage) GetByNumber

func (*EpqfiParametersVotingStorage) GetEarliestUnfinishedVotings

func (s *EpqfiParametersVotingStorage) GetEarliestUnfinishedVotings() ([]data.EpqfiParametersVoting, error)

func (*EpqfiParametersVotingStorage) GetLatest

GetLatest epqfi parameters voting.

func (*EpqfiParametersVotingStorage) Insert

func (*EpqfiParametersVotingStorage) Select

Select votings with params.

func (*EpqfiParametersVotingStorage) Update

type EprsMembershipVotingStorage

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

EprsMembershipVotingStorage implements data.EprsMembershipVotingStorage.

func (*EprsMembershipVotingStorage) Erase

func (s *EprsMembershipVotingStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*EprsMembershipVotingStorage) GetByNumber

func (*EprsMembershipVotingStorage) GetEarliestUnfinishedVotings

func (s *EprsMembershipVotingStorage) GetEarliestUnfinishedVotings() ([]data.EprsMembershipVoting, error)

func (*EprsMembershipVotingStorage) GetLatest

GetLatest eprs membership voting.

func (*EprsMembershipVotingStorage) Insert

func (*EprsMembershipVotingStorage) Select

Select votings with params.

func (*EprsMembershipVotingStorage) Update

type EprsParametersVotingStorage

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

EprsParametersVotingStorage implements data.EprsParametersVotingStorage.

func (*EprsParametersVotingStorage) Erase

func (s *EprsParametersVotingStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*EprsParametersVotingStorage) GetByNumber

func (*EprsParametersVotingStorage) GetEarliestUnfinishedVotings

func (s *EprsParametersVotingStorage) GetEarliestUnfinishedVotings() ([]data.EprsParametersVoting, error)

func (*EprsParametersVotingStorage) GetLatest

GetLatest eprs parameters voting.

func (*EprsParametersVotingStorage) Insert

func (*EprsParametersVotingStorage) Select

Select votings with params.

func (*EprsParametersVotingStorage) Update

type GeneralUpdateVotingStorage

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

GeneralUpdateVotingStorage implements data.GeneralUpdateVotingStorage.

func (*GeneralUpdateVotingStorage) Erase

func (s *GeneralUpdateVotingStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*GeneralUpdateVotingStorage) GetByNumber

func (s *GeneralUpdateVotingStorage) GetByNumber(number uint64) (*data.GeneralUpdateVoting, error)

func (*GeneralUpdateVotingStorage) GetEarliestUnfinishedVotings

func (s *GeneralUpdateVotingStorage) GetEarliestUnfinishedVotings() ([]data.GeneralUpdateVoting, error)

func (*GeneralUpdateVotingStorage) GetLatest

GetLatest general update voting.

func (*GeneralUpdateVotingStorage) Insert

func (*GeneralUpdateVotingStorage) Select

Select votings with params.

func (*GeneralUpdateVotingStorage) Update

type PaymentStorage

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

func (*PaymentStorage) Get

func (s *PaymentStorage) Get(txHash string) (*data.Payment, error)

func (*PaymentStorage) Insert

func (s *PaymentStorage) Insert(payments ...data.Payment) error

func (*PaymentStorage) Select

func (s *PaymentStorage) Select(params *data.SelectPaymentsParams) ([]data.Payment, error)

type QTokenHolderVotesStorage added in v1.0.0

type QTokenHolderVotesStorage struct {
	*VotingEventsStorage
}

QTokenHolderVotesStorage implements data.QTokenHolderVotesStorage.

func (*QTokenHolderVotesStorage) SelectAggregated added in v1.0.0

SelectAggregated q token holder aggregated votes with params.

type RootNodeApprovalsStorage added in v1.0.0

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

RootNodeApprovalsStorage implements data.RootNodeApproval.

func (*RootNodeApprovalsStorage) GetLatest added in v1.0.0

func (s *RootNodeApprovalsStorage) GetLatest() (approval *data.RootNodeApproval, err error)

func (*RootNodeApprovalsStorage) Insert added in v1.0.0

func (s *RootNodeApprovalsStorage) Insert(approval *data.RootNodeApproval) error

func (*RootNodeApprovalsStorage) Select added in v1.0.0

Select blocks with params.

type RootNodeProposalsStorage added in v1.0.0

type RootNodeProposalsStorage struct {
	*VotingEventsStorage
}

RootNodeProposalsStorage implements data.VoteStorage.

func (*RootNodeProposalsStorage) SelectAggregated added in v1.0.0

SelectAggregated root node aggregated proposals with params.

type RootNodeVotesStorage added in v1.0.0

type RootNodeVotesStorage struct {
	*VotingEventsStorage
}

RootNodeVotesStorage implements data.VoteStorage.

func (*RootNodeVotesStorage) SelectAggregated added in v1.0.0

SelectAggregated root node aggregated votes with params.

type RootnodesSlashingVotingStorage

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

RootnodesSlashingVotingStorage implements data.RootnodesSlashingVotingStorage.

func (*RootnodesSlashingVotingStorage) Erase

func (s *RootnodesSlashingVotingStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*RootnodesSlashingVotingStorage) GetByNumber

func (*RootnodesSlashingVotingStorage) GetEarliestUnfinishedVotings

func (s *RootnodesSlashingVotingStorage) GetEarliestUnfinishedVotings() ([]data.RootnodesSlashingVoting, error)

func (*RootnodesSlashingVotingStorage) GetLatest

GetLatest rootnodes slashing voting.

func (*RootnodesSlashingVotingStorage) Insert

func (*RootnodesSlashingVotingStorage) Select

Select votings with params.

func (*RootnodesSlashingVotingStorage) Update

type RootsMembershipStorage added in v1.0.0

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

RootsMembershipStorage implements data.RootsVotingStorage.

func (*RootsMembershipStorage) Erase added in v1.0.0

func (s *RootsMembershipStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*RootsMembershipStorage) FindNextPeriodByAddress added in v1.0.0

func (s *RootsMembershipStorage) FindNextPeriodByAddress(rootAddress string, startBlock int64) (*data.RootsMembership, error)

func (*RootsMembershipStorage) GetLatest added in v1.0.0

func (s *RootsMembershipStorage) GetLatest() (*data.RootsMembership, error)

GetLatest roots voting.

func (*RootsMembershipStorage) GetUnfinishedPeriodByAddress added in v1.0.0

func (s *RootsMembershipStorage) GetUnfinishedPeriodByAddress(rootAddress string) (*data.RootsMembership, error)

func (*RootsMembershipStorage) GetUnfinishedPeriods added in v1.0.0

func (s *RootsMembershipStorage) GetUnfinishedPeriods() ([]data.RootsMembership, error)

func (*RootsMembershipStorage) Insert added in v1.0.0

func (s *RootsMembershipStorage) Insert(rnMembership *data.RootsMembership) error

func (*RootsMembershipStorage) Select added in v1.0.0

Select root membership periods with params.

func (*RootsMembershipStorage) Update added in v1.0.0

func (s *RootsMembershipStorage) Update(rnMembership *data.RootsMembership) error

type RootsVotingStorage

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

RootsVotingStorage implements data.RootsVotingStorage.

func (*RootsVotingStorage) Erase

func (s *RootsVotingStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*RootsVotingStorage) GetByNumber

func (s *RootsVotingStorage) GetByNumber(number uint64) (*data.RootsVoting, error)

func (*RootsVotingStorage) GetEarliestUnfinishedVotingIds added in v1.0.0

func (s *RootsVotingStorage) GetEarliestUnfinishedVotingIds() ([]uint64, error)

func (*RootsVotingStorage) GetLatest

func (s *RootsVotingStorage) GetLatest() (*data.RootsVoting, error)

GetLatest roots voting.

func (*RootsVotingStorage) Insert

func (s *RootsVotingStorage) Insert(voting *data.RootsVoting) error

func (*RootsVotingStorage) Select

Select votings with params.

func (*RootsVotingStorage) Update

func (s *RootsVotingStorage) Update(voting *data.RootsVoting) error

type Storage

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

Storage backed by postgres.

func New

func New(db *pgdb.DB) *Storage

New Storage.

func (*Storage) Blocks

func (s *Storage) Blocks() data.BlockStorage

Blocks.

func (*Storage) Clone

func (s *Storage) Clone() data.Storage

Clone Storage for a new tx.

func (*Storage) ConstitutionVotings

func (s *Storage) ConstitutionVotings() data.ConstitutionVotingStorage

ConstitutionVotings storage.

func (*Storage) ContractRegistryAddressVotings

func (s *Storage) ContractRegistryAddressVotings() data.ContractRegistryAddressVotingStorage

ContractRegistryAddressVotings storage.

func (*Storage) ContractRegistryUpgradeVotings

func (s *Storage) ContractRegistryUpgradeVotings() data.ContractRegistryUpgradeVotingStorage

ContractRegistryUpgradeVotings storage.

func (*Storage) EmergencyUpdateVotings

func (s *Storage) EmergencyUpdateVotings() data.EmergencyUpdateVotingStorage

EmergencyUpdateVotings storage.

func (*Storage) EpdrMembershipVotings

func (s *Storage) EpdrMembershipVotings() data.EpdrMembershipVotingStorage

EpdrMembershipVotings storage.

func (*Storage) EpdrParametersVotings

func (s *Storage) EpdrParametersVotings() data.EpdrParametersVotingStorage

EpdrParametersVotings storage.

func (*Storage) EpqfiMembershipVotings

func (s *Storage) EpqfiMembershipVotings() data.EpqfiMembershipVotingStorage

EpqfiMembershipVotings storage.

func (*Storage) EpqfiParametersVotings

func (s *Storage) EpqfiParametersVotings() data.EpqfiParametersVotingStorage

EpqfiParametersVotings storage.

func (*Storage) EprsMembershipVotings

func (s *Storage) EprsMembershipVotings() data.EprsMembershipVotingStorage

EprsMembershipVotings storage.

func (*Storage) EprsParametersVotings

func (s *Storage) EprsParametersVotings() data.EprsParametersVotingStorage

EprsParametersVotings storage.

func (*Storage) ExecInTx

func (s *Storage) ExecInTx(fn func() error) error

ExecInTx isolates execution of fn within sql transaction.

func (*Storage) GeneralUpdateVotings

func (s *Storage) GeneralUpdateVotings() data.GeneralUpdateVotingStorage

GeneralUpdateVotings storage.

func (*Storage) LayerZeroLists added in v1.0.0

func (s *Storage) LayerZeroLists() data.LayerZeroListStorage

LayerZeroLists storage

func (*Storage) Payments

func (s *Storage) Payments() data.PaymentsStorage

Payments storage.

func (*Storage) QTokenHolderVotes added in v1.0.0

func (s *Storage) QTokenHolderVotes() data.QTokenHolderVotesStorage

QTokenHolderVotes storage.

func (*Storage) RootNodeApprovals added in v1.0.0

func (s *Storage) RootNodeApprovals() data.RootNodeApprovalsStorage

RootNodeApprovals storage.

func (*Storage) RootNodeProposals added in v1.0.0

func (s *Storage) RootNodeProposals() data.RootNodeProposalsStorage

RootNodeProposals storage.

func (*Storage) RootNodeVotes added in v1.0.0

func (s *Storage) RootNodeVotes() data.RootNodeVotesStorage

RootNodeVotes storage.

func (*Storage) RootnodesSlashingVotings

func (s *Storage) RootnodesSlashingVotings() data.RootnodesSlashingVotingStorage

RootnodesSlashingVotings storage.

func (*Storage) RootsMembership added in v1.0.0

func (s *Storage) RootsMembership() data.RootsMembershipStorage

RootsMembership storage.

func (*Storage) RootsVotings

func (s *Storage) RootsVotings() data.RootsVotingStorage

RootsVotings storage.

func (*Storage) SummaryMetrics

func (s *Storage) SummaryMetrics() data.SummaryMetricsStorage

SummaryMetrics.

func (*Storage) SystemContracts added in v1.0.0

func (s *Storage) SystemContracts() data.SystemContractsStorage

SystemContracts storage.

func (*Storage) Transactions

func (s *Storage) Transactions() data.TransactionStorage

Transactions.

func (*Storage) ValidatorsSlashingVotings

func (s *Storage) ValidatorsSlashingVotings() data.ValidatorsSlashingVotingStorage

ValidatorsSlashingVotings storage.

func (*Storage) Variables added in v1.0.0

func (s *Storage) Variables() data.VariableStorage

Variables storage.

func (*Storage) VotingAgents added in v1.0.0

func (s *Storage) VotingAgents() data.VotingAgentStorage

VotingAgents storage.

func (*Storage) Votings

func (s *Storage) Votings() data.VotingStorage

Payments storage.

type SummaryMetricsStorage

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

SummaryMetricsStorage implements data.SummaryMetricsStorage.

func (*SummaryMetricsStorage) Select

Select blocks with params. The SQL query: WITH block_metrics AS (

SELECT
    MAX(id) - 1000*101 + 1 AS min_block,
    MAX(id) AS max_block
FROM blocks

), calculations AS (

SELECT
    b.mainaccount AS main_account,
    SUM(CASE WHEN b.signer = b.inturn_signer THEN 1 ELSE 0 END) AS total_inturn_blocks,
    COUNT(b.inturn_signer) AS total_due_blocks,
    b.signer AS signer
FROM blocks b
WHERE b.id BETWEEN (SELECT min_block FROM block_metrics) AND (SELECT max_block FROM block_metrics)
GROUP BY b.mainaccount, b.signer

) SELECT

main_account,
signer,
total_inturn_blocks,
total_due_blocks,
total_due_blocks-total_inturn_blocks AS total_outofturn_blocks,
total_inturn_blocks::float / total_due_blocks AS availability

FROM calculations;

type TransactionStorage

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

func (*TransactionStorage) Get

func (s *TransactionStorage) Get(hash string) (*data.Transaction, error)

Get Transaction by hash.

func (*TransactionStorage) Insert

func (s *TransactionStorage) Insert(txs ...data.Transaction) error

Insert txs.

func (*TransactionStorage) Select

func (s *TransactionStorage) Select(params *data.SelectTxsParams) ([]data.Transaction, error)

Select txs.

type ValidatorsSlashingVotingStorage

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

ValidatorsSlashingVotingStorage implements data.ValidatorsSlashingVotingStorage.

func (*ValidatorsSlashingVotingStorage) Erase

func (s *ValidatorsSlashingVotingStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*ValidatorsSlashingVotingStorage) GetByNumber

func (*ValidatorsSlashingVotingStorage) GetEarliestUnfinishedVotings

func (s *ValidatorsSlashingVotingStorage) GetEarliestUnfinishedVotings() ([]data.ValidatorsSlashingVoting, error)

func (*ValidatorsSlashingVotingStorage) GetLatest

GetLatest validators slashing voting.

func (*ValidatorsSlashingVotingStorage) Insert

func (*ValidatorsSlashingVotingStorage) Select

Select votings with params.

func (*ValidatorsSlashingVotingStorage) Update

type VariableStorage added in v1.0.0

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

VariableStorage implements data.VariableStorage.

func (*VariableStorage) Erase added in v1.0.0

func (s *VariableStorage) Erase(name string) error

Erase all history starting fromID inclusively.

func (*VariableStorage) GetByName added in v1.0.0

func (s *VariableStorage) GetByName(name string) (*data.Variable, error)

func (*VariableStorage) Insert added in v1.0.0

func (s *VariableStorage) Insert(variable *data.Variable) error

func (*VariableStorage) Update added in v1.0.0

func (s *VariableStorage) Update(variable *data.Variable) error

type VotingAgentStorage added in v1.0.0

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

VotingAgentStorage implements data.VotingAgent.

func (*VotingAgentStorage) GetByVotingAgents added in v1.0.0

func (s *VotingAgentStorage) GetByVotingAgents(address ...string) ([]data.VotingAgent, error)

func (*VotingAgentStorage) GetLatestBlock added in v1.0.0

func (s *VotingAgentStorage) GetLatestBlock() (int64, error)

func (*VotingAgentStorage) Insert added in v1.0.0

func (s *VotingAgentStorage) Insert(agents ...data.VotingAgent) error

type VotingEventsStorage added in v1.0.0

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

VotingEventsStorage implements data.VotingEvent.

func (*VotingEventsStorage) Erase added in v1.0.0

func (s *VotingEventsStorage) Erase(fromID uint64) error

Erase all history starting fromID inclusively.

func (*VotingEventsStorage) GetByLatestByType added in v1.0.0

func (s *VotingEventsStorage) GetByLatestByType(votingType string) (*data.VotingEvent, error)

func (*VotingEventsStorage) Insert added in v1.0.0

func (s *VotingEventsStorage) Insert(votingEvents ...data.VotingEvent) error

func (*VotingEventsStorage) Select added in v1.0.0

func (s *VotingEventsStorage) Select(params data.SelectVotingEventsParams, addresses []string) ([]data.VotingEvent, error)

Select current onchain root nodes votes with params.

type VotingStorage

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

VotingStorage implements all votings from package data.

func (*VotingStorage) Select

func (s *VotingStorage) Select(params *data.SelectVotingsParams) ([]interface{}, error)

Select blocks with params.

func (*VotingStorage) Union

func (s *VotingStorage) Union(mainQuery *squirrel.SelectBuilder, query squirrel.SelectBuilder) error

Jump to

Keyboard shortcuts

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