Documentation
¶
Index ¶
- func PackageNameFromProject(projectName string) string
- func ValidateDatabaseName(name string) error
- func ValidateHTTPPort(port int) error
- func ValidateModulePath(module string) error
- func ValidateProjectName(name string) error
- func ValidateTargetDir(path string) error
- type Generator
- type InitOptions
- type TemplateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PackageNameFromProject ¶
func ValidateDatabaseName ¶
func ValidateHTTPPort ¶
func ValidateModulePath ¶
func ValidateProjectName ¶
func ValidateTargetDir ¶
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator scaffolds projects from embedded templates.
func (*Generator) Init ¶
func (g *Generator) Init(opts InitOptions) ([]engine.PlanEntry, error)
Init creates a new project at opts.TargetDir.
func (*Generator) PostProcessProject ¶
PostProcessProject formats Go sources and runs the test suite for the generated project.
type InitOptions ¶
type InitOptions struct {
ProjectName string
ModulePath string
HTTPPort int
DatabaseName string
TargetDir string
Author string
DryRun bool
}
InitOptions holds parameters for project scaffolding.
type TemplateData ¶
TemplateData is passed to text/template when rendering files.
Click to show internal directories.
Click to hide internal directories.