view

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountFilter

type CountFilter struct {
	MaybeStatus []string
}

type ListValidatorBlockCommitmentRow

type ListValidatorBlockCommitmentRow struct {
	ValidatorBlockCommitmentRow

	Moniker string `json:"moniker"`
}

type ListValidatorRow

type ListValidatorRow struct {
	ValidatorRow

	PowerPercentage           string `json:"powerPercentage"`
	CumulativePowerPercentage string `json:"cumulativePowerPercentage"`
}

type ValidatorActivities

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

BlockEvents projection view implemented by relational database

func NewValidatorActivities

func NewValidatorActivities(handle *rdb.Handle) *ValidatorActivities

func (*ValidatorActivities) Insert

func (validatorActivitiesView *ValidatorActivities) Insert(validatorActivity *ValidatorActivityRow) error

func (*ValidatorActivities) InsertAll

func (validatorActivitiesView *ValidatorActivities) InsertAll(validatorActivities []ValidatorActivityRow) error

type ValidatorActivitiesListFilter

type ValidatorActivitiesListFilter struct {
	MaybeOperatorAddress      *string
	MaybeConsensusNodeAddress *string
}

type ValidatorActivitiesListOrder

type ValidatorActivitiesListOrder struct {
	MaybeBlockHeight *view.ORDER
}

type ValidatorActivitiesTotal

type ValidatorActivitiesTotal struct {
	*view.Total
}

func NewValidatorActivitiesTotal

func NewValidatorActivitiesTotal(rdbHandle *rdb.Handle) *ValidatorActivitiesTotal

type ValidatorActivityRow

type ValidatorActivityRow struct {
	BlockHeight          int64                    `json:"blockHeight"`
	BlockTime            utctime.UTCTime          `json:"blockTime"`
	BlockHash            string                   `json:"blockHash"`
	MaybeTransactionHash *string                  `json:"transactionHash"`
	OperatorAddress      string                   `json:"operatorAddress"`
	Success              bool                     `json:"success"`
	Data                 ValidatorActivityRowData `json:"activity"`
}

type ValidatorActivityRowData

type ValidatorActivityRowData struct {
	Type    string      `json:"type"`
	Content interface{} `json:"content"`
}

type ValidatorBlockCommitmentRow

type ValidatorBlockCommitmentRow struct {
	MaybeId              *int64          `json:"-"`
	ConsensusNodeAddress string          `json:"consensusNodeAddress"`
	BlockHeight          int64           `json:"blockHeight"`
	IsProposer           bool            `json:"isProposer"`
	Signature            string          `json:"signature"`
	Timestamp            utctime.UTCTime `json:"timestamp"`
}

type ValidatorBlockCommitments

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

func NewValidatorBlockCommitments

func NewValidatorBlockCommitments(handle *rdb.Handle) *ValidatorBlockCommitments

func (*ValidatorBlockCommitments) Insert

func (commitmentsView *ValidatorBlockCommitments) Insert(commitment ValidatorBlockCommitmentRow) error

func (*ValidatorBlockCommitments) InsertAll

func (commitmentsView *ValidatorBlockCommitments) InsertAll(commitments []ValidatorBlockCommitmentRow) error

type ValidatorBlockCommitmentsListFilter

type ValidatorBlockCommitmentsListFilter struct {
	MaybeBlockHeight                   *int64
	MaybeGreaterThanEqualToBlockHeight *int64 // TODO
	MaybeConsensusNodeAddress          *string
}

type ValidatorBlockCommitmentsTotal

type ValidatorBlockCommitmentsTotal struct {
	*view.Total
}

func NewValidatorBlockCommitmentsTotal

func NewValidatorBlockCommitmentsTotal(rdbHandle *rdb.Handle) *ValidatorBlockCommitmentsTotal

type ValidatorIdentity

type ValidatorIdentity struct {
	MaybeConsensusNodeAddress    *string
	MaybeOperatorAddress         *string
	MaybeInitialDelegatorAddress *string
}

type ValidatorRow

type ValidatorRow struct {
	MaybeId                 *int64     `json:"-"`
	OperatorAddress         string     `json:"operatorAddress"`
	ConsensusNodeAddress    string     `json:"consensusNodeAddress"`
	InitialDelegatorAddress string     `json:"initialDelegatorAddress"`
	TendermintPubkey        string     `json:"tendermintPubkey"`
	TendermintAddress       string     `json:"tendermintAddress"`
	Status                  string     `json:"status"`
	Jailed                  bool       `json:"jailed"`
	JoinedAtBlockHeight     int64      `json:"joinedAtBlockHeight"`
	Power                   string     `json:"power"`
	Moniker                 string     `json:"moniker"`
	Identity                string     `json:"identity"`
	Website                 string     `json:"website"`
	SecurityContact         string     `json:"securityContact"`
	Details                 string     `json:"details"`
	CommissionRate          string     `json:"commissionRate"`
	CommissionMaxRate       string     `json:"commissionMaxRate"`
	CommissionMaxChangeRate string     `json:"commissionMaxChangeRate"`
	MinSelfDelegation       string     `json:"minSelfDelegation"`
	TotalSignedBlock        int64      `json:"totalSignedBlock"`
	TotalActiveBlock        int64      `json:"totalActiveBlock"`
	ImpreciseUpTime         *big.Float `json:"impreciseUpTime"`
	VotedGovProposal        *big.Int   `json:"votedGovProposal"`
}

type Validators

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

func NewValidators

func NewValidators(handle *rdb.Handle) *Validators

func (*Validators) Count

func (validatorsView *Validators) Count(filter CountFilter) (int64, error)

func (*Validators) FindBy

func (validatorsView *Validators) FindBy(identity ValidatorIdentity) (*ValidatorRow, error)

func (*Validators) Insert

func (validatorsView *Validators) Insert(validator *ValidatorRow) error

func (*Validators) LastJoinedBlockHeight

func (validatorsView *Validators) LastJoinedBlockHeight(
	operatorAddress string,
	consensusNodeAddress string,
) (bool, int64, error)

func (*Validators) List

func (*Validators) ListAll

func (validatorsView *Validators) ListAll(
	filter ValidatorsListFilter,
	order ValidatorsListOrder,
) ([]ValidatorRow, error)

func (*Validators) Search

func (validatorsView *Validators) Search(keyword string) ([]ValidatorRow, error)

func (*Validators) Update

func (validatorsView *Validators) Update(validator *ValidatorRow) error

func (*Validators) UpdateAllValidatorUpTime added in v1.0.3

func (validatorsView *Validators) UpdateAllValidatorUpTime(validators []ValidatorRow) error

func (*Validators) Upsert

func (validatorsView *Validators) Upsert(validator *ValidatorRow) error

type ValidatorsListFilter

type ValidatorsListFilter struct {
	MaybeStatuses []constants.Status
}

type ValidatorsListOrder

type ValidatorsListOrder struct {
	MaybeStatus              *view.ORDER
	MaybePower               *view.ORDER
	MaybeCommission          *view.ORDER
	MaybeJoinedAtBlockHeight *view.ORDER
	MaybeImpreciseUpTime     *view.ORDER
}

Jump to

Keyboard shortcuts

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