Documentation ¶
Index ¶
- Variables
- type Driver
- func (d *Driver) GetAccounts(ctx context.Context, params structs.AccountParams) (accounts []structs.Account, err error)
- func (d *Driver) GetContractEvents(ctx context.Context, params structs.EventParams) (contractEvents []structs.ContractEvent, err error)
- func (d *Driver) GetDelegationTimeline(ctx context.Context, params structs.DelegationParams) (delegations []structs.Delegation, err error)
- func (d *Driver) GetDelegations(ctx context.Context, params structs.DelegationParams) (delegations []structs.Delegation, err error)
- func (d *Driver) GetNodes(ctx context.Context, params structs.NodeParams) (nodes []structs.Node, err error)
- func (d *Driver) GetSystemEvents(ctx context.Context, params structs.SystemEventParams) (systemEvents []structs.SystemEvent, err error)
- func (d *Driver) GetTypesSummaryDelegations(ctx context.Context, params structs.DelegationParams) (delegations []structs.DelegationSummary, err error)
- func (d *Driver) GetValidatorStatistics(ctx context.Context, params structs.ValidatorStatisticsParams) (validatorStatistics []structs.ValidatorStatistics, err error)
- func (d *Driver) GetValidatorStatisticsTimeline(ctx context.Context, params structs.ValidatorStatisticsParams) (validatorStatistics []structs.ValidatorStatistics, err error)
- func (d *Driver) GetValidators(ctx context.Context, params structs.ValidatorParams) (validators []structs.Validator, err error)
- func (d *Driver) SaveAccount(ctx context.Context, a structs.Account) error
- func (d *Driver) SaveContractEvent(ctx context.Context, ce structs.ContractEvent) error
- func (d *Driver) SaveDelegation(ctx context.Context, dl structs.Delegation) error
- func (d *Driver) SaveNodes(ctx context.Context, nodes []structs.Node, removedNodeAddress common.Address) error
- func (d *Driver) SaveSystemEvent(ctx context.Context, se structs.SystemEvent) error
- func (d *Driver) SaveValidator(ctx context.Context, v structs.Validator) error
- func (d *Driver) SaveValidatorStatistic(ctx context.Context, validatorID *big.Int, blockHeight uint64, ...) (err error)
- func (d *Driver) UpdateCountsOfValidator(ctx context.Context, validatorID *big.Int) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingParameter = errors.New("missing parameter") ErrNotFound = errors.New("record not found") )
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is postgres database driver implementation
func (*Driver) GetAccounts ¶
func (d *Driver) GetAccounts(ctx context.Context, params structs.AccountParams) (accounts []structs.Account, err error)
GetAccounts gets accounts
func (*Driver) GetContractEvents ¶
func (d *Driver) GetContractEvents(ctx context.Context, params structs.EventParams) (contractEvents []structs.ContractEvent, err error)
GetContractEvents gets contract events
func (*Driver) GetDelegationTimeline ¶
func (d *Driver) GetDelegationTimeline(ctx context.Context, params structs.DelegationParams) (delegations []structs.Delegation, err error)
GetDelegationTimeline gets all delegation information over time
func (*Driver) GetDelegations ¶
func (d *Driver) GetDelegations(ctx context.Context, params structs.DelegationParams) (delegations []structs.Delegation, err error)
func (*Driver) GetNodes ¶
func (d *Driver) GetNodes(ctx context.Context, params structs.NodeParams) (nodes []structs.Node, err error)
GetNodes gets nodes
func (*Driver) GetSystemEvents ¶
func (d *Driver) GetSystemEvents(ctx context.Context, params structs.SystemEventParams) (systemEvents []structs.SystemEvent, err error)
GetSystemEvents gets contract events
func (*Driver) GetTypesSummaryDelegations ¶ added in v0.0.4
func (d *Driver) GetTypesSummaryDelegations(ctx context.Context, params structs.DelegationParams) (delegations []structs.DelegationSummary, err error)
func (*Driver) GetValidatorStatistics ¶
func (d *Driver) GetValidatorStatistics(ctx context.Context, params structs.ValidatorStatisticsParams) (validatorStatistics []structs.ValidatorStatistics, err error)
func (*Driver) GetValidatorStatisticsTimeline ¶
func (d *Driver) GetValidatorStatisticsTimeline(ctx context.Context, params structs.ValidatorStatisticsParams) (validatorStatistics []structs.ValidatorStatistics, err error)
func (*Driver) GetValidators ¶
func (d *Driver) GetValidators(ctx context.Context, params structs.ValidatorParams) (validators []structs.Validator, err error)
GetValidators gets validators by params
func (*Driver) SaveAccount ¶
SaveAccount saves account
func (*Driver) SaveContractEvent ¶
SaveEvent saves contract events
func (*Driver) SaveDelegation ¶
SaveDelegation saves delegation
func (*Driver) SaveNodes ¶
func (d *Driver) SaveNodes(ctx context.Context, nodes []structs.Node, removedNodeAddress common.Address) error
SaveNodes saves nodes
func (*Driver) SaveSystemEvent ¶
SaveSystemEvent saves system events
func (*Driver) SaveValidator ¶
SaveValidator saves validator
func (*Driver) SaveValidatorStatistic ¶
Click to show internal directories.
Click to hide internal directories.