validatorgroup

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidIntervalPeriod = errors.New("invalid interval and/or period")
)

Functions

func NewGetByAddressHttpHandler

func NewGetByAddressHttpHandler(db *store.Store, c figmentclient.Client) *getByAddressHttpHandler

func NewGetByAddressUseCase

func NewGetByAddressUseCase(db *store.Store) *getByAddressUseCase

func NewGetByHeightHttpHandler

func NewGetByHeightHttpHandler(cfg *config.Config, db *store.Store, c figmentclient.Client) *getByHeightHttpHandler

func NewGetByHeightUseCase

func NewGetByHeightUseCase(cfg *config.Config, db *store.Store, client figmentclient.Client) *getByHeightUseCase

func NewGetSummaryHttpHandler

func NewGetSummaryHttpHandler(db *store.Store, c figmentclient.Client) *getSummaryHttpHandler

func NewGetSummaryUseCase

func NewGetSummaryUseCase(db *store.Store) *getSummaryUseCase

Types

type AggDetailsView

type AggDetailsView struct {
	*model.Model
	*model.Aggregate

	Address string `json:"address"`

	LastSequences []model.ValidatorGroupSeq `json:"last_sequences"`
}

func ToAggDetailsView

func ToAggDetailsView(m *model.ValidatorGroupAgg, validatorSequences []model.ValidatorGroupSeq) *AggDetailsView

type GetByEntityUidRequest

type GetByEntityUidRequest struct {
	Address        string `uri:"address" binding:"required"`
	SequencesLimit int64  `form:"sequences_limit" binding:"-"`
}

type GetByHeightRequest

type GetByHeightRequest struct {
	Height *int64 `form:"height" binding:"-"`
}

type GetSummaryRequest

type GetSummaryRequest struct {
	Interval types.SummaryInterval `form:"interval" binding:"required"`
	Period   string                `form:"period" binding:"required"`
	Address  string                `form:"address" binding:"-"`
}

type SeqListItem

type SeqListItem struct {
	*model.Sequence

	Address         string         `json:"address"`
	Commission      types.Quantity `json:"commission"`
	ActiveVotes     types.Quantity `json:"active_votes"`
	ActiveVoteUnits types.Quantity `json:"active_vote_units"`
	PendingVotes    types.Quantity `json:"pending_votes"`
	MembersCount    int            `json:"members_count"`
}

type SeqListView

type SeqListView struct {
	Items []SeqListItem `json:"items"`
}

func ToSeqListView

func ToSeqListView(validatorSeqs []model.ValidatorGroupSeq) SeqListView

Jump to

Keyboard shortcuts

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