transport

package
v2.4.9 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

View Source
const IsVersion2 = "v2"

IsVersion2 is a static check for lib<->generator version mismatch.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompoundServiceDesc

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

func NewCompoundServiceDesc

func NewCompoundServiceDesc(desc ...ServiceDesc) *CompoundServiceDesc

func (*CompoundServiceDesc) Apply added in v2.2.0

func (d *CompoundServiceDesc) Apply(oo ...DescOption)

func (*CompoundServiceDesc) RegisterGRPC

func (d *CompoundServiceDesc) RegisterGRPC(g *grpc.Server)

func (*CompoundServiceDesc) RegisterHTTP

func (d *CompoundServiceDesc) RegisterHTTP(r Router)

func (*CompoundServiceDesc) SwaggerDef

func (d *CompoundServiceDesc) SwaggerDef(options ...swagger.Option) []byte

type ConfigurableServiceDesc added in v2.2.0

type ConfigurableServiceDesc interface {
	Apply(...DescOption)
}

ConfigurableServiceDesc is implemented by configurable ServiceDescs.

type DescOption added in v2.2.0

type DescOption interface {
	Apply(*httptransport.DescOptions)
}

DescOption modifies the ServiceDesc's behaviour.

func WithSwaggerOptions added in v2.2.0

func WithSwaggerOptions(o ...swagger.Option) DescOption

WithSwaggerOptions sets up default Swagger options for the SwaggerDef().

func WithUnaryInterceptor added in v2.2.0

func WithUnaryInterceptor(i grpc.UnaryServerInterceptor) DescOption

WithUnaryInterceptor sets up the interceptor for incoming calls.

type Router

type Router interface {
	http.Handler
	Handle(pattern string, h http.Handler)
}

Router routes HTTP requests around.

type Service

type Service interface {
	GetDescription() ServiceDesc
}

Service is a registerable collection of endpoints. These functions should be autogenerated by protoc-gen-goclay.

type ServiceDesc

type ServiceDesc interface {
	RegisterGRPC(*grpc.Server)
	RegisterHTTP(Router)
	SwaggerDef(options ...swagger.Option) []byte
}

ServiceDesc is a description of an endpoints' collection. These functions should be autogenerated by protoc-gen-goclay.

Directories

Path Synopsis
httpmw
Package httpmw provides middlewares that are automatically used by the generated code.
Package httpmw provides middlewares that are automatically used by the generated code.
middlewares
mwcommon
Package mwcommon is DEPRECATED, left for backwards compatibility.
Package mwcommon is DEPRECATED, left for backwards compatibility.
mwgrpc
Package mwgrpc is DEPRECATED, left for backwards compatibility.
Package mwgrpc is DEPRECATED, left for backwards compatibility.
mwhttp
Package mwhttp is DEPRECATED, left for backwards compatibility.
Package mwhttp is DEPRECATED, left for backwards compatibility.
Package server is DEPRECATED, left for backwards compatibility.
Package server is DEPRECATED, left for backwards compatibility.

Jump to

Keyboard shortcuts

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