protoresolvergen

package
v0.0.0-...-c4be6ef Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Objects                      []*codegen.Object
	Resolvers                    []*Resolver
	Imports                      []*goutil.Import
	ProtoResolverRemainingSource string
	// contains filtered or unexported fields
}

func (*File) ProtoResolverGoFilename

func (f *File) ProtoResolverGoFilename() string

func (*File) ProtoResolverImplementationName

func (f *File) ProtoResolverImplementationName(obj *codegen.Object) string

func (*File) ResolverImplementationName

func (f *File) ResolverImplementationName(obj *codegen.Object) string

func (*File) ResolverTypeName

func (f *File) ResolverTypeName() string

type Files

type Files struct {
	Files map[string]*File
	// contains filtered or unexported fields
}

func NewFiles

func NewFiles(cfg config.ResolverConfig, modelCfg config.PackageConfig, schema *ast.Schema) *Files

func (*Files) FindOrInitialize

func (f *Files) FindOrInitialize(gqlFilename string) *File

type Plugin

type Plugin struct {
}

func New

func New() *Plugin

func (*Plugin) GenerateCode

func (p *Plugin) GenerateCode(data *codegen.Data) error

func (*Plugin) Name

func (p *Plugin) Name() string

type Resolver

type Resolver struct {
	*codegen.Field

	ProtoField        *gqlutil.ProtoFieldDirective
	GQLTypeDefinition *ast.Definition
	// contains filtered or unexported fields
}

func (*Resolver) ArgList

func (r *Resolver) ArgList() (string, error)

func (*Resolver) ImplementationName

func (r *Resolver) ImplementationName() string

func (*Resolver) ModelFromProtoFunc

func (r *Resolver) ModelFromProtoFunc(def *ast.Definition, slice bool) string

func (*Resolver) ModelToProtoFunc

func (r *Resolver) ModelToProtoFunc(def *ast.Definition, slice bool) string

func (*Resolver) ProtoImplementationName

func (r *Resolver) ProtoImplementationName() string

func (*Resolver) ProtoResolverBody

func (r *Resolver) ProtoResolverBody() string

func (*Resolver) ResolverArgs

func (r *Resolver) ResolverArgs() ([]ResolverArg, error)

func (*Resolver) ResolverModelFromProtoFunc

func (r *Resolver) ResolverModelFromProtoFunc() string

func (*Resolver) ShortProtoResolverDeclaration

func (r *Resolver) ShortProtoResolverDeclaration() (string, error)

type ResolverArg

type ResolverArg struct {
	Name, Type string
}

Jump to

Keyboard shortcuts

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