Documentation ¶
Index ¶
- Constants
- func NewCancelSoftwareUpgradeProposal(title, description string) gov.Content
- func NewSoftwareUpgradeProposal(title, description string, plan Plan) gov.Content
- func PlanKey() []byte
- func RegisterCodec(cdc *codec.Codec)
- type CancelSoftwareUpgradeProposal
- func (sup *CancelSoftwareUpgradeProposal) GetDescription() string
- func (sup *CancelSoftwareUpgradeProposal) GetTitle() string
- func (sup *CancelSoftwareUpgradeProposal) ProposalRoute() string
- func (sup *CancelSoftwareUpgradeProposal) ProposalToken() string
- func (sup *CancelSoftwareUpgradeProposal) ProposalType() string
- func (sup CancelSoftwareUpgradeProposal) String() string
- func (sup *CancelSoftwareUpgradeProposal) ValidateBasic() sdk.Error
- type Plan
- type QueryAppliedParams
- type SoftwareUpgradeProposal
- func (sup *SoftwareUpgradeProposal) GetDescription() string
- func (sup *SoftwareUpgradeProposal) GetTitle() string
- func (sup *SoftwareUpgradeProposal) ProposalRoute() string
- func (sup *SoftwareUpgradeProposal) ProposalToken() string
- func (sup *SoftwareUpgradeProposal) ProposalType() string
- func (sup SoftwareUpgradeProposal) String() string
- func (sup *SoftwareUpgradeProposal) ValidateBasic() sdk.Error
- type UpgradeHandler
- type UpgradeInfo
Constants ¶
View Source
const ( // ModuleName is the name of this module ModuleName = "upgrade" // RouterKey is used to route governance proposals RouterKey = ModuleName // StoreKey is the prefix under which we store this module's data StoreKey = ModuleName // QuerierKey is used to handle abci_query requests QuerierKey = ModuleName )
View Source
const ( // PlanByte specifies the Byte under which a pending upgrade plan is stored in the store PlanByte = 0x0 // DoneByte is a prefix for to look up completed upgrade plan by name DoneByte = 0x1 )
View Source
const ( DefaultCodespace sdk.CodespaceType = "upgrade" ProposalTypeSoftwareUpgrade string = "SoftwareUpgrade" ProposalTypeCancelSoftwareUpgrade string = "CancelSoftwareUpgrade" )
View Source
const ( QueryCurrent = "current" QueryApplied = "applied" )
query endpoints supported by the upgrade Querier
Variables ¶
This section is empty.
Functions ¶
func PlanKey ¶
func PlanKey() []byte
PlanKey is the key under which the current plan is saved We store PlanByte as a const to keep it immutable (unlike a []byte)
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
Types ¶
type CancelSoftwareUpgradeProposal ¶
type CancelSoftwareUpgradeProposal struct { Title string `json:"title"` Description string `json:"description"` }
func (*CancelSoftwareUpgradeProposal) GetDescription ¶
func (sup *CancelSoftwareUpgradeProposal) GetDescription() string
func (*CancelSoftwareUpgradeProposal) GetTitle ¶
func (sup *CancelSoftwareUpgradeProposal) GetTitle() string
func (*CancelSoftwareUpgradeProposal) ProposalRoute ¶
func (sup *CancelSoftwareUpgradeProposal) ProposalRoute() string
func (*CancelSoftwareUpgradeProposal) ProposalToken ¶
func (sup *CancelSoftwareUpgradeProposal) ProposalToken() string
func (*CancelSoftwareUpgradeProposal) ProposalType ¶
func (sup *CancelSoftwareUpgradeProposal) ProposalType() string
func (CancelSoftwareUpgradeProposal) String ¶
func (sup CancelSoftwareUpgradeProposal) String() string
func (*CancelSoftwareUpgradeProposal) ValidateBasic ¶
func (sup *CancelSoftwareUpgradeProposal) ValidateBasic() sdk.Error
type Plan ¶
type Plan struct { Name string `json:"name"` Time time.Time `json:"time"` Height int64 `json:"height"` Info string `json:"info"` }
func (Plan) ShouldExecute ¶
ShouldExecute returns true if the Plan is ready to execute given the current context
func (Plan) ValidateBasic ¶
ValidateBasic does basic validation of a Plan
type QueryAppliedParams ¶
type QueryAppliedParams struct {
Name string
}
QueryAppliedParams is passed as data with QueryApplied
func NewQueryAppliedParams ¶
func NewQueryAppliedParams(name string) QueryAppliedParams
NewQueryAppliedParams creates a new instance to query if a named plan was applied
type SoftwareUpgradeProposal ¶
type SoftwareUpgradeProposal struct { Title string `json:"title"` Description string `json:"description"` Plan Plan `json:"plan"` }
func (*SoftwareUpgradeProposal) GetDescription ¶
func (sup *SoftwareUpgradeProposal) GetDescription() string
func (*SoftwareUpgradeProposal) GetTitle ¶
func (sup *SoftwareUpgradeProposal) GetTitle() string
func (*SoftwareUpgradeProposal) ProposalRoute ¶
func (sup *SoftwareUpgradeProposal) ProposalRoute() string
func (*SoftwareUpgradeProposal) ProposalToken ¶
func (sup *SoftwareUpgradeProposal) ProposalToken() string
func (*SoftwareUpgradeProposal) ProposalType ¶
func (sup *SoftwareUpgradeProposal) ProposalType() string
func (SoftwareUpgradeProposal) String ¶
func (sup SoftwareUpgradeProposal) String() string
func (*SoftwareUpgradeProposal) ValidateBasic ¶
func (sup *SoftwareUpgradeProposal) ValidateBasic() sdk.Error
type UpgradeHandler ¶
UpgradeHandler specifies the type of function that is called when an upgrade is applied
type UpgradeInfo ¶
Click to show internal directories.
Click to hide internal directories.