protoc

package
v0.0.0-nightly Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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