Documentation
¶
Index ¶
Constants ¶
View Source
const ModuleImport = "@modules:import"
View Source
const ModuleRegister = "@modules:register"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
ApiVersion string
Driver string
Pluralizer *pluralize.Client
Template *Template
Generators []Generator
}
go:embed templates/*
func (*Factory) Generate ¶
func (f *Factory) Generate(module ModuleTemplate)
type FieldTemplate ¶
type FieldTemplate struct {
Name string
NameUnderScore string
ProtobufType string
GolangType string
Index int
IsRequired bool
}
go:embed templates/*
type Generator ¶
type Generator interface {
Generate(template *Template, modulePath string, packagePath string, templatePath string)
}
go:embed templates/*
type ModuleJson ¶
go:embed templates/*
type ModuleTemplate ¶
type ModuleTemplate struct {
Name string
Fields []*FieldTemplate
}
go:embed templates/*
Click to show internal directories.
Click to hide internal directories.