helper

package
v0.0.0-...-af867be Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 9 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 ParseCppClassType

func ParseCppClassType(md protoreflect.MessageDescriptor) string

func ParseCppType

func ParseCppType(fd protoreflect.FieldDescriptor) string

ParseCppType converts a FieldDescriptor to C++ type string.

func ParseIndexFieldName

func ParseIndexFieldName(fd protoreflect.FieldDescriptor) string

func ParseIndexFieldNameAsFuncParam

func ParseIndexFieldNameAsFuncParam(fd protoreflect.FieldDescriptor) string

func ParseIndexFieldNameAsKeyStructFieldName

func ParseIndexFieldNameAsKeyStructFieldName(fd protoreflect.FieldDescriptor) 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