http

package
v0.0.0-...-2749a05 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQueryHandler

func NewQueryHandler(e *echo.Echo, q api.QueryUsecase)

Types

type BlockWithTXs

type BlockWithTXs struct {
	BlockNum   int64    `json:"block_num"`
	BlockHash  string   `json:"block_hash"`
	ParentHash string   `json:"parent_hash"`
	BlockTime  uint64   `json:"block_time"`
	TxList     []string `json:"transactions"`
}

type Blocks

type Blocks struct {
	Blocks []repository.Block `json:"blocks"`
}

type QueryHandler

type QueryHandler struct {
	QUsecase api.QueryUsecase
}

func (*QueryHandler) GetBlockWithTXsByID

func (q *QueryHandler) GetBlockWithTXsByID(c echo.Context) error

func (*QueryHandler) GetLatestNBlock

func (q *QueryHandler) GetLatestNBlock(c echo.Context) error

func (*QueryHandler) GetTXByHash

func (q *QueryHandler) GetTXByHash(c echo.Context) error

type ResponseError

type ResponseError struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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