rest

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RestVoteDenom = "denom"
	RestVoter     = "voteraddress"
)

nolint

Variables

This section is empty.

Functions

func GetElectHandlerFunction

func GetElectHandlerFunction(cdc *codec.Codec, storeName string, cliCtx context.CLIContext) http.HandlerFunc

GetElectHandlerFunction handles the GET request for the currently valid Price elect

func GetVoteHandlerFunction

func GetVoteHandlerFunction(cdc *codec.Codec, storeName string, cliCtx context.CLIContext) http.HandlerFunc

GetVoteHandlerFunction handles the request to get the currently unelected outstanding price oracle vote

func RegisterRoutes

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

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

func SubmitVoteHandlerFunction

func SubmitVoteHandlerFunction(cdc *codec.Codec, cliCtx context.CLIContext) http.HandlerFunc

SubmitVoteHandlerFunction handles a POST vote request

Types

type VoteReq

type VoteReq struct {
	BaseReq      utils.BaseReq `json:"base_req"`
	Price        float64       `json:"price"`
	Denom        string        `json:"denom"`
	VoterAddress string        `json:"voter_address"`
}

nolint

Jump to

Keyboard shortcuts

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