rest

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package rest defines the RESTful service for the gov module.

Index

Constants

View Source
const (
	RestParamsType     = "type"
	RestProposalID     = "proposal-id"
	RestDepositor      = "depositor"
	RestVoter          = "voter"
	RestProposalStatus = "status"
)

REST Variable names

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router, phs []govRest.ProposalRESTHandler)

RegisterRoutes is the central function to define routes that get registered by the main application.

Types

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.

type VoteWithPower

type VoteWithPower struct {
	types.Vote
	VotingPower sdk.Dec `json:"voting_power" yaml:"voting_power"`
}

type VotesWithPower

type VotesWithPower []VoteWithPower

Jump to

Keyboard shortcuts

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