rest

package
v0.0.0-...-a749886 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RestProposalID  = "proposal-id"
	RestCommitteeID = "committee-id"
	RestVote        = "vote"
)

REST Variable names

Variables

This section is empty.

Functions

func ProposalRESTHandler

func ProposalRESTHandler(cliCtx client.Context) govrest.ProposalRESTHandler

func RegisterRoutes

func RegisterRoutes(cliCtx client.Context, r *mux.Router)

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

Types

type PostGovProposalReq

type PostGovProposalReq struct {
	BaseReq  rest.BaseReq     `json:"base_req" yaml:"base_req"`
	Content  govtypes.Content `json:"content" yaml:"content"`
	Proposer sdk.AccAddress   `json:"proposer" yaml:"proposer"`
	Deposit  sdk.Coins        `json:"deposit" yaml:"deposit"`
}

This is a rest handler for for the gov module, that handles committee change/delete proposals.

type PostProposalReq

type PostProposalReq struct {
	BaseReq     rest.BaseReq      `json:"base_req" yaml:"base_req"`
	PubProposal types.PubProposal `json:"pub_proposal" yaml:"pub_proposal"`
	Proposer    sdk.AccAddress    `json:"proposer" yaml:"proposer"`
}

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

type PostVoteReq

type PostVoteReq struct {
	BaseReq rest.BaseReq   `json:"base_req" yaml:"base_req"`
	Voter   sdk.AccAddress `json:"voter" yaml:"voter"`
	Vote    types.VoteType `json:"vote" yaml:"vote"`
}

PostVoteReq 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