internal

package
v0.0.0-...-da76002 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "v0.0.1"

Version is the current protoc-gen-go-http version.

Variables

This section is empty.

Functions

func EnablePlugins

func EnablePlugins(param string)

func GenerateFile

func GenerateFile(gen *protogen.Plugin, file *protogen.File) *protogen.GeneratedFile

GenerateFile generates a _fast.pb.go file implement fast marshalling and unmarshalling.

func RegisterPlugin

func RegisterPlugin(p Plugin)

RegisterPlugin installs a (second-order) plugin to be run when the Go output is generated. It is typically called during initialization.

Types

type Plugin

type Plugin interface {
	// Name identifies the plugin.
	Name() string
	// Init is called once after data structures are built but before
	// code generation begins.
	// Init(g *Generator)
	Init()
	// Generate produces the code generated by the plugin for messages in this file,
	GenerateMessage(gen *protogen.Plugin, g *protogen.GeneratedFile, f *protogen.File, idx int, m *protogen.Message)
}

A Plugin provides functionality to add to the output during Go code generation, such as to produce RPC stubs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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