Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionDefinition ¶
func (ConnectionDefinition) GetKind ¶
func (con ConnectionDefinition) GetKind() string
func (ConnectionDefinition) GetLoc ¶
func (con ConnectionDefinition) GetLoc() *ast.Location
func (ConnectionDefinition) GetName ¶
func (con ConnectionDefinition) GetName() *ast.Name
type Generator ¶
type Generator struct { Code string Schema string Template *template.Template Ast *ast.Document Config ProjectConfig LangConf LanguageConfig Nodes astNodes TmplConf map[string]string }
Generator represents the code generator main object
type LanguageConfig ¶
type LanguageConfig struct { // Language specific syntax config Language struct { Scalars map[string]string Root []string } // This is passed to the generators Cfg variable Config map[string]string // Main templates, each template in this list is executed in it's own // go routine Templates []string // Program/command used for formatting the output code Formatter struct { CMD string Args []string } }
LanguageConfig defines the language specific implementation information
func (LanguageConfig) IsRoot ¶
func (lang LanguageConfig) IsRoot(val string) bool
type MutationType ¶
type MutationType string
const ( MutationInput MutationType = "Input" MutationPayload MutationType = "Payload" )
type OutputFileBuffer ¶
func (*OutputFileBuffer) GetBuffer ¶
func (out *OutputFileBuffer) GetBuffer() *bytes.Buffer
type ProjectConfig ¶
type ProjectConfig struct { // TODO Support a globbing system Schemas []string Language string Output map[string]string }
ProjectConfig contains the granate.yaml information
type TemplateFileFuncs ¶
type TemplateFileFuncs struct { BufferStack *utils.Lifo SwapBuffer *utils.SwapBuffer LocalTemplate *template.Template // contains filtered or unexported fields }
func (*TemplateFileFuncs) End ¶
func (tmpl *TemplateFileFuncs) End() string
func (*TemplateFileFuncs) LineNumbers ¶
func (tmpl *TemplateFileFuncs) LineNumbers() int
func (*TemplateFileFuncs) Start ¶
func (tmpl *TemplateFileFuncs) Start(path string) string
Click to show internal directories.
Click to hide internal directories.