github.com/cosmos/cosmos-sdk@v0.50.10/x/gov/types/v1beta1/content.go (about) 1 package v1beta1 2 3 import sdk "github.com/cosmos/cosmos-sdk/types" 4 5 // Content defines an interface that a proposal must implement. It contains 6 // information such as the title and description along with the type and routing 7 // information for the appropriate handler to process the proposal. Content can 8 // have additional fields, which will handled by a proposal's Handler. 9 type Content interface { 10 GetTitle() string 11 GetDescription() string 12 ProposalRoute() string 13 ProposalType() string 14 ValidateBasic() error 15 String() string 16 } 17 18 // Handler defines a function that handles a proposal after it has passed the 19 // governance process. 20 type Handler func(ctx sdk.Context, content Content) error 21 22 type HandlerRoute struct { 23 Handler Handler 24 RouteKey string 25 } 26 27 // IsManyPerContainerType implements the depinject.ManyPerContainerType interface. 28 func (HandlerRoute) IsManyPerContainerType() {}