ast

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: MIT Imports: 0 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 {
	Name     string
	Value    Value
	Location Location
}

type BooleanValue

type BooleanValue struct {
	Value    string
	Location Location
}

func (*BooleanValue) GetLocation added in v0.2.0

func (v *BooleanValue) GetLocation() Location

func (*BooleanValue) GetValue

func (v *BooleanValue) GetValue() interface{}

func (*BooleanValue) Kind

func (v *BooleanValue) Kind() ValueKind

type Directive

type Directive struct {
	Name      string
	Arguments []*Argument
	Location  Location
}

type Document

type Document struct {
	Operations []*Operation
	Fragments  []*Fragment
}

func NewDocument

func NewDocument() *Document

type EnumValue

type EnumValue struct {
	Value    string
	Location Location
}

func (*EnumValue) GetLocation added in v0.2.0

func (v *EnumValue) GetLocation() Location

func (*EnumValue) GetValue

func (v *EnumValue) GetValue() interface{}

func (*EnumValue) Kind

func (v *EnumValue) Kind() ValueKind

type Field

type Field struct {
	Alias        string
	Name         string
	ParentType   string
	Arguments    []*Argument
	Directives   []*Directive
	SelectionSet []Selection
	Location     Location
}

func (*Field) GetDirectives

func (f *Field) GetDirectives() []*Directive

func (*Field) Kind

func (f *Field) Kind() SelectionKind

type Fields

type Fields []*Field

type FloatValue

type FloatValue struct {
	Value    string
	Location Location
}

func (*FloatValue) GetLocation added in v0.2.0

func (v *FloatValue) GetLocation() Location

func (*FloatValue) GetValue

func (v *FloatValue) GetValue() interface{}

func (*FloatValue) Kind

func (v *FloatValue) Kind() ValueKind

type Fragment

type Fragment struct {
	Name          string
	TypeCondition string
	Directives    []*Directive
	SelectionSet  []Selection
	Location      Location
}

type FragmentSpread

type FragmentSpread struct {
	Name       string
	Directives []*Directive
	Location   Location
}

func (*FragmentSpread) GetDirectives

func (fs *FragmentSpread) GetDirectives() []*Directive

func (*FragmentSpread) Kind

func (fs *FragmentSpread) Kind() SelectionKind

type InlineFragment

type InlineFragment struct {
	TypeCondition string
	Directives    []*Directive
	SelectionSet  []Selection
	Location      Location
}

func (*InlineFragment) GetDirectives

func (inf *InlineFragment) GetDirectives() []*Directive

func (*InlineFragment) Kind

func (inf *InlineFragment) Kind() SelectionKind

type IntValue

type IntValue struct {
	Value    string
	Location Location
}

func (*IntValue) GetLocation added in v0.2.0

func (v *IntValue) GetLocation() Location

func (*IntValue) GetValue

func (v *IntValue) GetValue() interface{}

func (*IntValue) Kind

func (v *IntValue) Kind() ValueKind

type ListType

type ListType struct {
	Type
	Location Location
}

func (*ListType) GetValue

func (t *ListType) GetValue() interface{}

func (*ListType) Kind

func (t *ListType) Kind() TypeKind

type ListValue

type ListValue struct {
	Values   []Value
	Location Location
}

func (*ListValue) GetLocation added in v0.2.0

func (v *ListValue) GetLocation() Location

func (*ListValue) GetValue

func (v *ListValue) GetValue() interface{}

func (*ListValue) Kind

func (v *ListValue) Kind() ValueKind

type Location

type Location struct {
	Column int
	Line   int
}

type NamedType

type NamedType struct {
	Name     string
	Location Location
}

func (*NamedType) GetValue

func (t *NamedType) GetValue() interface{}

func (*NamedType) Kind

func (t *NamedType) Kind() TypeKind

type NonNullType

type NonNullType struct {
	Type
	Location Location
}

func (*NonNullType) GetValue

func (t *NonNullType) GetValue() interface{}

func (*NonNullType) Kind

func (t *NonNullType) Kind() TypeKind

type NullValue

type NullValue struct {
	Value    string
	Location Location
}

func (*NullValue) GetLocation added in v0.2.0

func (v *NullValue) GetLocation() Location

func (*NullValue) GetValue

func (v *NullValue) GetValue() interface{}

func (*NullValue) Kind

func (v *NullValue) Kind() ValueKind

type ObjectFieldValue

type ObjectFieldValue struct {
	Name     string
	Value    Value
	Location Location
}

func (*ObjectFieldValue) GetLocation added in v0.2.0

func (v *ObjectFieldValue) GetLocation() Location

func (*ObjectFieldValue) GetValue

func (v *ObjectFieldValue) GetValue() interface{}

func (*ObjectFieldValue) Kind

func (v *ObjectFieldValue) Kind() ValueKind

type ObjectValue

type ObjectValue struct {
	Fields   []*ObjectFieldValue
	Location Location
}

func (*ObjectValue) GetLocation added in v0.2.0

func (v *ObjectValue) GetLocation() Location

func (*ObjectValue) GetValue

func (v *ObjectValue) GetValue() interface{}

func (*ObjectValue) Kind

func (v *ObjectValue) Kind() ValueKind

type Operation

type Operation struct {
	OperationType OperationType
	Name          string
	Variables     []*Variable
	Directives    []*Directive
	SelectionSet  []Selection
	Location      Location
}

func NewOperation

func NewOperation(ot OperationType) *Operation

type OperationType

type OperationType int
const (
	Query OperationType = iota
	Mutation
	Subscription
)

type Selection

type Selection interface {
	Kind() SelectionKind
	GetDirectives() []*Directive
}

type SelectionKind

type SelectionKind int
const (
	FieldSelectionKind SelectionKind = iota
	FragmentSpreadSelectionKind
	InlineFragmentSelectionKind
)

type StringValue

type StringValue struct {
	Value    string
	Location Location
}

func (*StringValue) GetLocation added in v0.2.0

func (v *StringValue) GetLocation() Location

func (*StringValue) GetValue

func (v *StringValue) GetValue() interface{}

func (*StringValue) Kind

func (v *StringValue) Kind() ValueKind

type Type

type Type interface {
	Kind() TypeKind
	GetValue() interface{}
}

type TypeKind

type TypeKind int
const (
	Named TypeKind = iota
	List
	NonNull
)

type Value

type Value interface {
	GetValue() interface{}
	Kind() ValueKind
	GetLocation() Location
}

type ValueKind

type ValueKind int
const (
	VariableValueKind ValueKind = iota
	IntValueKind
	FloatValueKind
	BooleanValueKind
	StringValueKind
	NullValueKind
	EnumValueKind
	ListValueKind
	ObjectValueKind
	ObjectFieldValueKind
)

type Variable

type Variable struct {
	Name         string
	Type         Type
	DefaultValue Value
	Location     Location
}

type VariableValue

type VariableValue struct {
	Name     string
	Location Location
}

func (*VariableValue) GetLocation added in v0.2.0

func (v *VariableValue) GetLocation() Location

func (*VariableValue) GetValue

func (v *VariableValue) GetValue() interface{}

func (*VariableValue) Kind

func (v *VariableValue) Kind() ValueKind

Jump to

Keyboard shortcuts

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