proto_gen_lib

package
v0.0.0-...-9037792 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PathsSourceRelative bool

Functions

func CamelCase

func CamelCase(s string) string

CamelCase returns the CamelCased name. If there is an interior underscore followed by a lower case letter, drop the underscore and convert the letter to upper case. There is a remote possibility of this rewrite causing a name collision, but it's so remote we're prepared to pretend it's nonexistent - since the C++ generator lowercases names, it's extremely unlikely to have two fields with different capitalizations. In short, _my_field_name_2 becomes XMyFieldName_2.

func CamelCaseSlice

func CamelCaseSlice(elem []string) string

CamelCaseSlice is like CamelCase, but the argument is a slice of strings to be joined with "_".

func New

func New(name string) *protoGen

func Template

func Template(template string, m M) string

Types

type GoImportPath

type GoImportPath string

A GoImportPath is the import path of a Go package. e.g., "google.golang.org/genproto/protobuf".

func (GoImportPath) String

func (p GoImportPath) String() string

type GoPackageName

type GoPackageName string

type M

type M map[string]interface{}

type Method

type Method struct {
	*descriptor.MethodDescriptorProto
	// contains filtered or unexported fields
}

func (*Method) GetInputType

func (t *Method) GetInputType() string

func (*Method) GetName

func (t *Method) GetName() string

func (*Method) GetOutputType

func (t *Method) GetOutputType() string

type Service

type Service struct {
	*descriptor.ServiceDescriptorProto
	Name string

	J *jen.File
	// contains filtered or unexported fields
}

func (*Service) GetMethod

func (t *Service) GetMethod() (methods []*Method)

func (*Service) TypeName

func (t *Service) TypeName(mthName string) string

Jump to

Keyboard shortcuts

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