block

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func NewGetBlockSummaryHttpHandler added in v0.4.0

func NewGetBlockSummaryHttpHandler(db *store.Store, client *client.Client) *getBlockSummaryHttpHandler

func NewGetBlockSummaryUseCase added in v0.4.0

func NewGetBlockSummaryUseCase(db *store.Store) *getBlockSummaryUseCase

func NewGetBlockTimesHttpHandler

func NewGetBlockTimesHttpHandler(db *store.Store, client *client.Client) *getBlockTimesHttpHandler

func NewGetBlockTimesUseCase

func NewGetBlockTimesUseCase(db *store.Store) *getBlockTimesUseCase

func NewGetByHeightHttpHandler

func NewGetByHeightHttpHandler(db *store.Store, c *client.Client) *getByHeightHttpHandler

func NewGetByHeightUseCase

func NewGetByHeightUseCase(db *store.Store, c *client.Client) *getByHeightUseCase

Types

type DetailsView

type DetailsView struct {
	AppVersion         uint64     `json:"app_version"`
	BlockVersion       uint64     `json:"block_version"`
	ChainId            string     `json:"chain_id"`
	Height             int64      `json:"height"`
	Time               types.Time `json:"time"`
	LastBlockIdHash    string     `json:"last_block_id_hash"`
	LastCommitHash     string     `json:"last_commit_hash"`
	DataHash           string     `json:"data_hash"`
	ValidatorsHash     string     `json:"validators_hash"`
	NextValidatorsHash string     `json:"next_validators_hash"`
	ConsensusHash      string     `json:"consensus_hash"`
	AppHash            string     `json:"app_hash"`
	LastResultsHash    string     `json:"last_results_hash"`
	EvidenceHash       string     `json:"evidence_hash"`
	ProposerAddress    string     `json:"proposer_address"`
}

func ToDetailsView

func ToDetailsView(rawBlock *blockpb.Block) *DetailsView

type GetBlockTimesForIntervalRequest

type GetBlockTimesForIntervalRequest struct {
	Interval types.SummaryInterval `form:"interval" binding:"required"`
	Period   string                `form:"period" binding:"required"`
}

type GetBlockTimesRequest

type GetBlockTimesRequest struct {
	Limit int64 `uri:"limit" binding:"required"`
}

type Request

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

Jump to

Keyboard shortcuts

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