transactions

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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CacheBlocksCount = time.Duration(15)

Transaction cache helpers

Variables

This section is empty.

Functions

func ApplyRoutes

func ApplyRoutes(r *gin.RouterGroup)

ApplyRoutes applies router to the gin Engine

func GetTransaction

func GetTransaction(c *gin.Context)

Get transaction detail by hash

func GetTransactions

func GetTransactions(c *gin.Context)

Get list of transactions

Types

type CacheTxData

type CacheTxData struct {
	Transactions []models.Transaction
	Pagination   tools.Pagination
}

type GetTransactionRequest

type GetTransactionRequest struct {
	Hash string `uri:"hash" binding:"noahTxHash"`
}

type GetTransactionsRequest

type GetTransactionsRequest struct {
	Addresses  []string `form:"addresses[]" binding:"omitempty,noahAddress"`
	Page       string   `form:"page"        binding:"omitempty,numeric"`
	StartBlock *string  `form:"startblock"  binding:"omitempty,numeric"`
	EndBlock   *string  `form:"endblock"    binding:"omitempty,numeric"`
}

TODO: replace string in StartBlock, EndBlock, Page to int

Jump to

Keyboard shortcuts

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