rest

package
v0.34.7 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

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, cdc *codec.Codec)

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

Types

type DepositReq

type DepositReq struct {
	BaseReq   rest.BaseReq   `json:"base_req"`
	Depositor sdk.AccAddress `json:"depositor"` // Address of the depositor
	Amount    sdk.Coins      `json:"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"`
	Title          string         `json:"title"`           // Title of the proposal
	Description    string         `json:"description"`     // Description of the proposal
	ProposalType   string         `json:"proposal_type"`   // Type of proposal. Initial set {PlainTextProposal, SoftwareUpgradeProposal}
	Proposer       sdk.AccAddress `json:"proposer"`        // Address of the proposer
	InitialDeposit sdk.Coins      `json:"initial_deposit"` // Coins to add to the proposal's deposit
}

PostProposalReq defines the properties of a proposal request's body.

type VoteReq

type VoteReq struct {
	BaseReq rest.BaseReq   `json:"base_req"`
	Voter   sdk.AccAddress `json:"voter"`  // address of the voter
	Option  string         `json:"option"` // option from OptionSet chosen by the voter
}

VoteReq defines the properties of a vote request's body.

Jump to

Keyboard shortcuts

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