parser

package
v0.8.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argument

type Argument struct {
	*GoType
	Name    string
	IsArray bool
}

type Enum

type Enum struct {
	*GoType
	Name        string
	Description string
	Values      []*EnumValue
}

type EnumValue

type EnumValue struct {
	Name        string
	Description string
}

type Field

type Field struct {
	*GoType
	Name        string
	Description string
	Tag         string
	IsArray     bool
}

type FieldResolver

type FieldResolver struct {
	Field      *Field
	Parent     *Parent
	Middleware []string
}

type GoType

type GoType struct {
	TypeName *types.TypeName
}

type Interface

type Interface struct {
	*GoType
	Name        string
	Description string
}

type LambdaOnMutateEvent

type LambdaOnMutateEvent string
const (
	ADD    LambdaOnMutateEvent = "add"
	UPDATE LambdaOnMutateEvent = "update"
	DELETE LambdaOnMutateEvent = "delete"
)

type Model

type Model struct {
	*GoType
	Name           string
	Description    string
	Fields         []*Field
	Implements     []*GoType
	LambdaOnMutate []LambdaOnMutateEvent
}

type ModelTree

type ModelTree struct {
	Interfaces map[string]*Interface
	Models     map[string]*Model
	Enums      map[string]*Enum
	Scalars    map[string]*Scalar
}

type Mutation

type Mutation struct {
	Name        string
	Description string
	Arguments   []*Argument
	Return      *Return
	Middleware  []string
}

type Parent added in v0.8.5

type Parent struct {
	*GoType
	Name string
}

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(schema *ast.Schema, packages *internal.Packages, defaultPackage *packages.Package) *Parser

func (*Parser) Parse

func (p *Parser) Parse() (*Tree, error)

type Query

type Query struct {
	Name        string
	Description string
	Arguments   []*Argument
	Return      *Return
	Middleware  []string
}

type ResolverTree

type ResolverTree struct {
	FieldResolvers map[string]*FieldResolver
	Queries        map[string]*Query
	Mutations      map[string]*Mutation
}

type Return added in v0.8.4

type Return struct {
	*GoType
	IsArray bool
}

type Scalar

type Scalar struct {
	*GoType
	Name        string
	Description string
}

type Tree

type Tree struct {
	ModelTree    *ModelTree
	ResolverTree *ResolverTree
	Middleware   map[string]string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL