schema

package
v0.0.0-...-dcd44e0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2017 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
	Desc string
}

type Field

type Field struct {
	Name string
	Args common.InputMap
	Type common.Type
	Desc string
}

type InputObject

type InputObject struct {
	Name string
	Desc string
	common.InputMap
}

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        map[string]*Field
	FieldOrder    []string
	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     map[string]*Field
	FieldOrder []string
	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

	EntryPointNames map[string]string
	Objects         []*Object
	Unions          []*Union
}
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