Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Boilerplate ¶
type Boilerplate interface { // SetBoilerplate sets the boilerplate text SetBoilerplate(string) }
Boilerplate allows boilerplate text to be set on an object
type BoilerplatePath ¶
type BoilerplatePath interface { // SetBoilerplatePath sets the boilerplate file path SetBoilerplatePath(string) }
BoilerplatePath allows boilerplate file path to be set on an object
type Domain ¶
type Domain interface { // SetDomain sets the domain SetDomain(string) }
Domain allows a domain to be set on an object
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 ( // Skip skips the file and moves to the next one Skip IfExistsAction = iota // Error returns an error and stops processing Error // Overwrite truncates and overwrites the existing file Overwrite )
type Input ¶
type Input struct { // Path is the file to write Path string // IfExistsAction determines what to do if the file exists IfExistsAction IfExistsAction // TemplateBody is the template body to execute TemplateBody string // Boilerplate is the contents of a Boilerplate go header file Boilerplate string // BoilerplatePath is the path to a Boilerplate go header file BoilerplatePath string // Version is the project version Version string // Domain is the domain for the APIs Domain string // Repo is the go project package Repo string // ProjectPath is the relative path to the project root ProjectPath string }
Input is the input for scaffoldig a file
func (*Input) SetBoilerplate ¶
SetBoilerplate sets the boilerplate text
func (*Input) SetBoilerplatePath ¶
SetBoilerplatePath sets the boilerplate file path
func (*Input) SetProjectPath ¶
SetProjectPath sets the project path
type Options ¶
type Options struct { // BoilerplatePath is the path to the boilerplate file BoilerplatePath string // Path is the path to the project ProjectPath string }
Options are the options for executing scaffold templates
type ProjecPath ¶
type ProjecPath interface { // SetProjectPath sets the project file location SetProjectPath(string) }
ProjecPath allows the project path to be set on an object
type ProjectFile ¶
type ProjectFile struct { // Version is the project version - defaults to "2" Version string `yaml:"version,omitempty"` // Domain is the domain associated with the project and used for API groups Domain string `yaml:"domain,omitempty"` // Repo is the go package name of the project root Repo string `yaml:"repo,omitempty"` }
ProjectFile is deserialized into a PROJECT file
type Repo ¶
type Repo interface { // SetRepo sets the repo SetRepo(string) }
Repo allows a repo to be set on an object