transport

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: MIT Imports: 8 Imported by: 7

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

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

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

ConfigurableServiceDesc is implemented by configurable ServiceDescs.

type DescOption

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

DescOption modifies the ServiceDesc's behaviour.

func WithSwaggerOptions

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

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

func WithUnaryInterceptor

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