goext/enums/enum.go
Mike Schwörer af38b06d22
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 58s
v0.0.335 added DescriptionMeta to enum codegen
2023-12-05 19:38:03 +01:00

32 lines
584 B
Go

package enums
type Enum interface {
Valid() bool
ValuesAny() []any
ValuesMeta() []EnumMetaValue
VarName() 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"`
}