Documentation
¶
Overview ¶
Package generator abstracts writing specific Go constructs (interfaces, structs etc) into IO.
Package generator abstracts writing specific Go constructs (interfaces, structs etc) into IO.
Index ¶
Constants ¶
View Source
const GraphQLErrorStructName = "GraphQLError"
GraphQLErrorStructName - default name of the generated GraphQL error response struct.
View Source
const Header = "// Generated with grafik. DO NOT EDIT"
Header - default header added to the generated grafik client.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator interface { WriteHeader() WritePackage(pkgName string) WriteImports() WriteLineBreak(r int) WriteInterface(name string, fn ...ds.Func) WritePublicStruct(s ds.Struct, usePointers bool) WritePrivateStruct(s ds.Struct) WriteEnum(e ds.Enum) WriteConst(c ds.Const) WriteClientConstructor(clientName string) WriteInterfaceImplementation(clientName string, f ds.Func) WriteGraphqlErrorStructs(usePointers bool) Generate() io.WriterTo }
A Generator is an interface that provides contract for generator struct and is being used instead of a pointer.
Click to show internal directories.
Click to hide internal directories.