Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntryType ¶
type EntryType string
EntryType indicates the type of the file that was edited.
const ( // EntryTypeFile is for files that have been edited. Note that // covers both regular files and executables. EntryTypeFile EntryType = "file" // EntryTypeDir is for directories that have been edited. EntryTypeDir EntryType = "dir" // EntryTypeSym is for symlinks that have been edited. EntryTypeSym EntryType = "sym" )
type NotificationMessage ¶
type NotificationMessage struct {
Version NotificationVersion
Filename string
Type NotificationOpType
Time time.Time // server-reported time
FileType EntryType
Revision kbfsmd.Revision
Device kbfscrypto.VerifyingKey
UID keybase1.UID
FolderID tlf.ID
Params *NotificationParams `json:",omitempty"`
}
NotificationMessage is a summary of a single edit notification in KBFS. It is meant to be encoded and decoded with JSON.
type NotificationOpType ¶
type NotificationOpType string
NotificationOpType indicates the type of the operation that caused the notification.
const ( // NotificationCreate is the type of an edit notification // representing a new file or directory creation. NotificationCreate NotificationOpType = "create" // NotificationModify is the type of an edit notification // representing a file modification. NotificationModify NotificationOpType = "modify" // NotificationRename is the type of an edit notification // representing a file or directory getting renamed. NotificationRename NotificationOpType = "rename" // NotificationDelete is the type of an edit notification // representing a file or directory getting deleted. NotificationDelete NotificationOpType = "delete" )
type NotificationParams ¶
type NotificationParams struct {
OldFileName string `json:",omitempty"` // for renames
Offset uint64 `json:",omitempty"` // for modifies
Length uint64 `json:",omitempty"` // for modifies
}
NotificationParams is used for op-type-specific data.
type NotificationVersion ¶
type NotificationVersion int
NotificationVersion is the numeric version of the edit notification data structure.
const ( // NotificationV1 is unused, but represents the original, // MD-ops-based edit notification list. NotificationV1 NotificationVersion = 1 // NotificationV2 is the first version that stores JSON-encoded // notifications in chat messages. NotificationV2 NotificationVersion = 2 )
Click to show internal directories.
Click to hide internal directories.