Documentation ¶
Index ¶
- Constants
- Variables
- func DecimalDependentLT(otherName string, other *Decimal) func(num.Decimal) error
- func DecimalDependentLTE(otherName string, other *Decimal) func(num.Decimal) error
- func DecimalGT(f num.Decimal) func(num.Decimal) error
- func DecimalGTE(f num.Decimal) func(num.Decimal) error
- func DecimalLT(f num.Decimal) func(num.Decimal) error
- func DecimalLTE(f num.Decimal) func(num.Decimal) error
- func DurationGT(i time.Duration) func(time.Duration) error
- func DurationGTE(i time.Duration) func(time.Duration) error
- func DurationLT(i time.Duration) func(time.Duration) error
- func DurationLTE(i time.Duration) func(time.Duration) error
- func IntGT(i int64) func(int64) error
- func IntGTE(i int64) func(int64) error
- func IntLT(i int64) func(int64) error
- func IntLTE(i int64) func(int64) error
- func PriceMonitoringParametersValidation(i interface{}) error
- func TimeNonZero() func(time.Time) error
- func UintGT(i *num.Uint) func(*num.Uint) error
- func UintGTE(i *num.Uint) func(*num.Uint) error
- func UintLT(i *num.Uint) func(*num.Uint) error
- func UintLTE(i *num.Uint) func(*num.Uint) error
- type AddParamRules
- type Broker
- type Config
- type Decimal
- func (f *Decimal) AddRules(fns ...interface{}) error
- func (f *Decimal) CheckDispatch(fn interface{}) error
- func (f *Decimal) GetDispatch() func(context.Context, interface{}) error
- func (f *Decimal) MustUpdate(value string) *Decimal
- func (f *Decimal) Mutable(b bool) *Decimal
- func (f *Decimal) String() string
- func (b Decimal) ToBool() (bool, error)
- func (f *Decimal) ToDecimal() (num.Decimal, error)
- func (b Decimal) ToDuration() (time.Duration, error)
- func (b Decimal) ToInt() (int64, error)
- func (b Decimal) ToJSONStruct(v Reset) error
- func (b Decimal) ToString() (string, error)
- func (b Decimal) ToUint() (*num.Uint, error)
- func (f *Decimal) Update(value string) error
- func (f *Decimal) UpdateOptionalValidation(value string, validate bool) error
- func (f *Decimal) Validate(value string) error
- type DecimalRule
- type Duration
- func (d *Duration) AddRules(fns ...interface{}) error
- func (d *Duration) CheckDispatch(fn interface{}) error
- func (d *Duration) GetDispatch() func(context.Context, interface{}) error
- func (d *Duration) MustUpdate(value string) *Duration
- func (d *Duration) Mutable(b bool) *Duration
- func (d *Duration) String() string
- func (b Duration) ToBool() (bool, error)
- func (b Duration) ToDecimal() (num.Decimal, error)
- func (d *Duration) ToDuration() (time.Duration, error)
- func (b Duration) ToInt() (int64, error)
- func (b Duration) ToJSONStruct(v Reset) error
- func (b Duration) ToString() (string, error)
- func (b Duration) ToUint() (*num.Uint, error)
- func (d *Duration) Update(value string) error
- func (d *Duration) UpdateOptionalValidation(value string, validate bool) error
- func (d *Duration) Validate(value string) error
- type DurationRule
- type GenesisState
- type GenesisStateOverwrite
- type Int
- func (i *Int) AddRules(fns ...interface{}) error
- func (i *Int) CheckDispatch(fn interface{}) error
- func (i *Int) GetDispatch() func(context.Context, interface{}) error
- func (i *Int) MustUpdate(value string) *Int
- func (i *Int) Mutable(b bool) *Int
- func (i *Int) String() string
- func (b Int) ToBool() (bool, error)
- func (b Int) ToDecimal() (num.Decimal, error)
- func (b Int) ToDuration() (time.Duration, error)
- func (i *Int) ToInt() (int64, error)
- func (b Int) ToJSONStruct(v Reset) error
- func (b Int) ToString() (string, error)
- func (b Int) ToUint() (*num.Uint, error)
- func (i *Int) Update(value string) error
- func (i *Int) UpdateOptionalValidation(value string, validate bool) error
- func (i *Int) Validate(value string) error
- type IntRule
- type JSON
- func (j *JSON) AddRules(fns ...interface{}) error
- func (j *JSON) CheckDispatch(fn interface{}) error
- func (j *JSON) GetDispatch() func(context.Context, interface{}) error
- func (j *JSON) MustUpdate(value string) *JSON
- func (j *JSON) Mutable(b bool) *JSON
- func (j *JSON) String() string
- func (b JSON) ToBool() (bool, error)
- func (b JSON) ToDecimal() (num.Decimal, error)
- func (b JSON) ToDuration() (time.Duration, error)
- func (b JSON) ToInt() (int64, error)
- func (j *JSON) ToJSONStruct(v Reset) error
- func (b JSON) ToString() (string, error)
- func (b JSON) ToUint() (*num.Uint, error)
- func (j *JSON) Update(value string) error
- func (j *JSON) UpdateOptionalValidation(value string, validate bool) error
- func (j *JSON) Validate(value string) error
- type JSONRule
- type Reset
- type Store
- func (s *Store) AddRules(params ...AddParamRules) error
- func (s *Store) AnyWatchers(p string) bool
- func (s *Store) Checkpoint() ([]byte, error)
- func (s *Store) DispatchChanges(ctx context.Context)
- func (s *Store) Exists(key string) bool
- func (s *Store) Get(key string) (string, error)
- func (s *Store) GetBool(key string) (bool, error)
- func (s *Store) GetDecimal(key string) (num.Decimal, error)
- func (s *Store) GetDuration(key string) (time.Duration, error)
- func (s *Store) GetInt(key string) (int64, error)
- func (s *Store) GetJSONStruct(key string, v Reset) error
- func (s *Store) GetState(k string) ([]byte, []types.StateProvider, error)
- func (s *Store) GetString(key string) (string, error)
- func (s *Store) GetUint(key string) (*num.Uint, error)
- func (s *Store) IsUpdateAllowed(key string) error
- func (s *Store) Keys() []string
- func (s *Store) Load(ctx context.Context, data []byte) error
- func (s *Store) LoadState(ctx context.Context, pl *types.Payload) ([]types.StateProvider, error)
- func (s *Store) Name() types.CheckpointName
- func (s *Store) Namespace() types.SnapshotNamespace
- func (s *Store) OnStateLoaded(ctx context.Context) error
- func (s *Store) OnTick(ctx context.Context, _ time.Time)
- func (s *Store) Stopped() bool
- func (s *Store) Update(ctx context.Context, key, value string) error
- func (s *Store) UpdateOptionalValidation(ctx context.Context, key, value string, validate bool) error
- func (s *Store) UponGenesis(ctx context.Context, rawState []byte) (err error)
- func (s *Store) Validate(key, value string) error
- func (s *Store) Watch(wp ...WatchParam) error
- type String
- func (s *String) AddRules(fns ...interface{}) error
- func (s *String) CheckDispatch(fn interface{}) error
- func (s *String) GetDispatch() func(context.Context, interface{}) error
- func (s *String) MustUpdate(value string) *String
- func (s *String) Mutable(b bool) *String
- func (s *String) String() string
- func (b String) ToBool() (bool, error)
- func (b String) ToDecimal() (num.Decimal, error)
- func (b String) ToDuration() (time.Duration, error)
- func (b String) ToInt() (int64, error)
- func (b String) ToJSONStruct(v Reset) error
- func (s *String) ToString() (string, error)
- func (b String) ToUint() (*num.Uint, error)
- func (s *String) Update(value string) error
- func (s *String) UpdateOptionalValidation(value string, validate bool) error
- func (s *String) Validate(value string) error
- type StringRule
- type Time
- func (t *Time) AddRules(fns ...interface{}) error
- func (t *Time) CheckDispatch(fn interface{}) error
- func (t *Time) GetDispatch() func(context.Context, interface{}) error
- func (t *Time) MustUpdate(value string) *Time
- func (t *Time) Mutable(b bool) *Time
- func (t *Time) String() string
- func (b Time) ToBool() (bool, error)
- func (b Time) ToDecimal() (num.Decimal, error)
- func (b Time) ToDuration() (time.Duration, error)
- func (b Time) ToInt() (int64, error)
- func (b Time) ToJSONStruct(v Reset) error
- func (b Time) ToString() (string, error)
- func (t *Time) ToTime() (time.Time, error)
- func (b Time) ToUint() (*num.Uint, error)
- func (t *Time) Update(value string) error
- func (t *Time) Validate(value string) error
- type TimeRule
- type Uint
- func (i *Uint) AddRules(fns ...interface{}) error
- func (i *Uint) CheckDispatch(fn interface{}) error
- func (i *Uint) GetDispatch() func(context.Context, interface{}) error
- func (i *Uint) MustUpdate(value string) *Uint
- func (i *Uint) Mutable(b bool) *Uint
- func (i *Uint) String() string
- func (b Uint) ToBool() (bool, error)
- func (b Uint) ToDecimal() (num.Decimal, error)
- func (b Uint) ToDuration() (time.Duration, error)
- func (b Uint) ToInt() (int64, error)
- func (b Uint) ToJSONStruct(v Reset) error
- func (b Uint) ToString() (string, error)
- func (i *Uint) ToUint() (*num.Uint, error)
- func (i *Uint) Update(value string) error
- func (i *Uint) UpdateOptionalValidation(value string, validate bool) error
- func (i *Uint) Validate(value string) error
- type UintRule
- type WatchParam
Constants ¶
View Source
const ( // market related parameters. MarketMarginScalingFactors = "market.margin.scalingFactors" MarketFeeFactorsMakerFee = "market.fee.factors.makerFee" MarketFeeFactorsInfrastructureFee = "market.fee.factors.infrastructureFee" MarketAuctionMinimumDuration = "market.auction.minimumDuration" MarketAuctionMaximumDuration = "market.auction.maximumDuration" MarketLiquidityBondPenaltyParameter = "market.liquidity.bondPenaltyParameter" MarketLiquidityMaximumLiquidityFeeFactorLevel = "market.liquidity.maximumLiquidityFeeFactorLevel" MarketLiquidityStakeToCCYVolume = "market.liquidity.stakeToCcyVolume" MarketLiquidityProvidersFeeDistribitionTimeStep = "market.liquidity.providers.fee.distributionTimeStep" MarketLiquidityTargetStakeTriggeringRatio = "market.liquidity.targetstake.triggering.ratio" MarketProbabilityOfTradingTauScaling = "market.liquidity.probabilityOfTrading.tau.scaling" MarketMinProbabilityOfTradingForLPOrders = "market.liquidity.minimum.probabilityOfTrading.lpOrders" MarketTargetStakeTimeWindow = "market.stake.target.timeWindow" MarketTargetStakeScalingFactor = "market.stake.target.scalingFactor" MarketValueWindowLength = "market.value.windowLength" MarketPriceMonitoringDefaultParameters = "market.monitor.price.defaultParameters" MarketLiquidityProvisionShapesMaxSize = "market.liquidityProvision.shapes.maxSize" MarketMinLpStakeQuantumMultiple = "market.liquidityProvision.minLpStakeQuantumMultiple" RewardAsset = "reward.asset" // market proposal parameters. GovernanceProposalMarketMinClose = "governance.proposal.market.minClose" GovernanceProposalMarketMaxClose = "governance.proposal.market.maxClose" GovernanceProposalMarketMinEnact = "governance.proposal.market.minEnact" GovernanceProposalMarketMaxEnact = "governance.proposal.market.maxEnact" GovernanceProposalMarketRequiredParticipation = "governance.proposal.market.requiredParticipation" GovernanceProposalMarketRequiredMajority = "governance.proposal.market.requiredMajority" GovernanceProposalMarketMinProposerBalance = "governance.proposal.market.minProposerBalance" GovernanceProposalMarketMinVoterBalance = "governance.proposal.market.minVoterBalance" // asset proposal parameters. GovernanceProposalAssetMinClose = "governance.proposal.asset.minClose" GovernanceProposalAssetMaxClose = "governance.proposal.asset.maxClose" GovernanceProposalAssetMinEnact = "governance.proposal.asset.minEnact" GovernanceProposalAssetMaxEnact = "governance.proposal.asset.maxEnact" GovernanceProposalAssetRequiredParticipation = "governance.proposal.asset.requiredParticipation" GovernanceProposalAssetRequiredMajority = "governance.proposal.asset.requiredMajority" GovernanceProposalAssetMinProposerBalance = "governance.proposal.asset.minProposerBalance" GovernanceProposalAssetMinVoterBalance = "governance.proposal.asset.minVoterBalance" // update asset proposal parameters. GovernanceProposalUpdateAssetMinClose = "governance.proposal.updateAsset.minClose" GovernanceProposalUpdateAssetMaxClose = "governance.proposal.updateAsset.maxClose" GovernanceProposalUpdateAssetMinEnact = "governance.proposal.updateAsset.minEnact" GovernanceProposalUpdateAssetMaxEnact = "governance.proposal.updateAsset.maxEnact" GovernanceProposalUpdateAssetRequiredParticipation = "governance.proposal.updateAsset.requiredParticipation" GovernanceProposalUpdateAssetRequiredMajority = "governance.proposal.updateAsset.requiredMajority" GovernanceProposalUpdateAssetMinProposerBalance = "governance.proposal.updateAsset.minProposerBalance" GovernanceProposalUpdateAssetMinVoterBalance = "governance.proposal.updateAsset.minVoterBalance" // updateMarket proposal parameters. GovernanceProposalUpdateMarketMinClose = "governance.proposal.updateMarket.minClose" GovernanceProposalUpdateMarketMaxClose = "governance.proposal.updateMarket.maxClose" GovernanceProposalUpdateMarketMinEnact = "governance.proposal.updateMarket.minEnact" GovernanceProposalUpdateMarketMaxEnact = "governance.proposal.updateMarket.maxEnact" GovernanceProposalUpdateMarketRequiredParticipation = "governance.proposal.updateMarket.requiredParticipation" GovernanceProposalUpdateMarketRequiredMajority = "governance.proposal.updateMarket.requiredMajority" GovernanceProposalUpdateMarketMinProposerBalance = "governance.proposal.updateMarket.minProposerBalance" GovernanceProposalUpdateMarketMinVoterBalance = "governance.proposal.updateMarket.minVoterBalance" GovernanceProposalUpdateMarketRequiredParticipationLP = "governance.proposal.updateMarket.requiredParticipationLP" GovernanceProposalUpdateMarketRequiredMajorityLP = "governance.proposal.updateMarket.requiredMajorityLP" // updateNetParam proposal parameters. GovernanceProposalUpdateNetParamMinClose = "governance.proposal.updateNetParam.minClose" GovernanceProposalUpdateNetParamMaxClose = "governance.proposal.updateNetParam.maxClose" GovernanceProposalUpdateNetParamMinEnact = "governance.proposal.updateNetParam.minEnact" GovernanceProposalUpdateNetParamMaxEnact = "governance.proposal.updateNetParam.maxEnact" GovernanceProposalUpdateNetParamRequiredParticipation = "governance.proposal.updateNetParam.requiredParticipation" GovernanceProposalUpdateNetParamRequiredMajority = "governance.proposal.updateNetParam.requiredMajority" GovernanceProposalUpdateNetParamMinProposerBalance = "governance.proposal.updateNetParam.minProposerBalance" GovernanceProposalUpdateNetParamMinVoterBalance = "governance.proposal.updateNetParam.minVoterBalance" // freeform proposal parameters. GovernanceProposalFreeformMinClose = "governance.proposal.freeform.minClose" GovernanceProposalFreeformMaxClose = "governance.proposal.freeform.maxClose" GovernanceProposalFreeformRequiredParticipation = "governance.proposal.freeform.requiredParticipation" GovernanceProposalFreeformRequiredMajority = "governance.proposal.freeform.requiredMajority" GovernanceProposalFreeformMinProposerBalance = "governance.proposal.freeform.minProposerBalance" GovernanceProposalFreeformMinVoterBalance = "governance.proposal.freeform.minVoterBalance" // staking and delegation reward network params. StakingAndDelegationRewardPayoutFraction = "reward.staking.delegation.payoutFraction" StakingAndDelegationRewardMaxPayoutPerParticipant = "reward.staking.delegation.maxPayoutPerParticipant" StakingAndDelegationRewardPayoutDelay = "reward.staking.delegation.payoutDelay" StakingAndDelegationRewardMinimumValidatorStake = "reward.staking.delegation.minimumValidatorStake" StakingAndDelegationRewardCompetitionLevel = "reward.staking.delegation.competitionLevel" StakingAndDelegationRewardMaxPayoutPerEpoch = "reward.staking.delegation.maxPayoutPerEpoch" StakingAndDelegationRewardsMinValidators = "reward.staking.delegation.minValidators" StakingAndDelegationRewardOptimalStakeMultiplier = "reward.staking.delegation.optimalStakeMultiplier" RewardMarketCreationQuantumMultiple = "rewards.marketCreationQuantumMultiple" // spam policies params. SpamProtectionMaxVotes = "spam.protection.max.votes" SpamProtectionMinTokensForVoting = "spam.protection.voting.min.tokens" SpamProtectionMaxProposals = "spam.protection.max.proposals" SpamProtectionMinTokensForProposal = "spam.protection.proposal.min.tokens" SpamProtectionMaxDelegations = "spam.protection.max.delegations" SpamProtectionMinTokensForDelegation = "spam.protection.delegation.min.tokens" SpamProtectionMaxBatchSize = "spam.protection.max.batchSize" SpamProtectionMinimumWithdrawalQuantumMultiple = "spam.protection.minimumWithdrawalQuantumMultiple" SpamProtectionMinMultisigUpdates = "spam.protection.minMultisigUpdates" // blockchain specifics? BlockchainsEthereumConfig = "blockchains.ethereumConfig" // length of epoch in seconds. ValidatorsEpochLength = "validators.epoch.length" // delegation params. DelegationMinAmount = "validators.delegation.minAmount" ValidatorsVoteRequired = "validators.vote.required" // network related parameters. NetworkCheckpointTimeElapsedBetweenCheckpoints = "network.checkpoint.timeElapsedBetweenCheckpoints" // snapshot parameters. SnapshotIntervalLength = "snapshot.interval.length" FloatingPointUpdatesDuration = "network.floatingPointUpdates.delay" // validators by stake. NumberOfTendermintValidators = "network.validators.tendermint.number" ValidatorIncumbentBonus = "network.validators.incumbentBonus" NumberEthMultisigSigners = "network.validators.multisig.numberOfSigners" ErsatzvalidatorsRewardFactor = "network.validators.ersatz.rewardFactor" MultipleOfTendermintValidatorsForEtsatzSet = "network.validators.ersatz.multipleOfTendermintValidators" MinimumEthereumEventsForNewValidator = "network.validators.minimumEthereumEventsForNewValidator" TransferFeeFactor = "transfer.fee.factor" TransferMinTransferQuantumMultiple = "transfer.minTransferQuantumMultiple" TransferMaxCommandsPerEpoch = "spam.protection.maxUserTransfersPerEpoch" // proof of work. SpamPoWNumberOfPastBlocks = "spam.pow.numberOfPastBlocks" SpamPoWDifficulty = "spam.pow.difficulty" SpamPoWHashFunction = "spam.pow.hashFunction" SpamPoWNumberOfTxPerBlock = "spam.pow.numberOfTxPerBlock" SpamPoWIncreasingDifficulty = "spam.pow.increaseDifficulty" // limits. LimitsProposeMarketEnabledFrom = "limits.markets.proposeEnabledFrom" LimitsProposeAssetEnabledFrom = "limits.assets.proposeEnabledFrom" MaxGasPerBlock = "network.transactions.maxgasperblock" DefaultGas = "network.transaction.defaultgas" MinBlockCapacity = "network.transactions.minBlockCapacity" // network wide limits. MaxPeggedOrders = "limits.markets.maxPeggedOrders" // MTM interval. MarkPriceUpdateMaximumFrequency = "network.markPriceUpdateMaximumFrequency" // how much to scale the number of proposed blocks used for performance calculation. ValidatorPerformanceScalingFactor = "validator.performance.scaling.factor" )
Variables ¶
View Source
var ( ErrUnknownKey = errors.New("unknown key") ErrNetworkParameterUpdateDisabledFor = func(key string) error { return fmt.Errorf("network parameter update disabled for %v", key) } )
View Source
var AllKeys = map[string]struct{}{}/* 116 elements not displayed */
View Source
var ErrNoNetParamsGenesisState = errors.New("no network parameters genesis state")
Functions ¶
func DecimalDependentLT ¶ added in v0.61.0
func DecimalDependentLTE ¶ added in v0.61.0
func PriceMonitoringParametersValidation ¶ added in v0.55.0
func PriceMonitoringParametersValidation(i interface{}) error
func TimeNonZero ¶
Types ¶
type AddParamRules ¶
type AddParamRules struct { Param string Rules []interface{} }
func ParamDurationRules ¶
func ParamDurationRules(key string, rules ...DurationRule) AddParamRules
func ParamIntRules ¶
func ParamIntRules(key string, rules ...IntRule) AddParamRules
func ParamJSONRules ¶
func ParamJSONRules(key string, rules ...JSONRule) AddParamRules
func ParamStringRules ¶
func ParamStringRules(key string, rules ...StringRule) AddParamRules
type Config ¶
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig creates an instance of the package specific configuration.
type Decimal ¶
type Decimal struct {
// contains filtered or unexported fields
}
func NewDecimal ¶
func NewDecimal(rules ...DecimalRule) *Decimal
func (*Decimal) CheckDispatch ¶
func (*Decimal) GetDispatch ¶
func (*Decimal) MustUpdate ¶
func (Decimal) ToDuration ¶
func (Decimal) ToJSONStruct ¶
func (*Decimal) UpdateOptionalValidation ¶ added in v0.67.0
type DecimalRule ¶
type Duration ¶
type Duration struct {
// contains filtered or unexported fields
}
func NewDuration ¶
func NewDuration(rules ...DurationRule) *Duration
func (*Duration) CheckDispatch ¶
func (*Duration) GetDispatch ¶
func (*Duration) MustUpdate ¶
func (Duration) ToJSONStruct ¶
func (*Duration) UpdateOptionalValidation ¶ added in v0.67.0
type DurationRule ¶
func DurationDependentGT ¶ added in v0.61.0
func DurationDependentGT(otherName string, other *Duration) DurationRule
func DurationDependentGTE ¶ added in v0.61.0
func DurationDependentGTE(otherName string, other *Duration) DurationRule
func DurationDependentLT ¶ added in v0.61.0
func DurationDependentLT(otherName string, other *Duration) DurationRule
func DurationDependentLTE ¶ added in v0.61.0
func DurationDependentLTE(otherName string, other *Duration) DurationRule
type GenesisState ¶
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
func LoadGenesisState ¶
func LoadGenesisState(bytes []byte) (GenesisState, error)
type GenesisStateOverwrite ¶
type GenesisStateOverwrite []string
func LoadGenesisStateOverwrite ¶
func LoadGenesisStateOverwrite(bytes []byte) (GenesisStateOverwrite, error)
type Int ¶
type Int struct {
// contains filtered or unexported fields
}
func (*Int) CheckDispatch ¶
func (*Int) MustUpdate ¶
func (Int) ToDuration ¶
func (Int) ToJSONStruct ¶
func (*Int) UpdateOptionalValidation ¶ added in v0.67.0
type JSON ¶
type JSON struct {
// contains filtered or unexported fields
}
func (*JSON) CheckDispatch ¶
func (*JSON) MustUpdate ¶
func (JSON) ToDuration ¶
func (*JSON) ToJSONStruct ¶
func (*JSON) UpdateOptionalValidation ¶ added in v0.67.0
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AddRules ¶
func (s *Store) AddRules(params ...AddParamRules) error
func (*Store) AnyWatchers ¶ added in v0.63.0
func (*Store) Checkpoint ¶
func (*Store) DispatchChanges ¶
func (*Store) GetDecimal ¶
GetDecimal a value associated to the given key.
func (*Store) GetDuration ¶
GetDuration a value associated to the given key.
func (*Store) GetJSONStruct ¶
GetJSONStruct a value associated to the given key.
func (*Store) IsUpdateAllowed ¶ added in v0.56.0
func (*Store) Name ¶
func (s *Store) Name() types.CheckpointName
func (*Store) Namespace ¶
func (s *Store) Namespace() types.SnapshotNamespace
func (*Store) OnStateLoaded ¶ added in v0.71.5
func (*Store) OnTick ¶
OnTick is trigger once per blocks we will send parameters update to watchers.
func (*Store) Update ¶
Update will update the stored value for a given key will return an error if the value do not pass validation.
func (*Store) UpdateOptionalValidation ¶ added in v0.67.0
func (*Store) UponGenesis ¶
UponGenesis load the initial network parameters from the genesis state.
func (*Store) Watch ¶
func (s *Store) Watch(wp ...WatchParam) error
Watch a list of parameters updates.
type String ¶
type String struct {
// contains filtered or unexported fields
}
func NewString ¶
func NewString(rules ...StringRule) *String
func (*String) CheckDispatch ¶
func (*String) GetDispatch ¶
func (*String) MustUpdate ¶
func (String) ToDuration ¶
func (String) ToJSONStruct ¶
func (*String) UpdateOptionalValidation ¶ added in v0.67.0
type StringRule ¶
type Time ¶
type Time struct {
// contains filtered or unexported fields
}
func (*Time) CheckDispatch ¶
func (*Time) MustUpdate ¶
func (Time) ToDuration ¶
func (Time) ToJSONStruct ¶
type Uint ¶
type Uint struct {
// contains filtered or unexported fields
}
func (*Uint) CheckDispatch ¶
func (*Uint) MustUpdate ¶
func (Uint) ToDuration ¶
func (Uint) ToJSONStruct ¶
func (*Uint) UpdateOptionalValidation ¶ added in v0.67.0
type UintRule ¶
func UintDependentGTE ¶ added in v0.63.0
ensure that the value is >= the other value x factor.
type WatchParam ¶
type WatchParam struct { Param string // this is to be cast to a function accepting the // inner type of the parameters // e.g: for a String value, the expected function // is to be of the type: func(string) error Watcher interface{} }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.