Documentation ¶
Overview ¶
Package ds (Data Structure) contains all golang data structures used by generator.
Package ds (Data Structure) contains all golang data structures used by generator.
Package ds (Data Structure) contains all golang data structures used by generator.
Package ds (Data Structure) contains all golang data structures used by generator.
Package ds (Data Structure) contains all golang data structures used by generator.
Package ds (Data Structure) contains all golang data structures used by generator.
Package ds (Data Structure) contains all golang data structures used by generator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Const ¶
type Const struct { Name string Val interface{} }
Const represents simplified constant in Golang AST. Name is the name of the constant. Val is an interface{} and represents any possible value of the struct.
type Enum ¶
Enum represents simplified Enum in Golang AST. Name is the name of the enum. Fields is a slice of string and represents all possible values of the enum.
type Func ¶
Func represents simplified Function in Golang AST. Name is the name of the Function. Args is a slice of TypeArg and represents function parameters. Type is a string and represents return type of the function - i.e. "string", "Address" etc. WrapperTypes is a slice of TypeArg and represents selection set in GraphQL operation. It is used to create wrapper struct containing all values in selection set.
func (Func) ExportName ¶
ExportName converts name of the function to Title case.
func (Func) JoinArgsBy ¶
JoinArgsBy returns list of function arguments as concatenated string with name and type.
type Struct ¶
Struct represents simplified Struct in Golang AST. Name is the name of the struct. Fields is a slice of TypeArg and represents struct fields.
type TypeArg ¶
TypeArg represents simplified argument in Golang AST. Name is the name of the argument. Type is type of the argument defined as string - i.e. "string", "int", "Address" etc.
func (TypeArg) ExportName ¶
ExportName converts function argument name to TitleCase.
func (TypeArg) ExportType ¶
ExportType converts function argument type to TitleCase excluding golang primitive types.
type TypeField ¶
TypeField represents simplified struct field in Golang AST. Name is the name of the field. Type is type of the field defined as string - i.e. "string", "int", "Address" etc. JsonName is the name of the field used in `json:` tag.
func (TypeField) ExportName ¶
ExportName converts field name to TitleCase.
func (TypeField) ExportType ¶
ExportType converts field name to TitleCase excluding golang primitive types.
func (TypeField) PointerType ¶
PointerType converts TypeField to pointer type, excluding arrays/slices/maps.