Documentation ¶
Index ¶
- Variables
- func NewDecorateUseCase(cfg *config.Config, db DecorateStore) *decorateUseCase
- func NewGetByAddressHttpHandler(db *store.Store, c *client.Client) *getByAddressHttpHandler
- func NewGetByAddressUseCase(db *store.Store) *getByAddressUseCase
- func NewGetByHeightHttpHandler(cfg *config.Config, db *store.Store, c *client.Client) *getByHeightHttpHandler
- func NewGetByHeightUseCase(cfg *config.Config, db *store.Store, client *client.Client) *getByHeightUseCase
- func NewGetForMinHeightHttpHandler(db *store.Store, c *client.Client) *getForMinHeightHttpHandler
- func NewGetForMinHeightUseCase(db *store.Store) *getForMinHeightUseCase
- func NewGetSummaryHttpHandler(db *store.Store, c *client.Client) *getSummaryHttpHandler
- func NewGetSummaryUseCase(db *store.Store) *getSummaryUseCase
- type AggDetailsView
- type AggListView
- type DecorateCmdHandler
- type DecorateStore
- type GetByEntityUidRequest
- type GetByHeightRequest
- type GetForMinHeightRequest
- type GetSummaryRequest
- type SeqListItem
- type SeqListView
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidFile = errors.New("unexpected file format") ErrMissingFile = errors.New("missing file path") )
View Source
var (
ErrInvalidIntervalPeriod = errors.New("invalid interval and/or period")
)
Functions ¶
func NewDecorateUseCase ¶ added in v0.5.0
func NewDecorateUseCase(cfg *config.Config, db DecorateStore) *decorateUseCase
NewDecorateUseCase decorate validators based on file data. It parses a csv file containing logos, entity names and entity addresses for a validator, then updates the logo_url and entity_name for each entry
func NewGetByAddressHttpHandler ¶ added in v0.4.2
func NewGetByAddressUseCase ¶ added in v0.4.2
func NewGetByHeightUseCase ¶
func NewGetSummaryHttpHandler ¶ added in v0.4.0
func NewGetSummaryUseCase ¶ added in v0.4.0
Types ¶
type AggDetailsView ¶
type AggDetailsView struct { *model.Model *model.Aggregate Address string `json:"address"` EntityUID string `json:"entity_uid"` RecentTendermintAddress string `json:"recent_tendermint_address"` RecentVotingPower int64 `json:"recent_voting_power"` RecentActiveEscrowBalance types.Quantity `json:"recent_active_escrow_balance"` RecentCommission types.Quantity `json:"recent_commission"` RecentAsValidatorHeight int64 `json:"recent_as_validator_height"` RecentProposedHeight int64 `json:"recent_proposed_height"` AccumulatedProposedCount int64 `json:"accumulated_proposed_count"` Uptime float64 `json:"uptime"` LogoURL string `json:"logo_url"` EntityName string `json:"entity_name"` LastSequences []model.ValidatorSeq `json:"last_sequences"` }
func ToAggDetailsView ¶
func ToAggDetailsView(m *model.ValidatorAgg, sequences []model.ValidatorSeq) *AggDetailsView
type AggListView ¶
type AggListView struct {
Items []model.ValidatorAgg `json:"items"`
}
func ToAggListView ¶
func ToAggListView(ms []model.ValidatorAgg) *AggListView
type DecorateCmdHandler ¶ added in v0.5.0
type DecorateCmdHandler struct {
// contains filtered or unexported fields
}
func NewDecorateCmdHandler ¶ added in v0.5.0
type DecorateStore ¶ added in v0.5.0
type DecorateStore interface { CreateOrUpdate(val *model.ValidatorAgg) error FindByAddress(address string) (*model.ValidatorAgg, error) }
type GetByEntityUidRequest ¶
type GetByHeightRequest ¶
type GetByHeightRequest struct {
Height *int64 `form:"height" binding:"-"`
}
type GetForMinHeightRequest ¶
type GetForMinHeightRequest struct {
Height *int64 `uri:"height" binding:"required"`
}
type GetSummaryRequest ¶ added in v0.4.0
type GetSummaryRequest struct { Interval types.SummaryInterval `form:"interval" binding:"required"` Period string `form:"period" binding:"required"` Address string `form:"address" binding:"-"` }
type SeqListItem ¶ added in v0.4.2
type SeqListItem struct { *model.Model *model.Sequence EntityUID string `json:"entity_uid"` Address string `json:"address"` Proposed bool `json:"proposed"` VotingPower int64 `json:"voting_power"` ActiveEscrowBalance types.Quantity `json:"active_escrow_balance"` Commission types.Quantity `json:"commission"` Rewards types.Quantity `json:"rewards"` PrecommitValidated *bool `json:"precommit_validated"` EntityName string `json:"entity_name"` }
type SeqListView ¶
type SeqListView struct {
Items []SeqListItem `json:"items"`
}
func ToSeqListView ¶
func ToSeqListView(validatorSeqs []model.ValidatorSeq, validatorAggs []model.ValidatorAgg) SeqListView
Click to show internal directories.
Click to hide internal directories.