Documentation ¶
Index ¶
- Variables
- 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 NewGetByStashAccountHttpHandler(db *store.Store, c *client.Client) *getByStashAccountHttpHandler
- func NewGetByStashAccountUseCase(db *store.Store) *getByStashAccountUseCase
- 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 EraSeqListItem
- type GetByEntityUidRequest
- type GetByHeightRequest
- type GetForMinHeightRequest
- type GetSummaryRequest
- type SeqListView
- type SessionSeqListItem
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidIntervalPeriod = errors.New("invalid interval and/or period")
)
Functions ¶
func NewGetByHeightUseCase ¶
func NewGetSummaryUseCase ¶
Types ¶
type AggDetailsView ¶
type AggDetailsView struct { *model.Model *model.Aggregate StashAccount string `json:"stash_account"` RecentAsValidatorHeight int64 `json:"recent_as_validator_height"` DisplayName string `json:"display_name"` Uptime float64 `json:"uptime"` LastSessionSequences []model.ValidatorSessionSeq `json:"last_session_sequences"` LastEraSequences []model.ValidatorEraSeq `json:"last_era_sequences"` LastDelegations []*common.Delegation `json:"delegations"` }
func ToAggDetailsView ¶
func ToAggDetailsView(m *model.ValidatorAgg, sessionSequences []model.ValidatorSessionSeq, eraSequences []model.ValidatorEraSeq, accountEraSequences []model.AccountEraSeq) *AggDetailsView
type AggListView ¶
type AggListView struct {
Items []model.ValidatorAgg `json:"items"`
}
func ToAggListView ¶
func ToAggListView(ms []model.ValidatorAgg) *AggListView
type EraSeqListItem ¶
type EraSeqListItem struct { *model.EraSequence StashAccount string `json:"stash_account"` ControllerAccount string `json:"controller_account"` SessionAccounts pq.StringArray `json:"session_accounts"` Index int64 `json:"index"` TotalStake types.Quantity `json:"total_stake"` OwnStake types.Quantity `json:"own_stake"` StakersStake types.Quantity `json:"stakers_stake"` RewardPoints int64 `json:"reward_points"` Commission int64 `json:"commission"` StakersCount int `json:"stakers_count"` }
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 ¶
type GetSummaryRequest struct { Interval types.SummaryInterval `form:"interval" binding:"required"` Period string `form:"period" binding:"required"` StashAccount string `form:"stash_account" binding:"-"` }
type SeqListView ¶
type SeqListView struct { SessionItems []SessionSeqListItem `json:"session_items"` EraItems []EraSeqListItem `json:"era_items"` }
func ToSeqListView ¶
func ToSeqListView(validatorSessionSeqs []model.ValidatorSessionSeq, validatorEraSeqs []model.ValidatorEraSeq) SeqListView
type SessionSeqListItem ¶
type SessionSeqListItem struct { *model.SessionSequence DisplayName string `json:"display_name"` StashAccount string `json:"stash_account"` Online bool `json:"online"` }
Click to show internal directories.
Click to hide internal directories.