schema

package
v0.0.0-...-fc4761b Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: MIT Imports: 17 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 {
	Description string
	Name        string
	Values      []*EnumValue
}

type EnumValue

type EnumValue struct {
	Description string
	Name        string
	NameLower   string
}

type Field

type Field struct {
	Name               string
	PluralName         string
	TypeWithoutPointer string
	IsPrimaryKey       bool
	IsRequired         bool
	IsPlural           bool
	// relation stuff
	IsRelation bool

	// Some stuff
	Description string
	Type        types.Type
	Tag         string
	Imports     *Imports
}

type FuncType

type FuncType struct {
	Name       string
	Type       string
	IsRequired bool
	IsSlice    bool
}

type Imports

type Imports struct {
	Package *types.Package
	// contains filtered or unexported fields
}

func (*Imports) String

func (i *Imports) String() string

type Interface

type Interface struct {
	Description string
	Name        string
}

type Method

type Method struct {
	Name   string
	Type   string
	Args   []FuncType
	Return FuncType
	// contains filtered or unexported fields
}

type Object

type Object struct {
	Description string
	Name        string
	Fields      []*Field
	Implements  []string
	// contains filtered or unexported fields
}

type Objects

type Objects []*Object

type Scalar

type Scalar struct {
	IsCustom    bool
	Description string
	Name        string
}

type Scalars

type Scalars []*Scalar

func (Scalars) Scalar

func (s Scalars) Scalar(name string) *Scalar

type Schema

type Schema struct {
	Methods    []*Method
	Interfaces []*Interface
	Objects    []*Object
	Inputs     []*Object
	Enums      []*Enum
	Scalars    Scalars

	Types Types
	// contains filtered or unexported fields
}

func New

func New(schemaFiles []string) (*Schema, error)

type Source

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

type Type

type Type struct {
	Type       *Object
	Methods    []Method
	Interfaces []*Interface
	Objects    []*Object
	Inputs     []*Object
	Enums      []*Enum
	Scalars    []*Scalar

	Imports *importers.Set
	// contains filtered or unexported fields
}

type Types

type Types []Type

func (Types) Type

func (t Types) Type(name string) *Type

Jump to

Keyboard shortcuts

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