Documentation
¶
Index ¶
- func NewLayerTypeName(base, thisField string) string
- type Argument
- type Fragment
- type GenGettersGenerator
- type Operation
- type OperationResponse
- type ResponseField
- type ResponseFieldList
- func (rs ResponseFieldList) IsBasicType() bool
- func (rs ResponseFieldList) IsFragment() bool
- func (rs ResponseFieldList) IsFragmentSpread() bool
- func (rs ResponseFieldList) IsStructType() bool
- func (rs ResponseFieldList) MapByName() map[string]*ResponseField
- func (rs ResponseFieldList) SortByName() ResponseFieldList
- func (rs ResponseFieldList) StructType() *types.Struct
- type Source
- type SourceGenerator
- func (r *SourceGenerator) NewResponseField(selection ast.Selection, typeName string) *ResponseField
- func (r *SourceGenerator) NewResponseFields(selectionSet ast.SelectionSet, typeName string) ResponseFieldList
- func (r *SourceGenerator) OperationArguments(variableDefinitions ast.VariableDefinitionList) []*Argument
- func (r *SourceGenerator) OperationResponse(selection ast.Selection) *OperationResponse
- func (r *SourceGenerator) Type(typeName string) types.Type
- type StructGenerator
- type StructSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLayerTypeName ¶
Types ¶
type GenGettersGenerator ¶
type GenGettersGenerator struct {
// contains filtered or unexported fields
}
func NewGenGettersGenerator ¶
func NewGenGettersGenerator(queryGenPackageName string) *GenGettersGenerator
type Operation ¶
type Operation struct {
Name string
VariableDefinitions ast.VariableDefinitionList
Operation string
Args []*Argument
OperationResponse *OperationResponse
}
func NewOperation ¶
func NewOperation(operation *ast.OperationDefinition, queryDocument *ast.QueryDocument, args []*Argument, operationResponse *OperationResponse) *Operation
type OperationResponse ¶
type ResponseField ¶
type ResponseField struct {
Name string
IsFragmentSpread bool
IsInlineFragment bool
Type types.Type
Tags []string
ResponseFields ResponseFieldList
}
func (ResponseField) FieldTypeString ¶
func (r ResponseField) FieldTypeString() string
type ResponseFieldList ¶
type ResponseFieldList []*ResponseField
func (ResponseFieldList) IsBasicType ¶
func (rs ResponseFieldList) IsBasicType() bool
func (ResponseFieldList) IsFragment ¶
func (rs ResponseFieldList) IsFragment() bool
func (ResponseFieldList) IsFragmentSpread ¶
func (rs ResponseFieldList) IsFragmentSpread() bool
func (ResponseFieldList) IsStructType ¶
func (rs ResponseFieldList) IsStructType() bool
func (ResponseFieldList) MapByName ¶
func (rs ResponseFieldList) MapByName() map[string]*ResponseField
func (ResponseFieldList) SortByName ¶
func (rs ResponseFieldList) SortByName() ResponseFieldList
func (ResponseFieldList) StructType ¶
func (rs ResponseFieldList) StructType() *types.Struct
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
func NewSource ¶
func NewSource(schema *ast.Schema, queryDocument *ast.QueryDocument, sourceGenerator *SourceGenerator) *Source
func (*Source) OperationResponses ¶
func (s *Source) OperationResponses() ([]*OperationResponse, error)
func (*Source) Operations ¶
func (s *Source) Operations(queryDocuments []*ast.QueryDocument) ([]*Operation, error)
func (*Source) ResponseSubTypes ¶
func (s *Source) ResponseSubTypes() []*StructSource
type SourceGenerator ¶
type SourceGenerator struct {
StructSources []*StructSource
// contains filtered or unexported fields
}
func NewSourceGenerator ¶
func NewSourceGenerator(cfg *config.Config) *SourceGenerator
func (*SourceGenerator) NewResponseField ¶
func (r *SourceGenerator) NewResponseField(selection ast.Selection, typeName string) *ResponseField
func (*SourceGenerator) NewResponseFields ¶
func (r *SourceGenerator) NewResponseFields(selectionSet ast.SelectionSet, typeName string) ResponseFieldList
func (*SourceGenerator) OperationArguments ¶
func (r *SourceGenerator) OperationArguments(variableDefinitions ast.VariableDefinitionList) []*Argument
func (*SourceGenerator) OperationResponse ¶
func (r *SourceGenerator) OperationResponse(selection ast.Selection) *OperationResponse
type StructGenerator ¶
type StructGenerator struct {
// contains filtered or unexported fields
}
func NewStructGenerator ¶
func NewStructGenerator(responseFieldList ResponseFieldList) *StructGenerator
func (*StructGenerator) GetCurrentResponseFieldList ¶
func (g *StructGenerator) GetCurrentResponseFieldList() ResponseFieldList
func (*StructGenerator) MergedStructSources ¶
func (g *StructGenerator) MergedStructSources(sources []*StructSource) []*StructSource
type StructSource ¶
Click to show internal directories.
Click to hide internal directories.