modulecreate

package
v29.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAppModify

func NewAppModify(replacer placeholder.Replacer, opts *CreateOptions) *genny.Generator

NewAppModify returns generator with modifications required to register a module in the app.

func NewGenerator

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.

func NewModuleConfigs

func NewModuleConfigs(opts ConfigsOptions) (*genny.Generator, error)

NewModuleConfigs returns the generator to scaffold a new configs inside a module.

func NewModuleParam

func NewModuleParam(opts ParamsOptions) (*genny.Generator, error)

NewModuleParam returns the generator to scaffold a new parameter inside a module.

Types

type ConfigsOptions

type ConfigsOptions struct {
	ModuleName string
	AppName    string
	ProtoDir   string
	ProtoVer   string
	Configs    field.Fields
}

ConfigsOptions represents the options to scaffold a Cosmos SDK module configs.

func (*ConfigsOptions) ProtoFile

func (opts *ConfigsOptions) ProtoFile(fname string) string

ProtoFile returns the path to the proto folder.

type CreateOptions

type CreateOptions struct {
	ModuleName string
	ModulePath string
	AppName    string
	AppPath    string
	ProtoDir   string
	ProtoVer   string
	Params     field.Fields
	Configs    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 Dependencies
}

CreateOptions represents the options to scaffold a Cosmos SDK module.

func (*CreateOptions) ProtoFile

func (opts *CreateOptions) ProtoFile(fname string) string

ProtoFile returns the path to the proto folder.

type Dependencies

type Dependencies []Dependency

Dependencies represents a list of module dependency.

func (Dependencies) Contains

func (d Dependencies) Contains(name string) bool

Contains returns true if contains dependency name.

func (Dependencies) Len

func (d Dependencies) Len() int

Len returns the length of dependencies.

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.

type ParamsOptions

type ParamsOptions struct {
	ModuleName string
	AppName    string
	ProtoDir   string
	ProtoVer   string
	Params     field.Fields
}

ParamsOptions represents the options to scaffold a Cosmos SDK module parameters.

func (*ParamsOptions) ProtoFile

func (opts *ParamsOptions) ProtoFile(fname string) string

ProtoFile returns the path to the proto folder.

Jump to

Keyboard shortcuts

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