ast

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 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
}

type BooleanValue

type BooleanValue struct {
	Value string
}

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
}

type Document

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

func NewDocument

func NewDocument() *Document

type EnumValue

type EnumValue struct {
	Value string
}

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
	Arguments    []*Argument
	Directives   []*Directive
	SelectionSet []Selection
}

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
}

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
}

type FragmentSpread

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

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
}

func (*InlineFragment) GetDirectives

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

func (*InlineFragment) Kind

func (inf *InlineFragment) Kind() SelectionKind

type IntValue

type IntValue struct {
	Value string
}

func (*IntValue) GetValue

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

func (*IntValue) Kind

func (v *IntValue) Kind() ValueKind

type ListType

type ListType struct {
	Type
}

func (*ListType) GetValue

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

func (*ListType) Kind

func (t *ListType) Kind() TypeKind

type ListValue

type ListValue struct {
	Values []Value
}

func (*ListValue) GetValue

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

func (*ListValue) Kind

func (v *ListValue) Kind() ValueKind

type NamedType

type NamedType struct {
	Name string
}

func (*NamedType) GetValue

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

func (*NamedType) Kind

func (t *NamedType) Kind() TypeKind

type NonNullType

type NonNullType struct {
	Type
}

func (*NonNullType) GetValue

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

func (*NonNullType) Kind

func (t *NonNullType) Kind() TypeKind

type NullValue

type NullValue struct {
	Value string
}

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
}

func (*ObjectFieldValue) GetValue

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

func (*ObjectFieldValue) Kind

func (v *ObjectFieldValue) Kind() ValueKind

type ObjectValue

type ObjectValue struct {
	Fields []*ObjectFieldValue
}

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
}

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
}

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
}

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
}

type VariableValue

type VariableValue struct {
	Name string
}

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