blocks

package
v0.2.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CacheBlocksCount = time.Duration(10)

Blocks cache helpers

Variables

This section is empty.

Functions

func ApplyRoutes

func ApplyRoutes(r *gin.RouterGroup)

ApplyRoutes applies router to the gin Engine

func GetBlock

func GetBlock(c *gin.Context)

Get block detail

func GetBlockTransactions

func GetBlockTransactions(c *gin.Context)

Get list of transactions by block height

func GetBlocks

func GetBlocks(c *gin.Context)

Get list of blocks

Types

type CacheBlocksData

type CacheBlocksData struct {
	Blocks     []models.Block
	Pagination tools.Pagination
}

type GetBlockRequest

type GetBlockRequest struct {
	ID string `uri:"height" binding:"numeric"`
}

TODO: replace string to int

type GetBlocksRequest

type GetBlocksRequest struct {
	Page string `form:"page" 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