2023-08-09 14:40:16 +02:00
|
|
|
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
|
2023-12-05 19:38:03 +01:00
|
|
|
DescriptionMeta() EnumDescriptionMetaValue
|
2023-08-09 14:40:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type EnumMetaValue struct {
|
|
|
|
VarName string `json:"varName"`
|
2023-12-05 19:38:03 +01:00
|
|
|
Value Enum `json:"value"`
|
2023-08-09 14:40:16 +02:00
|
|
|
Description *string `json:"description"`
|
|
|
|
}
|
2023-12-05 19:38:03 +01:00
|
|
|
|
|
|
|
type EnumDescriptionMetaValue struct {
|
|
|
|
VarName string `json:"varName"`
|
|
|
|
Value Enum `json:"value"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
}
|