Documentation ¶
Overview ¶
Package scaffolder initializes Starport apps and modifies existing ones to add more features in a later time.
Index ¶
Constants ¶
View Source
const ( TypeString = "string" TypeBool = "bool" TypeInt32 = "int32" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*scaffoldingOptions)
Option configures scaffolding.
func AddressPrefix ¶
AddressPrefix configures address prefix for the app.
func SdkVersion ¶
func SdkVersion(v cosmosver.MajorVersion) Option
SdkVersion specifies Cosmos-SDK version.
type Scaffolder ¶
type Scaffolder struct {
// contains filtered or unexported fields
}
Scaffolder is Starport app scaffolder.
func New ¶
func New(path string, options ...Option) *Scaffolder
New initializes a new Scaffolder for app at path.
func (*Scaffolder) AddType ¶
func (s *Scaffolder) AddType(moduleName string, stype string, fields ...string) error
AddType adds a new type stype to scaffolded app by using optional type fields.
func (*Scaffolder) CreateModule ¶
func (s *Scaffolder) CreateModule(moduleName string) error
CreateModule creates a new empty module in the scaffolded app
func (*Scaffolder) ImportModule ¶
func (s *Scaffolder) ImportModule(name string) error
ImportModule imports specified module with name to the scaffolded app.
Click to show internal directories.
Click to hide internal directories.