Documentation
¶
Overview ¶
Package enum - Content managed by Project Forge, see [projectforge.md] for details.
Package enum - Content managed by Project Forge, see [projectforge.md] for details.
Package enum - Content managed by Project Forge, see [projectforge.md] for details.
Index ¶
- Variables
- type Enum
- func (e *Enum) Breadcrumbs() string
- func (e *Enum) Camel() string
- func (e *Enum) ExtraFieldValues(k string) ([]any, bool)
- func (e *Enum) ExtraFields() *util.OrderedMap[string]
- func (e *Enum) FirstLetter() any
- func (e *Enum) HasTag(t string) bool
- func (e *Enum) IconSafe() string
- func (e *Enum) PackageWithGroup(prefix string) string
- func (e *Enum) Proper() string
- func (e *Enum) ProperPlural() string
- func (e *Enum) Simple() bool
- func (e *Enum) Title() string
- func (e *Enum) TitleLower() string
- func (e *Enum) ValuesCamel() []string
- type Enums
- type Value
- type Values
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ExampleValues = Values{{Key: "x", Name: "X", Description: "It's an x", Icon: "x-icon", Default: false, Simple: false}} Examples = map[string]any{ "values": ExampleValues, } )
View Source
var ValueFieldDescs = util.FieldDescs{
{Key: "key", Title: "Key", Description: "The key of the enum"},
{Key: "name", Title: "Name", Description: "The name of the enum"},
{Key: "description", Title: "Description", Description: "The description of the enum"},
{Key: "icon", Title: "Icon", Description: "The icon of the enum", Type: "icon"},
{Key: "default", Title: "Default", Description: "Indicates if this is the default value", Type: "bool"},
}
Functions ¶
This section is empty.
Types ¶
type Enum ¶
type Enum struct {
Name string `json:"name"`
Package string `json:"package"`
Group []string `json:"group,omitempty"`
Description string `json:"description,omitempty"`
Icon string `json:"icon,omitempty"`
Values Values `json:"values,omitempty"`
Tags []string `json:"tags,omitempty"`
TitleOverride string `json:"title,omitempty"`
ProperOverride string `json:"proper,omitempty"`
RouteOverride string `json:"route,omitempty"`
Config util.ValueMap `json:"config,omitempty"`
}
func (*Enum) Breadcrumbs ¶
func (*Enum) ExtraFields ¶
func (e *Enum) ExtraFields() *util.OrderedMap[string]
func (*Enum) FirstLetter ¶
func (*Enum) PackageWithGroup ¶
func (*Enum) ProperPlural ¶
func (*Enum) TitleLower ¶
func (*Enum) ValuesCamel ¶
type Value ¶
type Value struct {
Key string
Name string
Description string
Icon string
Extra *util.OrderedMap[any]
Default bool
Simple bool
}
func (*Value) MarshalJSON ¶
func (*Value) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.