Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbsProjectPath ¶
type AbsProjectPath interface {
// SetAbsProjectPath sets the project file location
SetAbsProjectPath(string)
}
AbsProjectPath allows the absolute project path to be set on an object
type Config ¶
type Config struct {
// Repo is the go project package
Repo string
// AbsProjectPath is the absolute path to the project root, including the project directory.
AbsProjectPath string
// ProjectName is the operator's name, ex. app-operator
ProjectName string
}
Config configures the execution scaffold templates
type File ¶
type File interface {
// GetInput returns the Input for creating a scaffold file
GetInput() (Input, error)
}
File is a scaffoldable file
type IfExistsAction ¶
type IfExistsAction int
IfExistsAction determines what to do if the scaffold file already exists
const ( // Overwrite truncates and overwrites the existing file (default) Overwrite IfExistsAction = iota // Error returns an error and stops processing Error // Skip skips the file and moves to the next one Skip )
type Input ¶
type Input struct {
// Path is the file to write
Path string
// IfExistsAction determines what to do if the file exists
IfExistsAction IfExistsAction
// IsExec indicates whether the file should be written with executable
// permissions.
// Defaults to false
IsExec bool
// TemplateBody is the template body to execute
TemplateBody string
// TemplateFuncs are any funcs used in the template. These funcs must be
// registered before execution.
TemplateFuncs template.FuncMap
// Repo is the go project package
Repo string
// AbsProjectPath is the absolute path to the project root, including the project directory.
AbsProjectPath string
// ProjectName is the operator's name, ex. app-operator
ProjectName string
}
Input is the input for scaffoldig a file
func (*Input) SetAbsProjectPath ¶
SetAbsProjectPath sets the absolute project path
func (*Input) SetProjectName ¶
SetProjectName sets the project name
type ProjectName ¶
type ProjectName interface {
// SetProjectName sets the project name
SetProjectName(string)
}
ProjectName allows the project name to be set on an object
Click to show internal directories.
Click to hide internal directories.