Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { // StrictValidators if enabled forces us to use the validator function // for a template only if available. Otherwise, the template will be // ignored. StrictValidators bool Path string Plugin *protogen.Plugin Files embed.FS `validate:"required"` Context TemplateContext `validate:"required"` HelperFunctions map[string]interface{} }
type TemplateContext ¶
type TemplateContext interface { ValidateForExecute() map[string]TemplateValidator Extension() string }
TemplateContext is an interface that a template file context, i.e., the object manipulated inside the template file, must implement.
type TemplateValidator ¶
type TemplateValidator func() bool
type Templates ¶
type Templates struct {
// contains filtered or unexported fields
}
Templates is an object that holds information related to a group of template files, allowing them to be parsed later.
func LoadTemplates ¶
Click to show internal directories.
Click to hide internal directories.