Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID uint64
ID is a synthetic number for identifying a node.
const RootID ID = 1
RootID is the identifier for the root.
type Link ¶
type Link struct { ID ID LocalID local.ID RemoteID remote.ID ParentID ID Name string Type types.Type }
Link is the last known state of a file or directory that was common to a local node and a remote doc.
Note: I'm using identifiers, and not pointers, for the LocalID and RemoteID as I think it will be easier when we will have persistence.
type Links ¶
type Links struct { ByID map[ID]*Link ByParentID map[ID]map[ID]*Link // parentID -> map of children ByLocalID map[local.ID]*Link ByRemoteID map[remote.ID]*Link }
Links is keeping the information that links the local file system with the remote Cozy.
func (*Links) CheckInvariants ¶
CheckInvariants can be used to detect some bugs by checking some properties that should always be true if links is manipulated as expected.
Click to show internal directories.
Click to hide internal directories.