app

package
v0.0.0-...-dd21699 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetName

func GetName() string

func GetVersion

func GetVersion() string

func SetName

func SetName(n string)

func SetVersion

func SetVersion(v string)

Types

type Generator

type Generator interface {
	Name() string
	Generate(*protogen.Plugin, *protogen.File) (*protogen.GeneratedFile, error)
}

type Option

type Option func(*ProtocPlugin)

func ApplyGenerators

func ApplyGenerators(g ...Generator) Option

func ApplyInput

func ApplyInput(fs fs.File) Option

func ApplyOutput

func ApplyOutput(fs io.Writer) Option

type ProtocPlugin

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

func NewProtocPluginApp

func NewProtocPluginApp(options ...Option) *ProtocPlugin

func (*ProtocPlugin) Apply

func (p *ProtocPlugin) Apply(options ...Option)

func (*ProtocPlugin) GetOutput

func (p *ProtocPlugin) GetOutput() io.Writer

func (*ProtocPlugin) GetProtoGenPlugin

func (p *ProtocPlugin) GetProtoGenPlugin(req *pluginpb.CodeGeneratorRequest) (*protogen.Plugin, error)

func (*ProtocPlugin) MakeFiles

func (p *ProtocPlugin) MakeFiles(plugin *protogen.Plugin) error

func (*ProtocPlugin) Register

func (p *ProtocPlugin) Register(generators ...Generator)

func (*ProtocPlugin) Run

func (p *ProtocPlugin) Run() error

Jump to

Keyboard shortcuts

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