mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
lib/db: Document current keyspace
This commit is contained in:
parent
132789785d
commit
f04d054b5a
@ -21,19 +21,44 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
KeyTypeDevice = 0
|
||||
KeyTypeGlobal = 1
|
||||
KeyTypeBlock = 2
|
||||
// KeyTypeDevice <int32 folder ID> <int32 device ID> <file name> = FileInfo
|
||||
KeyTypeDevice = 0
|
||||
|
||||
// KeyTypeGlobal <int32 folder ID> <file name> = VersionList
|
||||
KeyTypeGlobal = 1
|
||||
|
||||
// KeyTypeBlock <int32 folder ID> <32 bytes hash> <§file name> = int32 (block index)
|
||||
KeyTypeBlock = 2
|
||||
|
||||
// KeyTypeDeviceStatistic <device ID as string> <some string> = some value
|
||||
KeyTypeDeviceStatistic = 3
|
||||
|
||||
// KeyTypeFolderStatistic <folder ID as string> <some string> = some value
|
||||
KeyTypeFolderStatistic = 4
|
||||
KeyTypeVirtualMtime = 5
|
||||
KeyTypeFolderIdx = 6
|
||||
KeyTypeDeviceIdx = 7
|
||||
KeyTypeIndexID = 8
|
||||
KeyTypeFolderMeta = 9
|
||||
KeyTypeMiscData = 10
|
||||
KeyTypeSequence = 11
|
||||
KeyTypeNeed = 12
|
||||
|
||||
// KeyTypeVirtualMtime <int32 folder ID> <file name> = dbMtime
|
||||
KeyTypeVirtualMtime = 5
|
||||
|
||||
// KeyTypeFolderIdx <int32 id> = string value
|
||||
KeyTypeFolderIdx = 6
|
||||
|
||||
// KeyTypeDeviceIdx <int32 id> = string value
|
||||
KeyTypeDeviceIdx = 7
|
||||
|
||||
// KeyTypeIndexID <int32 device ID> <int32 folder ID> = protocol.IndexID
|
||||
KeyTypeIndexID = 8
|
||||
|
||||
// KeyTypeFolderMeta <int32 folder ID> = CountsSet
|
||||
KeyTypeFolderMeta = 9
|
||||
|
||||
// KeyTypeMiscData <some string> = some value
|
||||
KeyTypeMiscData = 10
|
||||
|
||||
// KeyTypeSequence <int32 folder ID> <int64 sequence number> = KeyTypeDevice key
|
||||
KeyTypeSequence = 11
|
||||
|
||||
// KeyTypeNeed <int32 folder ID> <file name> = <nothing>
|
||||
KeyTypeNeed = 12
|
||||
)
|
||||
|
||||
type keyer interface {
|
||||
|
Loading…
Reference in New Issue
Block a user