Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TagLabel allow to apply a custom behavior. // - "allowEmpty": allow to create an empty struct. // - "-": ignore the field. TagLabel = "label" // TagLabelSliceAsStruct allow to use a slice of struct by creating one entry into the slice. // The value is the substitution name use in the label to access the slice. TagLabelSliceAsStruct = "label-slice-as-struct" )
Variables ¶
This section is empty.
Functions ¶
func AddMetadata ¶
AddMetadata Adds metadata to a node. nodes + element -> nodes
func EncodeNode ¶
EncodeNode Converts a node to labels. nodes -> labels
Types ¶
type Node ¶
type Node struct { Name string `json:"name"` FieldName string `json:"fieldName"` Value string `json:"value,omitempty"` Disabled bool `json:"disabled,omitempty"` Kind reflect.Kind `json:"kind,omitempty"` Children []*Node `json:"children,omitempty"` }
Node a label node.
func DecodeToNode ¶
DecodeToNode Converts the labels to a node. labels -> nodes
func EncodeToNode ¶
EncodeToNode Converts an element to a node. element -> nodes
Click to show internal directories.
Click to hide internal directories.