goext/enums/enum.go
Mike Schwörer 409d6e108d
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m12s
v0.0.402 add PackageName() and TypeName() to enums_codegen
2024-03-10 12:49:31 +01:00

34 lines
625 B
Go

package enums
type Enum interface {
Valid() bool
ValuesAny() []any
ValuesMeta() []EnumMetaValue
VarName() string
TypeName() string
PackageName() string
}
type StringEnum interface {
Enum
String() string
}
type DescriptionEnum interface {
Enum
Description() string
DescriptionMeta() EnumDescriptionMetaValue
}
type EnumMetaValue struct {
VarName string `json:"varName"`
Value Enum `json:"value"`
Description *string `json:"description"`
}
type EnumDescriptionMetaValue struct {
VarName string `json:"varName"`
Value Enum `json:"value"`
Description string `json:"description"`
}