util

package
v0.9.19 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type RestError

type RestError struct {
	Error      error
	StatusCode int
}

func BuildGetBlockByTxIDMessage added in v0.9.18

func BuildGetBlockByTxIDMessage(_ http.ResponseWriter, req *http.Request, params httprouter.Params) (*messages.GetBlockByTxID, *RestError)

func BuildGetBlockMessage added in v0.9.7

func BuildGetBlockMessage(_ http.ResponseWriter, req *http.Request, params httprouter.Params) (*messages.GetBlock, *RestError)

func BuildGetChainInfoMessage added in v0.9.7

func BuildGetChainInfoMessage(_ http.ResponseWriter, req *http.Request, _ httprouter.Params) (*messages.GetChainInfo, *RestError)

func BuildQueryMessage added in v0.9.4

func BuildTxByIDMessage added in v0.9.18

func BuildTxByIDMessage(_ http.ResponseWriter, req *http.Request, params httprouter.Params) (*messages.GetTxByID, *RestError)

func NewRestError

func NewRestError(msg string, code ...int) *RestError

type TxOpts

type TxOpts struct {
	Sync bool // synchronous request or not
	Ack  bool // expect acknowledgement from the async request or not
}

Jump to

Keyboard shortcuts

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