Mike Schwörer
af38b06d22
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 58s
32 lines
584 B
Go
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"`
|
|
}
|