validators

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const CacheBlocksCount = time.Duration(15)

cache time

Variables

This section is empty.

Functions

func ApplyRoutes

func ApplyRoutes(r *gin.RouterGroup)

ApplyRoutes applies router to the gin Engine

func GetAggregatedValidators

func GetAggregatedValidators(c *gin.Context)

func GetDelegators

func GetDelegators(c *gin.Context)

Get validator detail by public key

func GetValidator

func GetValidator(c *gin.Context)

Get validator detail by public key

func GetValidatorTransactions

func GetValidatorTransactions(c *gin.Context)

Get list of transaction by validator public key

Types

type CacheValidatorsData

type CacheValidatorsData struct {
	Validators []models.Validator
	Pagination tools.Pagination
}

type GetAggregatedValidatorRequest

type GetAggregatedValidatorRequest struct {
	Page    string  `form:"page"     binding:"omitempty,numeric"`
	Filter  *string `form:"filter"   binding:"omitempty"`
	OrderBy *string `form:"order_by" binding:"omitempty"`
}

type GetValidatorRequest

type GetValidatorRequest struct {
	PublicKey string `uri:"publicKey"    binding:"required,noahPubKey"`
}

type GetValidatorTransactionsRequest

type GetValidatorTransactionsRequest struct {
	Page       string  `form:"page"        binding:"omitempty,numeric"`
	StartBlock *string `form:"startblock"  binding:"omitempty,numeric"`
	EndBlock   *string `form:"endblock"    binding:"omitempty,numeric"`
}

TODO: replace string to int

Jump to

Keyboard shortcuts

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