Documentation ¶
Overview ¶
Package data is the base storage for the union data structure. * It provides the basic nary tree structure.
Index ¶
- Constants
- type AtomicNode
- type BySystem
- type ByUser
- type Node
- func (n *Node) AddChild(child *Node)
- func (n *Node) Child(name string) *Node
- func (n *Node) ChildMap() map[string]*Node
- func (n *Node) ChildNames() []string
- func (n *Node) Children() []*Node
- func (n *Node) ClearChildren()
- func (n *Node) ClearDefault()
- func (n *Node) ClearDeleted()
- func (n *Node) ClearOpaque()
- func (n *Node) Comment() string
- func (n *Node) Copy() *Node
- func (n *Node) Default() bool
- func (n *Node) DeleteChild(name string)
- func (n *Node) Deleted() bool
- func (n *Node) Index() uint64
- func (n *Node) MarkDefault()
- func (n *Node) MarkDeleted(clearChildFlagsWhenDeletingParent bool)
- func (n *Node) MarkOpaque()
- func (n *Node) Name() string
- func (n *Node) NumChildren() int
- func (n *Node) Opaque() bool
- func (n *Node) SetComment(comment string)
- func (n *Node) SetIndex(idx uint64)
- func (n *Node) SetNoValidate(path []string)
Constants ¶
View Source
const ( ClearChildFlags = true DontClearChildFlags = false )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomicNode ¶
func NewAtomicNode ¶
func NewAtomicNode(n *Node) *AtomicNode
func (*AtomicNode) Load ¶
func (t *AtomicNode) Load() *Node
func (*AtomicNode) Store ¶
func (t *AtomicNode) Store(n *Node)
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) ChildNames ¶
func (*Node) ClearChildren ¶
func (n *Node) ClearChildren()
func (*Node) ClearDefault ¶
func (n *Node) ClearDefault()
func (*Node) ClearDeleted ¶
func (n *Node) ClearDeleted()
func (*Node) ClearOpaque ¶
func (n *Node) ClearOpaque()
func (*Node) DeleteChild ¶
func (*Node) MarkDefault ¶
func (n *Node) MarkDefault()
func (*Node) MarkDeleted ¶
Depending on the type of delete, we may or may not clear the children's flags. When checking authorization on each node, we don't clear, eg when we are doing the likes of a load operation and deleting everything in the tree which we are authorized to delete. If we cleared the flags on the children, then when we add the new config on top of previous deletions, they will reappear if their parent is recreated.
func (*Node) MarkOpaque ¶
func (n *Node) MarkOpaque()
func (*Node) NumChildren ¶
func (*Node) SetComment ¶
func (*Node) SetNoValidate ¶
Click to show internal directories.
Click to hide internal directories.