execprotoc

package
Version: v0.0.0-...-21e04d4 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package execprotoc provides an interface for interacting with proto requiring only paths to files on disk

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodeGeneratorRequest

func CodeGeneratorRequest(protoPaths, gopath []string) (*plugin.CodeGeneratorRequest, error)

CodeGeneratorRequest returns a protoc CodeGeneratorRequest from running protoc on protoPaths TODO: replace getProtocOutput with some other way of getting the protoc ast. i.e. the binary data that will allow proto.Unmarshal to Unmashal the .proto file into a *plugin.CodeGeneratorRequest

func GeneratePBDotGo

func GeneratePBDotGo(protoPaths, gopath []string, outDir string) error

GeneratePBDotGo creates .pb.go and .validator.pb.go files from the passed protoPaths and writes them to outDir.

func GetProtoImports

func GetProtoImports(protofile string) []string

Types

type ProtoMetaInfo

type ProtoMetaInfo struct {
	IncludePath string
	FilePath    string
	FileName    string

	// go options in proto file
	PackagePath string
	PackageName string

	Imports []string

	ExternalMessages []string
}

func GetProtoMetaInfo

func GetProtoMetaInfo(protofile string) *ProtoMetaInfo

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL