Documentation ¶
Index ¶
- type Generator
- func (this *Generator) ExpandTemplate(schemaObject schema.ObjectInterface, templateFileName string) (string, error)
- func (this *Generator) Output(schemaObject schema.ObjectInterface, outputDirectory string) error
- func (this *Generator) OutputFile(schemaObject schema.ObjectInterface, outputDirectory string, ...) error
- type InputOutputFilePair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct { // A map of object types to sets of input and output files. It OK for an // object type name to not exist in a generator, // that file will simply not be output. The content of this object may be // used in a different template, usually that of a parent, or a child // collection. ObjectTypeTemplates map[schema.ObjectTypeName][]InputOutputFilePair }
func (*Generator) ExpandTemplate ¶
func (*Generator) Output ¶
func (this *Generator) Output(schemaObject schema.ObjectInterface, outputDirectory string) error
Output file(s) for the supplied schema object and its children
func (*Generator) OutputFile ¶
func (this *Generator) OutputFile(schemaObject schema.ObjectInterface, outputDirectory string, ioFilePair InputOutputFilePair) error
Output a file for the supplied schema object
type InputOutputFilePair ¶
type InputOutputFilePair struct { // The template filename (without the path) that this object can use to // create some output. TemplateFileName string // If a TemplateFileName() is available, this can be provided to specify // the output filename. If no value is returned, no separate file will be // output. OutputFileNameFn func(schema.ObjectInterface) (string, error) }
Click to show internal directories.
Click to hide internal directories.