mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 19:08:58 +00:00
lib/db: Document current keyspace
This commit is contained in:
parent
132789785d
commit
f04d054b5a
@ -21,19 +21,44 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
KeyTypeDevice = 0
|
// KeyTypeDevice <int32 folder ID> <int32 device ID> <file name> = FileInfo
|
||||||
KeyTypeGlobal = 1
|
KeyTypeDevice = 0
|
||||||
KeyTypeBlock = 2
|
|
||||||
|
// 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
|
KeyTypeDeviceStatistic = 3
|
||||||
|
|
||||||
|
// KeyTypeFolderStatistic <folder ID as string> <some string> = some value
|
||||||
KeyTypeFolderStatistic = 4
|
KeyTypeFolderStatistic = 4
|
||||||
KeyTypeVirtualMtime = 5
|
|
||||||
KeyTypeFolderIdx = 6
|
// KeyTypeVirtualMtime <int32 folder ID> <file name> = dbMtime
|
||||||
KeyTypeDeviceIdx = 7
|
KeyTypeVirtualMtime = 5
|
||||||
KeyTypeIndexID = 8
|
|
||||||
KeyTypeFolderMeta = 9
|
// KeyTypeFolderIdx <int32 id> = string value
|
||||||
KeyTypeMiscData = 10
|
KeyTypeFolderIdx = 6
|
||||||
KeyTypeSequence = 11
|
|
||||||
KeyTypeNeed = 12
|
// 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 {
|
type keyer interface {
|
||||||
|
Loading…
Reference in New Issue
Block a user