rest

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 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 client.Context, 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 {
	govtypes.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