Documentation ¶
Index ¶
- func MustRegisterImplFileNameTemplate(tmpl string)
- func MustRegisterImplTypeNameTemplate(tmpl string)
- type Generator
- type Option
- func ApplyDefaultMiddlewares(apply bool) Option
- func DescPath(path string) Option
- func Force(force bool) Option
- func Impl(impl bool) Option
- func ImplPath(path string) Option
- func ServiceSubDir(subDir bool) Option
- func SwaggerDef(swaggerDef map[string][]byte) Option
- func SwaggerPath(swaggerPath string) Option
- func WithTests(needTests bool) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustRegisterImplFileNameTemplate ¶
func MustRegisterImplFileNameTemplate(tmpl string)
func MustRegisterImplTypeNameTemplate ¶
func MustRegisterImplTypeNameTemplate(tmpl string)
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 ¶
ApplyDefaultMiddlewares toggles application of httpruntime/httpmw.DefaultChain to every generated handler.
func ServiceSubDir ¶
ServiceSubDir sets impl generation into sub directory
func SwaggerDef ¶
SwaggerDef sets map of swagger.json per proto file
func SwaggerPath ¶
SwaggerPath sets path to store separate swagger files
Click to show internal directories.
Click to hide internal directories.