genhandler

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

func New

func New(reg *descriptor.Registry, opts ...Option) *Generator

New returns a new generator which generates handler wrappers.

func (*Generator) Generate

func (g *Generator) Generate(targets []*descriptor.File) ([]*plugin.CodeGeneratorResponse_File, error)

type Option

type Option func(*options)

func ApplyDefaultMiddlewares

func ApplyDefaultMiddlewares(apply bool) Option

ApplyDefaultMiddlewares toggles application of httpruntime/httpmw.DefaultChain to every generated handler.

func DescPath

func DescPath(path string) Option

DescPath sets path for description and swagger file

func Force

func Force(force bool) Option

Force sets force mode for generation implementation

func Impl

func Impl(impl bool) Option

Impl sets Impl flag option (if true implementation will be generated)

func ImplPath

func ImplPath(path string) Option

ImplPath sets path for implementation file

func SwaggerDef

func SwaggerDef(swaggerDef map[string][]byte) Option

SwaggerDef sets map of swagger.json per proto file

Jump to

Keyboard shortcuts

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