iparam

package
v0.5.0-rc1 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultCodespace                    sdk.CodespaceType = 6
	CodeInvalidMinDeposit               sdk.CodeType      = 100
	CodeInvalidMinDepositDenom          sdk.CodeType      = 101
	CodeInvalidMinDepositAmount         sdk.CodeType      = 102
	CodeInvalidDepositPeriod            sdk.CodeType      = 103
	CodeInvalidCurrentUpgradeProposalID sdk.CodeType      = 104
	CodeInvalidVotingPeriod             sdk.CodeType      = 105
	CodeInvalidVotingProcedure          sdk.CodeType      = 106
	CodeInvalidThreshold                sdk.CodeType      = 107
	CodeInvalidGovernancePenalty        sdk.CodeType      = 108
	CodeInvalidVeto                     sdk.CodeType      = 109
	CodeInvalidTallyingProcedure        sdk.CodeType      = 110
	CodeInvalidKey                      sdk.CodeType      = 111
	CodeInvalidParamString              sdk.CodeType      = 112
	CodeInvalidModule                   sdk.CodeType      = 113
	CodeInvalidQueryParams              sdk.CodeType      = 114
)

Variables

View Source
var ParamMapping = make(map[string]GovParameter)

Functions

func InitGenesisParameter

func InitGenesisParameter(p Parameter, ctx sdk.Context, genesisData interface{})

func RegisterGovParamMapping

func RegisterGovParamMapping(gps ...GovParameter)

func SetParamReadWriter

func SetParamReadWriter(setter params.Setter, ps ...Parameter)

Types

type GovArrayParameter

type GovArrayParameter interface {
	GovParameter

	LoadValueByKey(ctx sdk.Context, key string) bool

	Insert(ctx sdk.Context, json string)
}

type GovParameter

type GovParameter interface {
	Parameter

	Valid(json string) sdk.Error

	GetValueFromRawData(cdc *wire.Codec, res []byte) interface{}

	Update(ctx sdk.Context, json string)

	ToJson(string) string
}

type Parameter

type Parameter interface {
	InitGenesis(interface{})

	GetStoreKey() string

	SetReadWriter(setter params.Setter)

	SaveValue(ctx sdk.Context)

	LoadValue(ctx sdk.Context) bool
}

type SignalParameter

type SignalParameter interface {
	Parameter
}

Jump to

Keyboard shortcuts

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