helper

package
v0.0.0-...-7d91a6f Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenGetArguments

func GenGetArguments(keys []MapKey) string

GenGetArguments generates function arguments, which are the real values passed to the function.

func GenGetParams

func GenGetParams(keys []MapKey) string

GenGetParams generates function parameters, which are the names listed in the function's definition.

func GenerateCommonHeader

func GenerateCommonHeader(gen *protogen.Plugin, g *protogen.GeneratedFile, version string)

func GenerateFileHeader

func GenerateFileHeader(gen *protogen.Plugin, file *protogen.File, g *protogen.GeneratedFile, version string)

func KeywordEscape

func KeywordEscape(str string) string

func NeedGenOrderedMap

func NeedGenOrderedMap(md protoreflect.MessageDescriptor) bool

func ParseCppClassType

func ParseCppClassType(md protoreflect.MessageDescriptor) string

func ParseCppType

func ParseCppType(fd protoreflect.FieldDescriptor) string

ParseCppType converts a FieldDescriptor to C++ type string.

func ToConstRefType

func ToConstRefType(cpptype string) string

Types

type MapKey

type MapKey struct {
	Type string
	Name string
}

func AddMapKey

func AddMapKey(fd protoreflect.FieldDescriptor, keys []MapKey) []MapKey

Jump to

Keyboard shortcuts

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