Documentation
¶
Overview ¶
Package projecttpl renders starter project files (app.yaml and, for the pipeline starter, a pipeline file) from a small set of validated templates.
Index ¶
Constants ¶
View Source
const ( KindString = "string" KindInt = "int" KindEnum = "enum" KindCron = "cron" )
Param kinds.
Variables ¶
View Source
var ErrUnknownTemplate = errors.New("projecttpl: unknown template")
ErrUnknownTemplate is returned for an id that is not in the catalog.
Functions ¶
This section is empty.
Types ¶
type FieldError ¶
FieldError ties a validation problem to the parameter that caused it.
type Info ¶
type Info struct {
ID string `json:"id"`
Title string `json:"title"`
Summary string `json:"summary"`
Params []Param `json:"params"`
}
Info describes a template without rendering it.
type Param ¶
type Param struct {
Name string `json:"name"`
Label string `json:"label"`
Kind string `json:"kind"`
Default string `json:"default,omitempty"`
Required bool `json:"required"`
Options []string `json:"options,omitempty"`
Placeholder string `json:"placeholder,omitempty"`
}
Param is one value a template asks for.
type ValidationError ¶
type ValidationError struct {
Fields []FieldError `json:"fields"`
}
ValidationError lists every parameter problem at once.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.