Documentation ¶
Index ¶
Constants ¶
View Source
const ( RestParamsType = "type" RestProposalID = "proposal-id" RestDepositor = "depositor" RestVoter = "voter" RestProposalStatus = "status" RestNumLimit = "limit" )
REST Variable names nolint
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router, phs []ProposalRESTHandler)
RegisterRoutes - Central function to define routes that get registered by the main application
Types ¶
type DepositReq ¶
type DepositReq struct { ProposalId string `json:"proposal_id" yaml:"proposal_id"` BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` Depositor string `json:"depositor" yaml:"depositor"` // Address of the depositor Amount string `json:"amount" yaml:"amount"` // Coins to add to the proposal's deposit }
DepositReq defines the properties of a deposit request's body.
type PostProposalReq ¶
type PostProposalReq struct { BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` Title string `json:"title" yaml:"title"` // Title of the proposal Description string `json:"description" yaml:"description"` // Description of the proposal InitialDeposit string `json:"initial_deposit" yaml:"initial_deposit"` // Coins to add to the proposal's deposit ProposerAcc string `json:"proposer_acc" yaml:"proposer_acc"` // account of the proposer }
PostProposalReq defines the properties of a proposal request's body.
type ProposalRESTHandler ¶
type ProposalRESTHandler struct { SubRoute string Handler func(http.ResponseWriter, *http.Request) }
ProposalRESTHandler defines a REST handler implemented in another module. The sub-route is mounted on the governance REST handler.
Click to show internal directories.
Click to hide internal directories.