validator

package
v0.5.2-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 9 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 *psql.Store, c figmentclient.Client) *getByAddressHttpHandler

func NewGetByAddressUseCase

func NewGetByAddressUseCase(db *psql.Store) *getByAddressUseCase

func NewGetByHeightHttpHandler

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

func NewGetByHeightUseCase

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

func NewGetForMinHeightHttpHandler

func NewGetForMinHeightHttpHandler(db *psql.Store, c figmentclient.Client) *getForMinHeightHttpHandler

func NewGetForMinHeightUseCase

func NewGetForMinHeightUseCase(db *psql.Store) *getForMinHeightUseCase

func NewGetSummaryHttpHandler

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

func NewGetSummaryUseCase

func NewGetSummaryUseCase(db *psql.Store) *getSummaryUseCase

Types

type AggDetailsView

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

	Address                 string  `json:"address"`
	RecentAsValidatorHeight int64   `json:"recent_as_validator_height"`
	RecentName              string  `json:"recent_name"`
	RecentMetadataUrl       string  `json:"recent_metadata_url"`
	Uptime                  float64 `json:"uptime"`

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

func ToAggDetailsView

func ToAggDetailsView(m *model.ValidatorAgg, validatorSequences []model.ValidatorSeq) *AggDetailsView

type AggListView

type AggListView struct {
	Items []model.ValidatorAgg `json:"items"`
}

func ToAggListView

func ToAggListView(ms []model.ValidatorAgg) *AggListView

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 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"`
	Address  string                `form:"address" binding:"-"`
}

type SeqListItem

type SeqListItem struct {
	*model.Sequence

	Address           string  `json:"address"`
	RecentName        string  `json:"recent_name"`
	RecentMetadataUrl string  `json:"recent_metadata_url"`
	Signed            *bool   `json:"signed"`
	Score             float64 `json:"score"`
	Affiliation       string  `json:"affiliation"`
}

type SeqListView

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

func ToSeqListView

func ToSeqListView(validatorSeqs []model.ValidatorSeq) SeqListView

Jump to

Keyboard shortcuts

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