internal

package
v0.1.0-pre.0...-cad3618 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MessageToSchema

func MessageToSchema(ctx context.Context, m *protokit.Descriptor) *options.Schema

MessageToSchema converts a descriptor into a schema object for swagger

func MethodToPath

func MethodToPath(ctx context.Context, method *protokit.MethodDescriptor, tag string) *options.Path

MethodToPath generates a Path object for a service method. Since we're being twirp specific, only the POST method is defined.

func ServicesToTags

func ServicesToTags(ctx context.Context, svcs []*protokit.ServiceDescriptor) []*options.Tag

ServicesToTags creates swagger Tag objects based on service names and descriptions

Types

type Plugin

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

Plugin describes the main entrypoint into this plugin

func (*Plugin) Generate

func (p *Plugin) Generate(r *plugin_go.CodeGeneratorRequest) (*plugin_go.CodeGeneratorResponse, error)

Generate generates a code generator response with a single output file (swagger.json).

Jump to

Keyboard shortcuts

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