rest

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router)

RegisterRoutes - Central function to define routes that get registered by the main application

func TopupHandlerFn

func TopupHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

TopupHandlerFn - http request handler to topup coins to a address.

func WithdrawFeeHandlerFn

func WithdrawFeeHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

WithdrawFeeHandlerFn - http request handler to withdraw fee coins from a address.

Types

type TopupReq

type TopupReq struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`

	ID       uint64 `json:"id" yaml:"id"`
	TxHash   string `json:"tx_hash" yaml:"tx_hash"`
	LogIndex uint64 `json:"log_index" yaml:"log_index"`
}

TopupReq defines the properties of a topup request's body.

type WithdrawFeeReq

type WithdrawFeeReq struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
	Amount  string       `json:"amount" yaml:"amount"`
}

WithdrawFeeReq defines the properties of a withdraw fee request's body.

Jump to

Keyboard shortcuts

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