server

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2022 License: Apache-2.0 Imports: 24 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQueryer

func NewQueryer(pm generator.Registry, caller Caller) graphql.Queryer

func Server added in v0.9.0

func Server(cfg *Config) (http.Handler, error)

Types

type Authentication added in v0.9.0

type Authentication struct {
	Tls *Tls `json:"tls" yaml:"tls"`
}

type Caller

type Caller interface {
	Call(ctx context.Context, rpc *desc.MethodDescriptor, message proto.Message) (proto.Message, error)
}

func NewReflectCaller

func NewReflectCaller(config *Grpc) (_ Caller, descs []*desc.FileDescriptor, err error)

type Config added in v0.9.0

type Config struct {
	Grpc       *Grpc         `json:"grpc" yaml:"grpc"`
	Cors       *cors.Options `json:"cors" yaml:"cors"`
	Playground *bool         `json:"playground" yaml:"playground"`
	Address    string        `json:"address" yaml:"address"`
	Tls        *Tls          `json:"tls" yaml:"tls"`
}

func DefaultConfig added in v0.10.0

func DefaultConfig() *Config

type Grpc added in v0.9.0

type Grpc struct {
	Services    []*Service
	ImportPaths []string
}

type QueryerLogger

type QueryerLogger struct {
	Next graphql.Queryer
}

func (QueryerLogger) Query

func (q QueryerLogger) Query(ctx context.Context, input *graphql.QueryInput, i interface{}) (err error)

type Service added in v0.9.0

type Service struct {
	Address        string          `json:"address" yaml:"address"`
	Authentication *Authentication `json:"authentication" yaml:"authentication"`
	Reflection     bool            `json:"reflection" yaml:"reflection"`
	ProtoFiles     []string        `json:"proto_files" yaml:"proto_files"`
}

type Tls added in v0.9.0

type Tls struct {
	Certificate string `json:"certificate" yaml:"certificate"`
	PrivateKey  string `json:"private_key" yaml:"private_key"`
}

Jump to

Keyboard shortcuts

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