protoc

package
v0.0.0-...-7149754 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package protoc provides high level access to protoc command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(ctx context.Context, outDir, protoPath string, includePaths, protocOuts []string, options ...Option) error

Generate generates code into outDir from protoPath and its includePaths by using plugins provided with protocOuts.

Types

type Cmd

type Cmd struct {
	Command  []string
	Included []string
}

func Command

func Command() (command Cmd, cleanup func(), err error)

Command sets the protoc binary up and returns the command needed to execute c.

type Option

type Option func(*configs)

Option configures Generate configs.

func GenerateDependencies

func GenerateDependencies() Option

GenerateDependencies enables code generation for the proto files that your protofile depends on. use this if your protoc plugin does not give you an option to enable the same feature.

func Plugin

func Plugin(path string, options ...string) Option

Plugin configures a plugin for code generation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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