Documentation ¶
Index ¶
- type Container
- type ContainerOption
- type Entry
- type EntryOption
- func WithDefault(s string) EntryOption
- func WithEnum(s []string) EntryOption
- func WithLength(s []int) EntryOption
- func WithMandatory(b bool) EntryOption
- func WithPattern(s []string) EntryOption
- func WithRange(s []int) EntryOption
- func WithType(s string) EntryOption
- func WithUnion(b bool) EntryOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { Name string `json:"name,omitempty"` Entries []*Entry `json:"entries,omitempty"` Prev *Container `json:"prev,omitempty"` }
func NewContainer ¶
func NewContainer(n string, prev *Container, opts ...ContainerOption) *Container
func (*Container) GetFullName ¶
func (*Container) GetKeyType ¶ added in v0.1.176
type ContainerOption ¶
type ContainerOption func(c *Container)
type Entry ¶
type Entry struct { Next *Container `json:"prev,omitempty"` Prev *Container `json:"next,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Enum []string `json:"enum,omitempty"` EnumString string `json:"enumString,omitempty"` Range []int `json:"range,omitempty"` Length []int `json:"length,omitempty"` Pattern []string `json:"pattern,omitempty"` PatternString string `json:"patternString,omitempty"` Union bool `json:"union,omitempty"` Mandatory bool `json:"mandatory,omitempty"` Default string `json:"default,omitempty"` Key string `json:"key,omitempty"` NameSpace string `json:"namespace,omitempty"` }
Entry structure keeps track of the elements in a struct/list
func NewEntry ¶
func NewEntry(n string, opts ...EntryOption) *Entry
type EntryOption ¶
type EntryOption func(c *Entry)
Option can be used to manipulate Options.
func WithDefault ¶
func WithDefault(s string) EntryOption
func WithEnum ¶
func WithEnum(s []string) EntryOption
func WithLength ¶
func WithLength(s []int) EntryOption
func WithMandatory ¶
func WithMandatory(b bool) EntryOption
func WithPattern ¶
func WithPattern(s []string) EntryOption
func WithRange ¶
func WithRange(s []int) EntryOption
func WithType ¶
func WithType(s string) EntryOption
func WithUnion ¶
func WithUnion(b bool) EntryOption
Click to show internal directories.
Click to hide internal directories.