Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderStringFromGenerator ¶
RenderStringFromGenerator receives a Generator that is used to render the received template string.
func RenderTemplate ¶ added in v0.3.0
RenderTemplate parses and returns the rendered string of the provided template. The template is also assigned the provided name for reference.
TODO: How can we compose a template of embedded templates to help scale?
Templates are stored as map[string]*Template - ("someName": *Template). https://stackoverflow.com/questions/41176355/go-template-name
Types ¶
type CodeGen ¶
type CodeGen struct { TemplateDir string TemplateName string DestinationDir string DestinationFile string Source Path Destination Path }
type Generator ¶
type Generator interface { Generate(*schema.Schema, *config.GeneratorConfig, *config.PackageConfig) error Execute(*config.GeneratorConfig, *config.PackageConfig) error }
Generator aspires to implement the interface between a NerdGraph schema and generated code for another project.
Click to show internal directories.
Click to hide internal directories.