Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MirrorInfo ¶
type MirrorInfo struct {
NodeID string
NodeName string
ParentID string // parent of this node
ParentName string // parent's name
OriginalID string // set on mirror copies (points to the original)
MirrorLocations []MirrorLocation // locations where this is mirrored (with parent info)
Item *workflowy.Item // reference to the original item
}
MirrorInfo represents mirror metadata for a node
func CollectMirrorInfos ¶
func CollectMirrorInfos(items []*workflowy.Item) []*MirrorInfo
CollectMirrorInfos walks a tree and collects nodes with mirrorRootIds (originals that have mirrors) It also resolves parent information for each mirror location
func RankByMirrorCount ¶
func RankByMirrorCount(infos []*MirrorInfo, topN int) []*MirrorInfo
RankByMirrorCount sorts mirror infos by count descending and returns top N If topN is 0, returns all
func (*MirrorInfo) MirrorCount ¶
func (m *MirrorInfo) MirrorCount() int
MirrorCount returns the number of locations where this node is mirrored
type MirrorLocation ¶
MirrorLocation represents a location where a node is mirrored
Click to show internal directories.
Click to hide internal directories.