schema

package
v0.0.0-...-743acb9 Latest Latest
Warning

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

Go to latest
Published: May 25, 2017 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectiveDecl

type DirectiveDecl struct {
	Name string
	Desc string
	Locs []string
	Args common.InputValueList
}

type Enum

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

func (*Enum) Description

func (t *Enum) Description() string

func (*Enum) Kind

func (*Enum) Kind() string

func (*Enum) String

func (t *Enum) String() string

func (*Enum) TypeName

func (t *Enum) TypeName() string

type EnumValue

type EnumValue struct {
	Name       string
	Directives common.DirectiveList
	Desc       string
}

type Field

type Field struct {
	Name       string
	Args       common.InputValueList
	Type       common.Type
	Directives common.DirectiveList
	Desc       string
}

type FieldList

type FieldList []*Field

func (FieldList) Get

func (l FieldList) Get(name string) *Field

func (FieldList) Names

func (l FieldList) Names() []string

type InputObject

type InputObject struct {
	Name   string
	Desc   string
	Values common.InputValueList
}

func (*InputObject) Description

func (t *InputObject) Description() string

func (*InputObject) Kind

func (*InputObject) Kind() string

func (*InputObject) String

func (t *InputObject) String() string

func (*InputObject) TypeName

func (t *InputObject) TypeName() string

type Interface

type Interface struct {
	Name          string
	PossibleTypes []*Object
	Fields        FieldList
	Desc          string
}

func (*Interface) Description

func (t *Interface) Description() string

func (*Interface) Kind

func (*Interface) Kind() string

func (*Interface) String

func (t *Interface) String() string

func (*Interface) TypeName

func (t *Interface) TypeName() string

type NamedType

type NamedType interface {
	common.Type
	TypeName() string
	Description() string
}

type Object

type Object struct {
	Name       string
	Interfaces []*Interface
	Fields     FieldList
	Desc       string
	// contains filtered or unexported fields
}

func (*Object) Description

func (t *Object) Description() string

func (*Object) Kind

func (*Object) Kind() string

func (*Object) String

func (t *Object) String() string

func (*Object) TypeName

func (t *Object) TypeName() string

type Scalar

type Scalar struct {
	Name string
	Desc string
}

func (*Scalar) Description

func (t *Scalar) Description() string

func (*Scalar) Kind

func (*Scalar) Kind() string

func (*Scalar) String

func (t *Scalar) String() string

func (*Scalar) TypeName

func (t *Scalar) TypeName() string

type Schema

type Schema struct {
	EntryPoints map[string]NamedType
	Types       map[string]NamedType
	Directives  map[string]*DirectiveDecl
	// contains filtered or unexported fields
}
var Meta *Schema

func New

func New() *Schema

func (*Schema) Parse

func (s *Schema) Parse(schemaString string) error

func (*Schema) Resolve

func (s *Schema) Resolve(name string) common.Type

type Union

type Union struct {
	Name          string
	PossibleTypes []*Object
	Desc          string
	// contains filtered or unexported fields
}

func (*Union) Description

func (t *Union) Description() string

func (*Union) Kind

func (*Union) Kind() string

func (*Union) String

func (t *Union) String() string

func (*Union) TypeName

func (t *Union) TypeName() string

Jump to

Keyboard shortcuts

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