Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllDefined ¶
func AllDefined[T protoreflect.Enum](_ ...T) []T
AllDefined returns all defined values of the enum type. It includes the zero (_UNSPECIFIED) value.
func AllSpecified ¶
func AllSpecified[T protoreflect.Enum](_ ...T) []T
AllSpecified returns all specified values of the enum type. It excludes the zero (_UNSPECIFIED) value.
func IsDefined ¶
func IsDefined[T protoreflect.Enum](enum T) bool
IsDefined returns true if the enum value is defined in the enum type.
func IsSpecified ¶
func IsSpecified[T protoreflect.Enum](enum T) bool
IsSpecified returns true if the enum value is defined and not the zero value.
func ShortName ¶
func ShortName[T protoreflect.Enum](enum T) string
ShortName returns the short name in the lower case of the enum value. For example, "TEST_ENUM_TYPE_FOO" -> "foo".
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.