rest

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileUploadRequestHandlerFn

func FileUploadRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

FileUploadRequestHandlerFn - http request handler for file uploading.

func PrepayRequestHandlerFn added in v0.4.0

func PrepayRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

PrepayRequestHandlerFn - http request handler for prepay.

func RegisterRoutes

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

RegisterRoutes registers sds-related REST handlers to a router

func SimulatePrepayHandlerFn added in v0.4.0

func SimulatePrepayHandlerFn(cliCtx context.CLIContext, queryRoute string) http.HandlerFunc

HTTP request handler to query the simulated purchased amt of prepay

func UozPriceHandlerFn added in v0.4.0

func UozPriceHandlerFn(cliCtx context.CLIContext, queryRoute string) http.HandlerFunc

HTTP request handler to query ongoing uoz price

func UozSupplyHandlerFn added in v0.4.0

func UozSupplyHandlerFn(cliCtx context.CLIContext, queryRoute string) http.HandlerFunc

HTTP request handler to query uoz supply details

Types

type FileUploadReq

type FileUploadReq struct {
	BaseReq  rest.BaseReq `json:"base_req" yaml:"base_req"`
	Reporter string       `json:"reporter" yaml:"reporter"`
	FileHash string       `json:"file_hash" yaml:"file_hash"`
	Uploader string       `json:"uploader" yaml:"uploader"`
}

FileUploadReq defines the properties of a file upload request's body.

type PrepayReq added in v0.4.0

type PrepayReq struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
	Amount  sdk.Coins    `json:"amount" yaml:"amount"`
}

PrepayReq defines the properties of a prepay request's body.

Jump to

Keyboard shortcuts

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