appprotogen

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(f func(*protogen.Plugin) error) appproto.Handler

NewHandler returns a new Handler for the protogen Plugin function.

func NewPerFileHandler added in v0.32.1

func NewPerFileHandler(f func(*protogen.Plugin, *protogen.File) error) appproto.Handler

NewPerFileHandler returns a newHandler for the protogen per-file function.

This will invoke f for every file marked for generation.

func NewPerGoPackageHandler added in v0.32.1

func NewPerGoPackageHandler(f func(*protogen.Plugin, *GoPackageFileSet) error) appproto.Handler

NewPerGoPackageHandler returns a newHandler for the protogen per-package function.

This validates that all files marked for generation that would be generated to the same directory also have the same go package and go import path.

This will invoke f for every set of files in a package marked for generation.

Types

type GoPackageFileSet added in v0.32.1

type GoPackageFileSet struct {
	// The directory the golang/protobuf files would be generated to.
	GeneratedDir string
	// The Go import path the golang/protobuf files would be generated to.
	GoImportPath protogen.GoImportPath
	// The Go package name the golang/protobuf files would be generated to.
	GoPackageName protogen.GoPackageName
	// The files within this package.
	Files []*protogen.File
}

GoPackageFileSet are files within a single Go package.

func (*GoPackageFileSet) Services added in v0.32.1

func (g *GoPackageFileSet) Services() []*protogen.Service

Services returns all the services in this Go package sorted by Go name.

Jump to

Keyboard shortcuts

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