Documentation ¶
Index ¶
- func AddGenesisTest(appPath, appName, modulePath, moduleName string, isIBC bool) (*genny.Generator, error)
- func AddMsgServerConventionToLegacyModule(replacer placeholder.Replacer, opts *MsgServerOptions) (*genny.Generator, error)
- func AddSimulation(appPath, modulePath, moduleName string, params ...field.Field) (*genny.Generator, error)
- func NewAppModify(replacer placeholder.Replacer, opts *CreateOptions) *genny.Generator
- func NewGenerator(opts *CreateOptions) (*genny.Generator, error)
- func NewIBC(replacer placeholder.Replacer, opts *CreateOptions) (*genny.Generator, error)
- type CreateOptions
- type Dependency
- type MsgServerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGenesisTest ¶
func AddGenesisTest(appPath, appName, modulePath, moduleName string, isIBC bool) (*genny.Generator, error)
AddGenesisTest returns the generator to generate genesis_test.go files.
func AddMsgServerConventionToLegacyModule ¶
func AddMsgServerConventionToLegacyModule(replacer placeholder.Replacer, opts *MsgServerOptions) (*genny.Generator, error)
AddMsgServerConventionToLegacyModule add the files and the necessary modifications to an existing module that doesn't support MsgServer convention https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-031-msg-service.md
func AddSimulation ¶
func AddSimulation(appPath, modulePath, moduleName string, params ...field.Field) (*genny.Generator, error)
AddSimulation returns the generator to generate module_simulation.go file.
func NewAppModify ¶ added in v0.26.0
func NewAppModify(replacer placeholder.Replacer, opts *CreateOptions) *genny.Generator
NewAppModify returns generator with modifications required to register a module in the app.
func NewGenerator ¶ added in v0.26.0
func NewGenerator(opts *CreateOptions) (*genny.Generator, error)
NewGenerator returns the generator to scaffold a module inside an app.
func NewIBC ¶
func NewIBC(replacer placeholder.Replacer, opts *CreateOptions) (*genny.Generator, error)
NewIBC returns the generator to scaffold the implementation of the IBCModule interface inside a module.
Types ¶
type CreateOptions ¶
type CreateOptions struct { ModuleName string ModulePath string AppName string AppPath string Params field.Fields // True if the module should implement the IBC module interface IsIBC bool // Channel ordering of the IBC module: ordered, unordered or none IBCOrdering string // Dependencies of the module Dependencies []Dependency }
CreateOptions represents the options to scaffold a Cosmos SDK module.
func (*CreateOptions) Validate ¶
func (opts *CreateOptions) Validate() error
Validate that options are usable.
type Dependency ¶
type Dependency struct {
Name string
}
Dependency represents a module dependency of a module.
func NewDependency ¶
func NewDependency(name string) Dependency
NewDependency returns a new dependency.
func (Dependency) KeeperName ¶
func (d Dependency) KeeperName() string
KeeperName returns the keeper's name for the dependency module.