Documentation
¶
Index ¶
- Constants
- Variables
- func Apply(ctx context.Context, self NodeInterface, parentPath, p Path, ...) bool
- func ApplyAndGet(ctx context.Context, self NodeInterface, p Path, options *ApplyOptions) bool
- func GetMappedID(ctx context.Context, origin, destinationParent NodeInterface, ...) id.NodeID
- func NewError[T error](message string, args ...any) T
- func NodeCompare(ctx context.Context, a, b NodeInterface) bool
- func NodeCopy(ctx context.Context, origin, destination NodeInterface, ...)
- func NodeCreateChild(ctx context.Context, tree TreeInterface, parentPath Path, kind kind.Kind, ...) (Path, NodeInterface)
- func NodeParallelApply(ctx context.Context, origin NodeInterface, path Path, ...) bool
- func NodeUnify(ctx context.Context, origin NodeInterface, originPath Path, ...)
- func PathAbsoluteString(current, destination string) string
- func PathRelativeString(current, destination string) string
- func ReadablePathString(p Path) []string
- func ReadableString(p 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 TreeCompare(ctx context.Context, aTree TreeInterface, aPath Path, bTree TreeInterface, ...) bool
- func TreeCreateChildFromPath(ctx context.Context, tree TreeInterface, pathString string, set SetFunc)
- func TreeParallelApply(ctx context.Context, origin TreeInterface, path Path, ...) bool
- func TreeRename(tree TreeInterface, kind kind.Kind, f f3.Interface)
- func TreeSetDriver(tree TreeInterface, driver TreeDriverInterface)
- func TreeSetRename(tree TreeInterface, fromPath, toPath Path)
- func TreeUnify(ctx context.Context, origin, destination TreeInterface, options *MirrorOptions)
- func Walk(ctx context.Context, self NodeInterface, parent Path, options *WalkOptions)
- func WalkAndGet(ctx context.Context, self NodeInterface, parent Path, options *WalkOptions)
- type ApplyFunc
- type ApplyOptions
- type ApplySearch
- type ApplyWhere
- type ChildrenList
- type ErrorNodeNotFound
- type ErrorRemapReferencesRelative
- type FactoryFun
- type Implementation
- func (o Implementation) All() []NodeInterface
- func (o Implementation) Append(child NodeInterface) Path
- func (o Implementation) AppendID(id string) Path
- func (o Implementation) Attachments() Path
- func (o Implementation) Comments() Path
- func (o Implementation) Empty() bool
- func (o Implementation) First() NodeInterface
- func (o Implementation) Forge() Path
- func (o Implementation) Get(i int) NodeInterface
- func (o Implementation) Ignore() Path
- func (o Implementation) Issues() Path
- func (o Implementation) Labels() Path
- func (o Implementation) Last() NodeInterface
- func (o Implementation) Length() int
- func (o Implementation) MappedString() string
- func (o Implementation) Milestones() Path
- func (o Implementation) NodeIDs() []id.NodeID
- func (o Implementation) Organizations() Path
- func (o Implementation) OwnerAndProjectID() (owner, project int64)
- func (o Implementation) Owners() Path
- func (o Implementation) PathMappedString() []string
- func (o Implementation) PathString() []string
- func (o Implementation) Pop() (NodeInterface, Path)
- func (o Implementation) PopFirst() (NodeInterface, Path)
- func (o Implementation) Projects() Path
- func (o Implementation) PullRequests() Path
- func (o Implementation) Reactions() Path
- func (o Implementation) Releases() Path
- func (o Implementation) RemoveFirst() Path
- func (o Implementation) RemoveLast() Path
- func (o Implementation) Repositories() Path
- func (o Implementation) ReviewComments() Path
- func (o Implementation) Reviews() Path
- func (o Implementation) Root() Path
- func (o Implementation) SetAttachments() Path
- func (o Implementation) SetComments() Path
- func (o Implementation) SetForge() Path
- func (o Implementation) SetIssues() Path
- func (o Implementation) SetLabels() Path
- func (o Implementation) SetMilestones() Path
- func (o Implementation) SetOrganizations() Path
- func (o Implementation) SetOwners(owners kind.Kind) Path
- func (o Implementation) SetProjects() Path
- func (o Implementation) SetPullRequests() Path
- func (o Implementation) SetReactions() Path
- func (o Implementation) SetReleases() Path
- func (o Implementation) SetRepositories() Path
- func (o Implementation) SetReviewComments() Path
- func (o Implementation) SetReviews() Path
- func (o Implementation) SetTopics() Path
- func (o Implementation) SetUsers() Path
- func (o Implementation) String() string
- func (o Implementation) Topics() Path
- func (o Implementation) Users() Path
- type ListOptions
- type MapIDInterface
- type MirrorDeleteFunc
- type MirrorOptions
- 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 NodeInterface) NodeInterface
- func (o *Node) GetChildrenList() ChildrenList
- func (o *Node) GetChildrenOrder() []id.NodeID
- func (o *Node) GetCurrentPath() 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) GetSupportedListOptions() SupportedListOptions
- 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) NodeInterface
- func FindAndGet(ctx context.Context, self NodeInterface, p Path) NodeInterface
- func FindByIDOrName(ctx context.Context, self NodeInterface, p Path) NodeInterface
- func MustFind(self NodeInterface, p 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) GetSupportedListOptions() SupportedListOptions
- 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, _ ListOptions, 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) GetRenameMap() TreeRenameMap
- func (o *NullTreeDriver) GetTree() TreeInterface
- func (o *NullTreeDriver) Init()
- func (o *NullTreeDriver) SetPageSize(pageSize int)
- func (o *NullTreeDriver) SetRenameMap(renameMap TreeRenameMap)
- func (o *NullTreeDriver) SetTree(tree TreeInterface)
- type ParallelApplyFunc
- type ParallelApplyOptions
- type Path
- func NewNodePathFromString[T ~string](pathString T) Path
- func NewPath(nodes ...NodeInterface) Path
- func NewPathFromString(allocator PathAllocator, pathString string) Path
- func NodeCollectReferences(ctx context.Context, node NodeInterface) []Path
- func NodeUnifyPath(ctx context.Context, origin NodeInterface, ...) Path
- func PathAbsolute(allocator PathAllocator, current, destination string) Path
- func TreeCollectReferences(ctx context.Context, tree TreeInterface, p Path) []Path
- func TreeMirror(ctx context.Context, originTree, destinationTree TreeInterface, ...) Path
- func TreePathRemap(ctx context.Context, origin TreeInterface, p Path, destination TreeInterface) Path
- func TreeUnifyPath(ctx context.Context, origin TreeInterface, p Path, destination TreeInterface, ...) Path
- type PathAllocator
- type SetFunc
- type SupportedListOptions
- type Tree
- func (o *Tree) AllocateID() bool
- func (o *Tree) Apply(ctx context.Context, p Path, options *ApplyOptions) bool
- func (o *Tree) ApplyAndGet(ctx context.Context, path Path, options *ApplyOptions) bool
- func (o *Tree) Diff(a, b NodeInterface) string
- func (o *Tree) Exists(ctx context.Context, path Path) bool
- func (o *Tree) Find(path Path) NodeInterface
- func (o *Tree) FindAndGet(ctx context.Context, path Path) NodeInterface
- func (o *Tree) FindByIDOrName(ctx context.Context, 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) GetRenameMap() TreeRenameMap
- func (o *Tree) GetRoot() NodeInterface
- func (o *Tree) Init(opts options.Interface)
- func (o *Tree) MustFind(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) SetRenameMap(renameMap TreeRenameMap)
- 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 TreeRenameMap
- type WalkFunc
- type WalkOptions
Constants ¶
View Source
const (
SupportListOptionSince = 1 << 1
)
Variables ¶
View Source
var DefaultPageSize = int(25)
View Source
var NilListOptions = &listOptions{}
Functions ¶
func Apply ¶ added in v3.11.3
func Apply(ctx context.Context, self NodeInterface, parentPath, p Path, options *ApplyOptions) bool
func ApplyAndGet ¶ added in v3.11.3
func ApplyAndGet(ctx context.Context, self NodeInterface, p Path, options *ApplyOptions) bool
func GetMappedID ¶
func GetMappedID(ctx context.Context, origin, destinationParent NodeInterface, options *MirrorOptions) id.NodeID
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 NodeCreateChild ¶ added in v3.11.14
func NodeCreateChild(ctx context.Context, tree TreeInterface, parentPath Path, kind kind.Kind, set SetFunc) (Path, NodeInterface)
func NodeParallelApply ¶
func NodeParallelApply(ctx context.Context, origin NodeInterface, path Path, destination NodeInterface, options *ParallelApplyOptions) bool
func NodeUnify ¶
func NodeUnify(ctx context.Context, origin NodeInterface, originPath Path, destination NodeInterface, destinationPath Path, options *MirrorOptions)
func PathAbsoluteString ¶
func PathRelativeString ¶ added in v3.2.0
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 TreeCompare ¶
func TreeCompare(ctx context.Context, aTree TreeInterface, aPath Path, bTree TreeInterface, bPath Path) bool
func TreeCreateChildFromPath ¶ added in v3.11.14
func TreeCreateChildFromPath(ctx context.Context, tree TreeInterface, pathString string, set SetFunc)
func TreeParallelApply ¶
func TreeParallelApply(ctx context.Context, origin TreeInterface, path Path, destination TreeInterface, options *ParallelApplyOptions) bool
func TreeRename ¶ added in v3.11.6
func TreeRename(tree TreeInterface, kind kind.Kind, f f3.Interface)
func TreeSetDriver ¶ added in v3.11.4
func TreeSetDriver(tree TreeInterface, driver TreeDriverInterface)
func TreeSetRename ¶ added in v3.11.6
func TreeSetRename(tree TreeInterface, fromPath, toPath Path)
func TreeUnify ¶
func TreeUnify(ctx context.Context, origin, destination TreeInterface, options *MirrorOptions)
func Walk ¶ added in v3.11.3
func Walk(ctx context.Context, self NodeInterface, parent Path, options *WalkOptions)
func WalkAndGet ¶ added in v3.11.3
func WalkAndGet(ctx context.Context, self NodeInterface, parent Path, options *WalkOptions)
Types ¶
type ApplyFunc ¶
type ApplyFunc func(ctx context.Context, parentPath, path Path, node NodeInterface)
type ApplyOptions ¶
type ApplyOptions struct {
// contains filtered or unexported fields
}
func NewApplyOptions ¶
func NewApplyOptions(fun ApplyFunc) *ApplyOptions
func (*ApplyOptions) GetListOptions ¶ added in v3.11.12
func (o *ApplyOptions) GetListOptions() ListOptions
func (*ApplyOptions) SetListOptions ¶ added in v3.11.12
func (o *ApplyOptions) SetListOptions(listOptions ListOptions)
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, opts ListOptions) ChildrenList
func ListPage ¶ added in v3.11.3
func ListPage(ctx context.Context, self NodeInterface, opts ListOptions, 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 Implementation ¶ added in v3.11.14
type Implementation []NodeInterface
func (Implementation) All ¶ added in v3.11.14
func (o Implementation) All() []NodeInterface
func (Implementation) Append ¶ added in v3.11.14
func (o Implementation) Append(child NodeInterface) Path
func (Implementation) AppendID ¶ added in v3.11.14
func (o Implementation) AppendID(id string) Path
func (Implementation) Attachments ¶ added in v3.11.14
func (o Implementation) Attachments() Path
func (Implementation) Comments ¶ added in v3.11.14
func (o Implementation) Comments() Path
func (Implementation) Empty ¶ added in v3.11.14
func (o Implementation) Empty() bool
func (Implementation) First ¶ added in v3.11.14
func (o Implementation) First() NodeInterface
func (Implementation) Forge ¶ added in v3.11.14
func (o Implementation) Forge() Path
func (Implementation) Get ¶ added in v3.11.14
func (o Implementation) Get(i int) NodeInterface
func (Implementation) Ignore ¶ added in v3.11.14
func (o Implementation) Ignore() Path
func (Implementation) Issues ¶ added in v3.11.14
func (o Implementation) Issues() Path
func (Implementation) Labels ¶ added in v3.11.14
func (o Implementation) Labels() Path
func (Implementation) Last ¶ added in v3.11.14
func (o Implementation) Last() NodeInterface
func (Implementation) Length ¶ added in v3.11.14
func (o Implementation) Length() int
func (Implementation) MappedString ¶ added in v3.11.14
func (o Implementation) MappedString() string
func (Implementation) Milestones ¶ added in v3.11.14
func (o Implementation) Milestones() Path
func (Implementation) NodeIDs ¶ added in v3.11.14
func (o Implementation) NodeIDs() []id.NodeID
func (Implementation) Organizations ¶ added in v3.11.14
func (o Implementation) Organizations() Path
func (Implementation) OwnerAndProjectID ¶ added in v3.11.14
func (o Implementation) OwnerAndProjectID() (owner, project int64)
func (Implementation) Owners ¶ added in v3.11.14
func (o Implementation) Owners() Path
func (Implementation) PathMappedString ¶ added in v3.11.14
func (o Implementation) PathMappedString() []string
func (Implementation) PathString ¶ added in v3.11.14
func (o Implementation) PathString() []string
func (Implementation) Pop ¶ added in v3.11.14
func (o Implementation) Pop() (NodeInterface, Path)
func (Implementation) PopFirst ¶ added in v3.11.14
func (o Implementation) PopFirst() (NodeInterface, Path)
func (Implementation) Projects ¶ added in v3.11.14
func (o Implementation) Projects() Path
func (Implementation) PullRequests ¶ added in v3.11.14
func (o Implementation) PullRequests() Path
func (Implementation) Reactions ¶ added in v3.11.14
func (o Implementation) Reactions() Path
func (Implementation) Releases ¶ added in v3.11.14
func (o Implementation) Releases() Path
func (Implementation) RemoveFirst ¶ added in v3.11.14
func (o Implementation) RemoveFirst() Path
func (Implementation) RemoveLast ¶ added in v3.11.14
func (o Implementation) RemoveLast() Path
func (Implementation) Repositories ¶ added in v3.11.14
func (o Implementation) Repositories() Path
func (Implementation) ReviewComments ¶ added in v3.11.14
func (o Implementation) ReviewComments() Path
func (Implementation) Reviews ¶ added in v3.11.14
func (o Implementation) Reviews() Path
func (Implementation) Root ¶ added in v3.11.14
func (o Implementation) Root() Path
func (Implementation) SetAttachments ¶ added in v3.11.14
func (o Implementation) SetAttachments() Path
func (Implementation) SetComments ¶ added in v3.11.14
func (o Implementation) SetComments() Path
func (Implementation) SetForge ¶ added in v3.11.14
func (o Implementation) SetForge() Path
func (Implementation) SetIssues ¶ added in v3.11.14
func (o Implementation) SetIssues() Path
func (Implementation) SetLabels ¶ added in v3.11.14
func (o Implementation) SetLabels() Path
func (Implementation) SetMilestones ¶ added in v3.11.14
func (o Implementation) SetMilestones() Path
func (Implementation) SetOrganizations ¶ added in v3.11.14
func (o Implementation) SetOrganizations() Path
func (Implementation) SetOwners ¶ added in v3.11.14
func (o Implementation) SetOwners(owners kind.Kind) Path
func (Implementation) SetProjects ¶ added in v3.11.14
func (o Implementation) SetProjects() Path
func (Implementation) SetPullRequests ¶ added in v3.11.14
func (o Implementation) SetPullRequests() Path
func (Implementation) SetReactions ¶ added in v3.11.14
func (o Implementation) SetReactions() Path
func (Implementation) SetReleases ¶ added in v3.11.14
func (o Implementation) SetReleases() Path
func (Implementation) SetRepositories ¶ added in v3.11.14
func (o Implementation) SetRepositories() Path
func (Implementation) SetReviewComments ¶ added in v3.11.14
func (o Implementation) SetReviewComments() Path
func (Implementation) SetReviews ¶ added in v3.11.14
func (o Implementation) SetReviews() Path
func (Implementation) SetTopics ¶ added in v3.11.14
func (o Implementation) SetTopics() Path
func (Implementation) SetUsers ¶ added in v3.11.14
func (o Implementation) SetUsers() Path
func (Implementation) String ¶ added in v3.11.14
func (o Implementation) String() string
func (Implementation) Topics ¶ added in v3.11.14
func (o Implementation) Topics() Path
func (Implementation) Users ¶ added in v3.11.14
func (o Implementation) Users() Path
type ListOptions ¶ added in v3.11.12
type ListOptions interface {
HasSince() bool
GetSince() time.Time
SetSince(since time.Time) ListOptions
}
func NewListOptions ¶ added in v3.11.12
func NewListOptions() ListOptions
type MapIDInterface ¶
type MirrorDeleteFunc ¶ added in v3.11.5
type MirrorDeleteFunc func(ctx context.Context, destination NodeInterface, destinationParent Path)
type MirrorOptions ¶
type MirrorOptions struct {
// contains filtered or unexported fields
}
func NewMirrorOptions ¶
func NewMirrorOptions(destinationTree TreeInterface) *MirrorOptions
func (*MirrorOptions) GetListOptions ¶ added in v3.11.12
func (o *MirrorOptions) GetListOptions() ListOptions
func (*MirrorOptions) SetDelete ¶ added in v3.11.5
func (o *MirrorOptions) SetDelete(delete MirrorDeleteFunc) *MirrorOptions
func (*MirrorOptions) SetListOptions ¶ added in v3.11.12
func (o *MirrorOptions) SetListOptions(listOptions ListOptions)
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, destination NodeInterface, destinationParent 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 NodeInterface) 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) GetSupportedListOptions ¶ added in v3.11.13
func (o *Node) GetSupportedListOptions() SupportedListOptions
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)
GetSupportedListOptions() SupportedListOptions
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
GetSupportedListOptions() SupportedListOptions
ListPage(context.Context, NodeInterface, ListOptions, 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, NodeInterface) 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
Init()
String() string
}
var ( NilNode NodeInterface = &Node{isNil: true} NilParent = NilNode )
func Find ¶ added in v3.11.3
func Find(self NodeInterface, p Path) NodeInterface
func FindAndGet ¶ added in v3.11.3
func FindAndGet(ctx context.Context, self NodeInterface, p Path) NodeInterface
func FindByIDOrName ¶ added in v3.11.4
func FindByIDOrName(ctx context.Context, self NodeInterface, p Path) NodeInterface
func MustFind ¶ added in v3.11.3
func MustFind(self NodeInterface, p 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, 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
}
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) GetSupportedListOptions ¶ added in v3.11.13
func (o *NullDriver) GetSupportedListOptions() SupportedListOptions
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, _ ListOptions, 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) GetRenameMap ¶ added in v3.11.6
func (o *NullTreeDriver) GetRenameMap() TreeRenameMap
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) SetRenameMap ¶ added in v3.11.6
func (o *NullTreeDriver) SetRenameMap(renameMap TreeRenameMap)
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) SetWhere ¶
func (o *ParallelApplyOptions) SetWhere(where ApplyWhere) *ParallelApplyOptions
type Path ¶
type Path interface {
NodeIDs() []id.NodeID
OwnerAndProjectID() (owner, project int64)
AppendID(id string) Path
Ignore() Path
Length() int
PathString() []string
PathMappedString() []string
MappedString() string
String() string
Append(child NodeInterface) Path
RemoveFirst() Path
PopFirst() (NodeInterface, Path)
Pop() (NodeInterface, Path)
RemoveLast() Path
Empty() bool
Get(int) NodeInterface
First() NodeInterface
Last() NodeInterface
All() []NodeInterface
Root() Path
Forge() Path
SetForge() Path
Attachments() Path
SetAttachments() Path
Comments() Path
SetComments() Path
Issues() Path
SetIssues() Path
Labels() Path
SetLabels() Path
Milestones() Path
SetMilestones() Path
Owners() Path
SetOwners(owners kind.Kind) Path
Organizations() Path
SetOrganizations() Path
Projects() Path
SetProjects() Path
PullRequests() Path
SetPullRequests() Path
Reactions() Path
SetReactions() Path
Releases() Path
SetReleases() Path
Repositories() Path
SetRepositories() Path
Reviews() Path
SetReviews() Path
ReviewComments() Path
SetReviewComments() Path
Topics() Path
SetTopics() Path
Users() Path
SetUsers() Path
}
func NewNodePathFromString ¶ added in v3.11.14
func NewPath ¶
func NewPath(nodes ...NodeInterface) Path
func NewPathFromString ¶
func NewPathFromString(allocator PathAllocator, pathString string) Path
func NodeCollectReferences ¶
func NodeCollectReferences(ctx context.Context, node NodeInterface) []Path
func NodeUnifyPath ¶
func NodeUnifyPath(ctx context.Context, origin NodeInterface, originPath, path, destinationPath Path, options *MirrorOptions) Path
func PathAbsolute ¶
func PathAbsolute(allocator PathAllocator, current, destination string) Path
func TreeCollectReferences ¶
func TreeCollectReferences(ctx context.Context, tree TreeInterface, p Path) []Path
func TreeMirror ¶
func TreeMirror(ctx context.Context, originTree, destinationTree TreeInterface, originPath Path, options *MirrorOptions) Path
func TreePathRemap ¶
func TreePathRemap(ctx context.Context, origin TreeInterface, p Path, destination TreeInterface) Path
func TreeUnifyPath ¶
func TreeUnifyPath(ctx context.Context, origin TreeInterface, p Path, destination TreeInterface, options *MirrorOptions) Path
type PathAllocator ¶ added in v3.11.14
type PathAllocator func() NodeInterface
type SetFunc ¶ added in v3.11.4
type SetFunc func(parent Path, node NodeInterface)
type SupportedListOptions ¶ added in v3.11.13
type SupportedListOptions int64
func (SupportedListOptions) Since ¶ added in v3.11.13
func (o SupportedListOptions) Since() bool
type Tree ¶
func (*Tree) AllocateID ¶
func (*Tree) ApplyAndGet ¶
func (*Tree) Diff ¶
func (o *Tree) Diff(a, b NodeInterface) string
func (*Tree) Find ¶
func (o *Tree) Find(path Path) NodeInterface
func (*Tree) FindAndGet ¶
func (o *Tree) FindAndGet(ctx context.Context, path Path) NodeInterface
func (*Tree) FindByIDOrName ¶ added in v3.11.4
func (o *Tree) FindByIDOrName(ctx context.Context, path Path) NodeInterface
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) GetRenameMap ¶ added in v3.11.6
func (o *Tree) GetRenameMap() TreeRenameMap
func (*Tree) GetRoot ¶
func (o *Tree) GetRoot() NodeInterface
func (*Tree) MustFind ¶
func (o *Tree) MustFind(path Path) 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) SetRenameMap ¶ added in v3.11.6
func (o *Tree) SetRenameMap(renameMap TreeRenameMap)
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)
GetRenameMap() TreeRenameMap
SetRenameMap(TreeRenameMap)
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
GetRenameMap() TreeRenameMap
SetRenameMap(TreeRenameMap)
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) NodeInterface
Find(Path) NodeInterface
FindByIDOrName(ctx context.Context, path Path) NodeInterface
FindAndGet(context.Context, Path) NodeInterface
Exists(context.Context, Path) bool
Walk(context.Context, *WalkOptions)
WalkAndGet(context.Context, *WalkOptions)
Apply(context.Context, Path, *ApplyOptions) bool
ApplyAndGet(context.Context, 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
func (*WalkOptions) GetListOptions ¶ added in v3.11.12
func (o *WalkOptions) GetListOptions() ListOptions
func (*WalkOptions) SetListOptions ¶ added in v3.11.12
func (o *WalkOptions) SetListOptions(listOptions ListOptions)
Click to show internal directories.
Click to hide internal directories.