Documentation ¶
Index ¶
- func AppendFieldIfNotExists(fields []*ast.FieldDefinition, field *ast.FieldDefinition) []*ast.FieldDefinition
- func ArgsToFields(args ast.ArgumentDefinitionList) ast.FieldList
- func DirectiveToType(directive *ast.DirectiveDefinition, pos *ast.Position) *ast.Definition
- func FindObjectByResourceName(schema *ast.Schema, name string) *ast.Definition
- func GetDefinedObjects(schema *ast.Schema, hasDirectives ...string) map[string]*ast.Definition
- func GetResourceDirectiveSingularType(schema *ast.Schema, directive *ast.Directive) (*ast.Type, error)
- func IsMutationAction(directive *ast.Directive) bool
- func IsQueryAction(directive *ast.Directive) bool
- func IsXgenDirectiveDefinition(directive *ast.DirectiveDefinition) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFieldIfNotExists ¶
func AppendFieldIfNotExists(fields []*ast.FieldDefinition, field *ast.FieldDefinition) []*ast.FieldDefinition
AppendFieldIfNotExists appends field to fields if it doesn't exist
func ArgsToFields ¶
func ArgsToFields(args ast.ArgumentDefinitionList) ast.FieldList
ArgsToFields converts arguments to fields
func DirectiveToType ¶
func DirectiveToType(directive *ast.DirectiveDefinition, pos *ast.Position) *ast.Definition
DirectiveToType converts directive to type
func FindObjectByResourceName ¶
func FindObjectByResourceName(schema *ast.Schema, name string) *ast.Definition
FindObjectByResourceName finds object by resource name
func GetDefinedObjects ¶
GetDefinedObjects returns all defined objects in schema
func GetResourceDirectiveSingularType ¶
func GetResourceDirectiveSingularType(schema *ast.Schema, directive *ast.Directive) (*ast.Type, error)
GetResourceDirectiveSingularType returns resource directive singular type
func IsMutationAction ¶
IsMutationAction checks if directive is mutation action
func IsQueryAction ¶
IsQueryAction checks if directive is query action
func IsXgenDirectiveDefinition ¶
func IsXgenDirectiveDefinition(directive *ast.DirectiveDefinition) bool
IsXgenDirectiveDefinition checks if directive is xgen directive
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.