generator

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GQLTypeObject   GQLType = GQLType("Object")
	GQLTypeInput            = GQLType("Input")
	GQLTypeScalar           = GQLType("Scalar")
	GQLTypeEnum             = GQLType("Enum")
	GQLTypeQuery            = GQLType("Query")
	GQLTypeMutation         = GQLType("Mutation")
)

Variables

This section is empty.

Functions

func Generate

func Generate()

Types

type GQLIdent added in v0.0.2

type GQLIdent struct {
	protogen.GoIdent
	Type GQLType
	// contains filtered or unexported fields
}

func (*GQLIdent) String added in v0.0.2

func (g *GQLIdent) String() string

type GQLType added in v0.0.2

type GQLType string

type Printer added in v0.0.2

type Printer interface {
	Enter()
	Exit()
	P(...interface{}) Printer
}

type Symbol added in v0.0.2

type Symbol struct {
	Ident  GQLIdent
	Parent *Symbol
}

func NewSymbol added in v0.0.2

func NewSymbol(parent *Symbol, ident GQLIdent) *Symbol

type SymbolTable added in v0.0.2

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

func (*SymbolTable) Append added in v0.0.2

func (t *SymbolTable) Append(s *Symbol)

func (*SymbolTable) Exist added in v0.0.2

func (t *SymbolTable) Exist(ident GQLIdent) bool

func (*SymbolTable) LookUp added in v0.0.2

func (t *SymbolTable) LookUp(ident GQLIdent) (*Symbol, bool)

type Visitor added in v0.0.2

type Visitor interface {
	Content() ([]byte, error)
	Visit(parent *Symbol, f *protogen.File)
	VisitEnum(parent *Symbol, enumDescriptor *protogen.Enum)
	VisitMessage(parent *Symbol, p *protogen.Message, typ GQLType)
	VisitField(symbol *Symbol, p *protogen.Field, typ GQLType)
	VisitOneOf(symbol *Symbol, p *protogen.Oneof, typ GQLType)
	VisitService(symbol *Symbol, p *protogen.Service)
}

func NewVisitor added in v0.0.2

func NewVisitor(f *protogen.File, g *protogen.GeneratedFile, importPath string) Visitor

Jump to

Keyboard shortcuts

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