protogen

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateImport

func GenerateImport(name string, importPath string, g *protogen.GeneratedFile) string

func GetBaseTypeOption

func GetBaseTypeOption[T any](desc protoreflect.Descriptor, xt protoreflect.ExtensionType, def T) T

func GetOption

func GetOption[T any](desc protoreflect.Descriptor, xt protoreflect.ExtensionType, def T) T

func GetStructTypeOption

func GetStructTypeOption[T any](desc protoreflect.Descriptor, xt protoreflect.ExtensionType, def *T) *T

func PrintComments

func PrintComments(comments protogen.CommentSet, g *protogen.GeneratedFile)

func SetExtension

func SetExtension[T any](desc protoreflect.Descriptor, extension *protoimpl.ExtensionInfo, value T)

Types

type BaseType

type BaseType interface {
}

这泛型真别扭

type Generator

type Generator struct {
	*protogen.Plugin
}

Jump to

Keyboard shortcuts

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