Documentation
¶
Index ¶
- Variables
- func Apply(ctx context.Context, self NodeInterface, parentPath, p path.Path, ...) bool
- func ApplyAndGet(ctx context.Context, self NodeInterface, p path.Path, options *ApplyOptions) bool
- func GetMappedID(ctx context.Context, origin, destinationParent NodeInterface, ...) id.NodeID
- func NewElementNode() path.PathElement
- func NewError[T error](message string, args ...any) T
- func NewPathFromString(pathString string) path.Path
- func NodeCollectReferences(ctx context.Context, node NodeInterface) []path.Path
- func NodeCompare(ctx context.Context, a, b NodeInterface) bool
- func NodeCopy(ctx context.Context, origin, destination NodeInterface, ...)
- func NodeMirror(ctx context.Context, origin, destination NodeInterface, options *MirrorOptions)
- func NodeParallelApply(ctx context.Context, origin NodeInterface, path path.Path, ...) bool
- func NodeUnify(ctx context.Context, origin NodeInterface, originPath path.Path, ...)
- func NodeUnifyPath(ctx context.Context, origin NodeInterface, ...)
- func ReadablePathString(p path.Path) []string
- func ReadableString(p path.Path) string
- func RegisterFactory(name string, factory TreeFactory)
- func RemapReferences(ctx context.Context, node NodeInterface, f f3.Interface)
- func SetMappedID(ctx context.Context, origin, destination NodeInterface, options *MirrorOptions)
- func TreeClear(ctx context.Context, self TreeInterface)
- func TreeCollectReferences(ctx context.Context, tree TreeInterface, p path.Path) []path.Path
- func TreeCompare(ctx context.Context, aTree TreeInterface, aPath path.Path, bTree TreeInterface, ...) bool
- func TreeCreateChild(ctx context.Context, tree TreeInterface, pathString string, set SetFunc)
- func TreeMirror(ctx context.Context, originTree, destinationTree TreeInterface, path path.Path, ...)
- func TreeParallelApply(ctx context.Context, origin TreeInterface, path path.Path, ...) bool
- func TreePartialMirror(ctx context.Context, originTree TreeInterface, originPath path.Path, ...)
- func TreePathRemap(ctx context.Context, origin TreeInterface, p path.Path, ...) path.Path
- func TreeSetDriver(tree TreeInterface, driver TreeDriverInterface)
- func TreeUnify(ctx context.Context, origin, destination TreeInterface, options *MirrorOptions)
- func TreeUnifyPath(ctx context.Context, origin TreeInterface, p path.Path, ...)
- func Walk(ctx context.Context, self NodeInterface, parent path.Path, ...)
- func WalkAndGet(ctx context.Context, self NodeInterface, parent path.Path, ...)
- type ApplyFunc
- type ApplyOptions
- type ApplySearch
- type ApplyWhere
- type ChildrenList
- type ErrorNodeNotFound
- type ErrorRemapReferencesRelative
- type FactoryFun
- type MapIDInterface
- type MirrorDeleteFunc
- type MirrorOptions
- func (o *MirrorOptions) GetRename() MirrorRenameMap
- func (o *MirrorOptions) Rename(kind kind.Kind, f f3.Interface)
- func (o *MirrorOptions) SetDelete(delete MirrorDeleteFunc) *MirrorOptions
- func (o *MirrorOptions) SetNoRemap(noremap bool) *MirrorOptions
- func (o *MirrorOptions) SetRename(fromPath, toPath path.Path) *MirrorOptions
- func (o *MirrorOptions) SetUpsert(upsert MirrorUpsertFunc) *MirrorOptions
- type MirrorRenameMap
- type MirrorUpsertFunc
- type Node
- func (o *Node) CreateChild(ctx context.Context) NodeInterface
- func (o *Node) Delete(ctx context.Context) NodeInterface
- func (o *Node) DeleteChild(id id.NodeID) NodeInterface
- func (o *Node) FromFormat(f f3.Interface) NodeInterface
- func (o *Node) Get(ctx context.Context) NodeInterface
- func (o *Node) GetChild(id id.NodeID) NodeInterface
- func (o *Node) GetChildByIDOrName(ctx context.Context, childElement path.PathElement) NodeInterface
- func (o *Node) GetChildrenList() ChildrenList
- func (o *Node) GetChildrenOrder() []id.NodeID
- func (o *Node) GetCurrentPath() path.Path
- func (o *Node) GetDriver() NodeDriverInterface
- func (o *Node) GetID() id.NodeID
- func (o *Node) GetIDFromName(ctx context.Context, name string) id.NodeID
- func (o *Node) GetImmutable() bool
- func (o *Node) GetIsNil() bool
- func (o *Node) GetIsSync() bool
- func (o *Node) GetKind() kind.Kind
- func (o *Node) GetMappedID() id.NodeID
- func (o *Node) GetName() string
- func (o *Node) GetNodeChildren() NodeChildren
- func (o *Node) GetParent() NodeInterface
- func (o *Node) GetTree() TreeInterface
- func (o *Node) Init()
- func (o *Node) IsUpToDate(other f3.Interface) bool
- func (o *Node) LookupMappedID(ctx context.Context, id id.NodeID, f f3.Interface) id.NodeID
- func (o *Node) NewFormat() f3.Interface
- func (o *Node) SetChild(child NodeInterface) NodeInterface
- func (o *Node) SetChildrenOrder(childrenOrder []id.NodeID)
- func (o *Node) SetDriver(driver NodeDriverInterface)
- func (o *Node) SetID(id id.NodeID)
- func (o *Node) SetImmutable(immutable bool)
- func (o *Node) SetIsNil(isNil bool)
- func (o *Node) SetIsSync(sync bool)
- func (o *Node) SetKind(kind kind.Kind)
- func (o *Node) SetMappedID(mapped id.NodeID)
- func (o *Node) SetNodeChildren(children NodeChildren)
- func (o *Node) SetParent(parent NodeInterface)
- func (o *Node) SetTree(tree TreeInterface)
- func (o *Node) String() string
- func (o *Node) ToFormat() f3.Interface
- func (o *Node) Upsert(ctx context.Context) NodeInterface
- type NodeAccessorsInterface
- type NodeChildren
- type NodeDriverInterface
- type NodeDriverProxyInterface
- type NodeInterface
- func Find(self NodeInterface, p path.Path) NodeInterface
- func FindAndGet(ctx context.Context, self NodeInterface, p path.Path) NodeInterface
- func FindByIDOrName(ctx context.Context, self NodeInterface, p path.Path) NodeInterface
- func MustFind(self NodeInterface, p path.Path) NodeInterface
- func NewNode() NodeInterface
- func NewNodeFromID(i string) NodeInterface
- func NodeFactory(ctx context.Context, self TreeInterface, kind kind.Kind) NodeInterface
- func NodeUnifyOne(ctx context.Context, origin NodeInterface, ...) NodeInterface
- type NodeTreeInterface
- type NullDriver
- func (o *NullDriver) Delete(context.Context)
- func (o *NullDriver) FromFormat(f3.Interface)
- func (o *NullDriver) Get(context.Context) bool
- func (o *NullDriver) GetIDFromName(ctx context.Context, name string) id.NodeID
- func (o *NullDriver) GetMappedID() id.NodeID
- func (o *NullDriver) GetNode() NodeInterface
- func (o *NullDriver) GetTreeDriver() TreeDriverInterface
- func (o *NullDriver) IsNull() bool
- func (o *NullDriver) IsUpToDate(other f3.Interface) bool
- func (o *NullDriver) ListPage(ctx context.Context, node NodeInterface, page int) ChildrenList
- func (o *NullDriver) LookupMappedID(_ context.Context, _ id.NodeID, _ f3.Interface) id.NodeID
- func (o *NullDriver) NewFormat() f3.Interface
- func (o *NullDriver) Patch(context.Context)
- func (o *NullDriver) Put(context.Context) id.NodeID
- func (o *NullDriver) SetMappedID(mapped id.NodeID)
- func (o *NullDriver) SetNode(node NodeInterface)
- func (o *NullDriver) SetTreeDriver(treeDriver TreeDriverInterface)
- func (o *NullDriver) String() string
- func (o *NullDriver) ToFormat() f3.Interface
- type NullTreeDriver
- func (o *NullTreeDriver) AllocateID() bool
- func (o *NullTreeDriver) Diff(a, b NodeDriverInterface) string
- func (o *NullTreeDriver) Factory(ctx context.Context, kind kind.Kind) NodeDriverInterface
- func (o *NullTreeDriver) GetPageSize() int
- func (o *NullTreeDriver) GetTree() TreeInterface
- func (o *NullTreeDriver) Init()
- func (o *NullTreeDriver) SetPageSize(pageSize int)
- func (o *NullTreeDriver) SetTree(tree TreeInterface)
- type ParallelApplyFunc
- type ParallelApplyOptions
- type SetFunc
- type Tree
- func (o *Tree) AllocateID() bool
- func (o *Tree) Apply(ctx context.Context, p path.Path, options *ApplyOptions) bool
- func (o *Tree) ApplyAndGet(ctx context.Context, path path.Path, options *ApplyOptions) bool
- func (o *Tree) Diff(a, b NodeInterface) string
- func (o *Tree) Exists(ctx context.Context, path path.Path) bool
- func (o *Tree) Find(path path.Path) NodeInterface
- func (o *Tree) FindAndGet(ctx context.Context, path path.Path) NodeInterface
- func (o *Tree) FindByIDOrName(ctx context.Context, path path.Path) NodeInterface
- func (o *Tree) GetChildrenKind(parentKind kind.Kind) kind.Kind
- func (o *Tree) GetDriver() TreeDriverInterface
- func (o *Tree) GetFactory(kind kind.Kind) FactoryFun
- func (o *Tree) GetOptions() options.Interface
- func (o *Tree) GetPageSize() int
- func (o *Tree) GetRoot() NodeInterface
- func (o *Tree) Init(opts options.Interface)
- func (o *Tree) MustFind(path path.Path) NodeInterface
- func (o *Tree) SetDriver(driver TreeDriverInterface)
- func (o *Tree) SetFactory(kind kind.Kind, factory FactoryFun)
- func (o *Tree) SetOptions(opts options.Interface)
- func (o *Tree) SetRoot(root NodeInterface)
- func (o *Tree) Walk(ctx context.Context, options *WalkOptions)
- func (o *Tree) WalkAndGet(ctx context.Context, options *WalkOptions)
- type TreeDriverInterface
- type TreeFactory
- type TreeInterface
- type WalkFunc
- type WalkOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultPageSize = int(25)
Functions ¶
func Apply ¶ added in v3.11.3
func Apply(ctx context.Context, self NodeInterface, parentPath, p path.Path, options *ApplyOptions) bool
func ApplyAndGet ¶ added in v3.11.3
func ApplyAndGet(ctx context.Context, self NodeInterface, p path.Path, options *ApplyOptions) bool
func GetMappedID ¶
func GetMappedID(ctx context.Context, origin, destinationParent NodeInterface, options *MirrorOptions) id.NodeID
func NewElementNode ¶ added in v3.10.6
func NewElementNode() path.PathElement
func NewPathFromString ¶
func NodeCollectReferences ¶
func NodeCollectReferences(ctx context.Context, node NodeInterface) []path.Path
func NodeCompare ¶
func NodeCompare(ctx context.Context, a, b NodeInterface) bool
func NodeCopy ¶
func NodeCopy(ctx context.Context, origin, destination NodeInterface, destinationID id.NodeID, options *MirrorOptions)
func NodeMirror ¶
func NodeMirror(ctx context.Context, origin, destination NodeInterface, options *MirrorOptions)
func NodeParallelApply ¶
func NodeParallelApply(ctx context.Context, origin NodeInterface, path path.Path, destination NodeInterface, options *ParallelApplyOptions) bool
func NodeUnify ¶
func NodeUnify(ctx context.Context, origin NodeInterface, originPath path.Path, destination NodeInterface, destinationPath path.Path, options *MirrorOptions)
func NodeUnifyPath ¶
func NodeUnifyPath(ctx context.Context, origin NodeInterface, originPath, path, destinationPath path.Path, options *MirrorOptions)
func ReadablePathString ¶ added in v3.11.5
func ReadableString ¶ added in v3.11.5
func RegisterFactory ¶
func RegisterFactory(name string, factory TreeFactory)
func RemapReferences ¶
func RemapReferences(ctx context.Context, node NodeInterface, f f3.Interface)
func SetMappedID ¶
func SetMappedID(ctx context.Context, origin, destination NodeInterface, options *MirrorOptions)
func TreeClear ¶ added in v3.11.4
func TreeClear(ctx context.Context, self TreeInterface)
func TreeCollectReferences ¶
func TreeCompare ¶
func TreeCompare(ctx context.Context, aTree TreeInterface, aPath path.Path, bTree TreeInterface, bPath path.Path) bool
func TreeCreateChild ¶ added in v3.11.4
func TreeCreateChild(ctx context.Context, tree TreeInterface, pathString string, set SetFunc)
func TreeMirror ¶
func TreeMirror(ctx context.Context, originTree, destinationTree TreeInterface, path path.Path, options *MirrorOptions)
func TreeParallelApply ¶
func TreeParallelApply(ctx context.Context, origin TreeInterface, path path.Path, destination TreeInterface, options *ParallelApplyOptions) bool
func TreePartialMirror ¶
func TreePartialMirror(ctx context.Context, originTree TreeInterface, originPath path.Path, destinationTree TreeInterface, destinationPath path.Path, options *MirrorOptions)
func TreePathRemap ¶
func TreePathRemap(ctx context.Context, origin TreeInterface, p path.Path, destination TreeInterface) path.Path
func TreeSetDriver ¶ added in v3.11.4
func TreeSetDriver(tree TreeInterface, driver TreeDriverInterface)
func TreeUnify ¶
func TreeUnify(ctx context.Context, origin, destination TreeInterface, options *MirrorOptions)
func TreeUnifyPath ¶
func TreeUnifyPath(ctx context.Context, origin TreeInterface, p path.Path, destination TreeInterface, options *MirrorOptions)
func Walk ¶ added in v3.11.3
func Walk(ctx context.Context, self NodeInterface, parent path.Path, options *WalkOptions)
func WalkAndGet ¶ added in v3.11.3
func WalkAndGet(ctx context.Context, self NodeInterface, parent path.Path, options *WalkOptions)
Types ¶
type ApplyFunc ¶
type ApplyFunc func(ctx context.Context, parentPath, path path.Path, node NodeInterface)
type ApplyOptions ¶
type ApplyOptions struct {
// contains filtered or unexported fields
}
func NewApplyOptions ¶
func NewApplyOptions(fun ApplyFunc) *ApplyOptions
func (*ApplyOptions) SetSearch ¶
func (o *ApplyOptions) SetSearch(search ApplySearch) *ApplyOptions
func (*ApplyOptions) SetWhere ¶
func (o *ApplyOptions) SetWhere(where ApplyWhere) *ApplyOptions
type ApplySearch ¶
type ApplySearch bool
const ( ApplySearchByName ApplySearch = true ApplySearchByID ApplySearch = false )
type ApplyWhere ¶
type ApplyWhere bool
const ( ApplyEachNode ApplyWhere = true ApplyLastNode ApplyWhere = false )
type ChildrenList ¶ added in v3.11.2
type ChildrenList []NodeInterface
func List ¶ added in v3.11.3
func List(ctx context.Context, self NodeInterface) ChildrenList
func ListPage ¶ added in v3.11.3
func ListPage(ctx context.Context, self NodeInterface, page int) ChildrenList
func NewChildrenList ¶ added in v3.11.2
func NewChildrenList(len int) ChildrenList
func (ChildrenList) String ¶ added in v3.11.4
func (o ChildrenList) String() string
type ErrorNodeNotFound ¶
type ErrorNodeNotFound error
type ErrorRemapReferencesRelative ¶ added in v3.3.1
type ErrorRemapReferencesRelative error
type FactoryFun ¶
type FactoryFun func(ctx context.Context, kind kind.Kind) NodeInterface
type MapIDInterface ¶
type MirrorDeleteFunc ¶ added in v3.11.5
type MirrorDeleteFunc func(ctx context.Context, destination NodeInterface, destinationParent path.Path)
type MirrorOptions ¶
type MirrorOptions struct {
// contains filtered or unexported fields
}
func NewMirrorOptions ¶
func NewMirrorOptions(destinationTree TreeInterface) *MirrorOptions
func (*MirrorOptions) GetRename ¶ added in v3.11.5
func (o *MirrorOptions) GetRename() MirrorRenameMap
func (*MirrorOptions) Rename ¶ added in v3.11.5
func (o *MirrorOptions) Rename(kind kind.Kind, f f3.Interface)
func (*MirrorOptions) SetDelete ¶ added in v3.11.5
func (o *MirrorOptions) SetDelete(delete MirrorDeleteFunc) *MirrorOptions
func (*MirrorOptions) SetNoRemap ¶
func (o *MirrorOptions) SetNoRemap(noremap bool) *MirrorOptions
func (*MirrorOptions) SetRename ¶ added in v3.11.5
func (o *MirrorOptions) SetRename(fromPath, toPath path.Path) *MirrorOptions
func (*MirrorOptions) SetUpsert ¶ added in v3.11.5
func (o *MirrorOptions) SetUpsert(upsert MirrorUpsertFunc) *MirrorOptions
type MirrorUpsertFunc ¶ added in v3.11.5
type MirrorUpsertFunc func(ctx context.Context, origin NodeInterface, originParent path.Path, destination NodeInterface, destinationParent path.Path)
type Node ¶
func (*Node) CreateChild ¶
func (o *Node) CreateChild(ctx context.Context) NodeInterface
func (*Node) DeleteChild ¶
func (o *Node) DeleteChild(id id.NodeID) NodeInterface
func (*Node) FromFormat ¶
func (o *Node) FromFormat(f f3.Interface) NodeInterface
func (*Node) GetChildByIDOrName ¶ added in v3.11.4
func (o *Node) GetChildByIDOrName(ctx context.Context, childElement path.PathElement) NodeInterface
func (*Node) GetChildrenList ¶ added in v3.11.2
func (o *Node) GetChildrenList() ChildrenList
func (*Node) GetChildrenOrder ¶ added in v3.11.4
func (*Node) GetCurrentPath ¶
func (*Node) GetDriver ¶
func (o *Node) GetDriver() NodeDriverInterface
func (*Node) GetIDFromName ¶
func (*Node) GetImmutable ¶ added in v3.11.3
func (*Node) GetMappedID ¶
func (*Node) GetNodeChildren ¶
func (o *Node) GetNodeChildren() NodeChildren
func (*Node) GetParent ¶
func (o *Node) GetParent() NodeInterface
func (*Node) GetTree ¶
func (o *Node) GetTree() TreeInterface
func (*Node) LookupMappedID ¶
func (*Node) SetChild ¶
func (o *Node) SetChild(child NodeInterface) NodeInterface
func (*Node) SetChildrenOrder ¶ added in v3.11.4
func (*Node) SetDriver ¶
func (o *Node) SetDriver(driver NodeDriverInterface)
func (*Node) SetImmutable ¶ added in v3.11.3
func (*Node) SetMappedID ¶
func (*Node) SetNodeChildren ¶ added in v3.11.2
func (o *Node) SetNodeChildren(children NodeChildren)
func (*Node) SetParent ¶
func (o *Node) SetParent(parent NodeInterface)
func (*Node) SetTree ¶
func (o *Node) SetTree(tree TreeInterface)
type NodeAccessorsInterface ¶
type NodeAccessorsInterface interface {
SetIsNil(bool)
GetIsNil() bool
SetImmutable(bool)
GetImmutable() bool
SetIsSync(bool)
GetIsSync() bool
GetParent() NodeInterface
SetParent(NodeInterface)
GetKind() kind.Kind
SetKind(kind.Kind)
GetID() id.NodeID
SetID(id.NodeID)
GetTree() TreeInterface
SetTree(TreeInterface)
GetChildrenOrder() []id.NodeID
SetChildrenOrder([]id.NodeID)
GetNodeChildren() NodeChildren
SetNodeChildren(NodeChildren)
GetChildrenList() ChildrenList
GetDriver() NodeDriverInterface
SetDriver(NodeDriverInterface)
}
type NodeChildren ¶
type NodeChildren map[id.NodeID]NodeInterface
func NewNodeChildren ¶
func NewNodeChildren() NodeChildren
type NodeDriverInterface ¶
type NodeDriverInterface interface {
logger.MessageInterface
MapIDInterface
IsNull() bool
GetNode() NodeInterface
SetNode(NodeInterface)
SetTreeDriver(treeDriver TreeDriverInterface)
GetTreeDriver() TreeDriverInterface
ListPage(context.Context, NodeInterface, int) ChildrenList
GetIDFromName(context.Context, string) id.NodeID
IsUpToDate(f3.Interface) bool
Get(context.Context) bool
Put(context.Context) id.NodeID
Patch(context.Context)
Delete(context.Context)
NewFormat() f3.Interface
FromFormat(f3.Interface)
ToFormat() f3.Interface
LookupMappedID(context.Context, id.NodeID, f3.Interface) id.NodeID
String() string
}
func NewNullDriver ¶
func NewNullDriver() NodeDriverInterface
type NodeDriverProxyInterface ¶
type NodeDriverProxyInterface interface {
MapIDInterface
GetIDFromName(context.Context, string) id.NodeID
GetChildByIDOrName(context.Context, path.PathElement) NodeInterface
Get(context.Context) NodeInterface
Upsert(context.Context) NodeInterface
Delete(context.Context) NodeInterface
NewFormat() f3.Interface
FromFormat(f3.Interface) NodeInterface
ToFormat() f3.Interface
GetName() string
IsUpToDate(f3.Interface) bool
LookupMappedID(context.Context, id.NodeID, f3.Interface) id.NodeID
}
type NodeInterface ¶
type NodeInterface interface {
logger.MessageInterface
NodeAccessorsInterface
NodeTreeInterface
NodeDriverProxyInterface
path.PathElement
Init()
String() string
}
var ( NilNode NodeInterface = &Node{isNil: true} NilParent = NilNode )
func Find ¶ added in v3.11.3
func Find(self NodeInterface, p path.Path) NodeInterface
func FindAndGet ¶ added in v3.11.3
func FindAndGet(ctx context.Context, self NodeInterface, p path.Path) NodeInterface
func FindByIDOrName ¶ added in v3.11.4
func FindByIDOrName(ctx context.Context, self NodeInterface, p path.Path) NodeInterface
func MustFind ¶ added in v3.11.3
func MustFind(self NodeInterface, p path.Path) NodeInterface
func NewNode ¶
func NewNode() NodeInterface
func NewNodeFromID ¶
func NewNodeFromID(i string) NodeInterface
func NodeFactory ¶ added in v3.11.4
func NodeFactory(ctx context.Context, self TreeInterface, kind kind.Kind) NodeInterface
func NodeUnifyOne ¶
func NodeUnifyOne(ctx context.Context, origin NodeInterface, originPath, path, destinationPath path.Path, options *MirrorOptions) NodeInterface
type NodeTreeInterface ¶
type NodeTreeInterface interface {
GetChild(id.NodeID) NodeInterface
GetIDFromName(context.Context, string) id.NodeID
SetChild(NodeInterface) NodeInterface
DeleteChild(id.NodeID) NodeInterface
CreateChild(context.Context) NodeInterface
GetCurrentPath() path.Path
}
type NullDriver ¶
func (*NullDriver) Delete ¶
func (o *NullDriver) Delete(context.Context)
func (*NullDriver) FromFormat ¶
func (o *NullDriver) FromFormat(f3.Interface)
func (*NullDriver) GetIDFromName ¶
func (*NullDriver) GetMappedID ¶
func (o *NullDriver) GetMappedID() id.NodeID
func (*NullDriver) GetNode ¶
func (o *NullDriver) GetNode() NodeInterface
func (*NullDriver) GetTreeDriver ¶
func (o *NullDriver) GetTreeDriver() TreeDriverInterface
func (*NullDriver) IsNull ¶
func (o *NullDriver) IsNull() bool
func (*NullDriver) IsUpToDate ¶ added in v3.11.4
func (o *NullDriver) IsUpToDate(other f3.Interface) bool
func (*NullDriver) ListPage ¶
func (o *NullDriver) ListPage(ctx context.Context, node NodeInterface, page int) ChildrenList
func (*NullDriver) LookupMappedID ¶
func (*NullDriver) NewFormat ¶
func (o *NullDriver) NewFormat() f3.Interface
func (*NullDriver) Patch ¶
func (o *NullDriver) Patch(context.Context)
func (*NullDriver) SetMappedID ¶
func (o *NullDriver) SetMappedID(mapped id.NodeID)
func (*NullDriver) SetNode ¶
func (o *NullDriver) SetNode(node NodeInterface)
func (*NullDriver) SetTreeDriver ¶
func (o *NullDriver) SetTreeDriver(treeDriver TreeDriverInterface)
func (*NullDriver) String ¶
func (o *NullDriver) String() string
func (*NullDriver) ToFormat ¶
func (o *NullDriver) ToFormat() f3.Interface
type NullTreeDriver ¶
func (*NullTreeDriver) AllocateID ¶
func (o *NullTreeDriver) AllocateID() bool
func (*NullTreeDriver) Diff ¶
func (o *NullTreeDriver) Diff(a, b NodeDriverInterface) string
func (*NullTreeDriver) Factory ¶
func (o *NullTreeDriver) Factory(ctx context.Context, kind kind.Kind) NodeDriverInterface
func (*NullTreeDriver) GetPageSize ¶
func (o *NullTreeDriver) GetPageSize() int
func (*NullTreeDriver) GetTree ¶
func (o *NullTreeDriver) GetTree() TreeInterface
func (*NullTreeDriver) Init ¶
func (o *NullTreeDriver) Init()
func (*NullTreeDriver) SetPageSize ¶
func (o *NullTreeDriver) SetPageSize(pageSize int)
func (*NullTreeDriver) SetTree ¶
func (o *NullTreeDriver) SetTree(tree TreeInterface)
type ParallelApplyFunc ¶
type ParallelApplyFunc func(ctx context.Context, origin, destination NodeInterface)
type ParallelApplyOptions ¶
type ParallelApplyOptions struct {
// contains filtered or unexported fields
}
func NewParallelApplyOptions ¶
func NewParallelApplyOptions(fun ParallelApplyFunc) *ParallelApplyOptions
func (*ParallelApplyOptions) SetNoRemap ¶
func (o *ParallelApplyOptions) SetNoRemap(noremap bool) *ParallelApplyOptions
func (*ParallelApplyOptions) SetWhere ¶
func (o *ParallelApplyOptions) SetWhere(where ApplyWhere) *ParallelApplyOptions
type SetFunc ¶ added in v3.11.4
type SetFunc func(parent path.Path, node NodeInterface)
type Tree ¶
func (*Tree) AllocateID ¶
func (*Tree) ApplyAndGet ¶
func (*Tree) Diff ¶
func (o *Tree) Diff(a, b NodeInterface) string
func (*Tree) FindAndGet ¶
func (*Tree) FindByIDOrName ¶ added in v3.11.4
func (*Tree) GetDriver ¶
func (o *Tree) GetDriver() TreeDriverInterface
func (*Tree) GetFactory ¶ added in v3.11.4
func (o *Tree) GetFactory(kind kind.Kind) FactoryFun
func (*Tree) GetOptions ¶
func (*Tree) GetPageSize ¶
func (*Tree) GetRoot ¶
func (o *Tree) GetRoot() NodeInterface
func (*Tree) SetDriver ¶
func (o *Tree) SetDriver(driver TreeDriverInterface)
func (*Tree) SetFactory ¶ added in v3.11.4
func (o *Tree) SetFactory(kind kind.Kind, factory FactoryFun)
func (*Tree) SetOptions ¶
func (*Tree) SetRoot ¶
func (o *Tree) SetRoot(root NodeInterface)
func (*Tree) WalkAndGet ¶
func (o *Tree) WalkAndGet(ctx context.Context, options *WalkOptions)
type TreeDriverInterface ¶
type TreeDriverInterface interface {
logger.Interface
GetTree() TreeInterface
SetTree(TreeInterface)
GetPageSize() int
SetPageSize(int)
AllocateID() bool
Init()
Diff(a, b NodeDriverInterface) string
Factory(ctx context.Context, kind kind.Kind) NodeDriverInterface
}
func NewNullTreeDriver ¶
func NewNullTreeDriver() TreeDriverInterface
type TreeFactory ¶
type TreeFactory func(ctx context.Context, opts options.Interface) TreeInterface
func GetFactory ¶
func GetFactory(name string) TreeFactory
type TreeInterface ¶
type TreeInterface interface {
logger.Interface
Init(options.Interface)
GetOptions() options.Interface
SetOptions(options.Interface)
SetRoot(NodeInterface)
GetRoot() NodeInterface
SetLogger(logger.Interface)
GetLogger() logger.Interface
GetDriver() TreeDriverInterface
SetDriver(TreeDriverInterface)
SetFactory(kind kind.Kind, factory FactoryFun)
GetFactory(kind kind.Kind) FactoryFun
GetChildrenKind(kind.Kind) kind.Kind
GetPageSize() int
AllocateID() bool
Diff(a, b NodeInterface) string
MustFind(path.Path) NodeInterface
Find(path.Path) NodeInterface
FindByIDOrName(ctx context.Context, path path.Path) NodeInterface
FindAndGet(context.Context, path.Path) NodeInterface
Exists(context.Context, path.Path) bool
Walk(context.Context, *WalkOptions)
WalkAndGet(context.Context, *WalkOptions)
Apply(context.Context, path.Path, *ApplyOptions) bool
ApplyAndGet(context.Context, path.Path, *ApplyOptions) bool
}
func NewTree ¶
func NewTree(opts options.Interface) TreeInterface
type WalkOptions ¶
type WalkOptions struct {
// contains filtered or unexported fields
}
func NewWalkOptions ¶
func NewWalkOptions(fun WalkFunc) *WalkOptions
Click to show internal directories.
Click to hide internal directories.