Documentation
¶
Index ¶
Constants ¶
View Source
const ( Header = `// Code generated by go generate; DO NOT EDIT. // This file was generated from GraphQL schema %s package %s ` StructTPL = `type %s struct { %s }` FieldTPL = " %s %s `json:\"%s\"`" ListFieldTPL = " %s []%s `json:\"%s\"`" EnumTypeDefTPL = "type %s %s" EnumDefConstTPL = "const %s %s = \"%s\"" )
Variables ¶
View Source
var GQLTypesToGoTypes = map[string]string{
"Int": "int64",
"Float": "float64",
"String": "string",
"Boolean": "bool",
"ID": "string",
}
Functions ¶
This section is empty.
Types ¶
type FileOutput ¶
func NewFileOutput ¶
func NewFileOutput(fName string) (*FileOutput, error)
func (*FileOutput) Close ¶
func (o *FileOutput) Close() error
func (*FileOutput) Flush ¶
func (o *FileOutput) Flush() error
func (*FileOutput) Write ¶
func (o *FileOutput) Write(s string) error
func (*FileOutput) Writeln ¶
func (o *FileOutput) Writeln(s string) error
type GoGenerator ¶
type GoGenerator struct {
// contains filtered or unexported fields
}
func NewGoGenerator ¶
func NewGoGenerator(output Outputer, entities []string, packageName string) *GoGenerator
func (*GoGenerator) Generate ¶
func (g *GoGenerator) Generate(inputSchema string, schemaFileName string)
type STDOutput ¶
type STDOutput struct {
// contains filtered or unexported fields
}
func NewSTDOutput ¶
func NewSTDOutput() *STDOutput
Click to show internal directories.
Click to hide internal directories.