2016-07-04 10:40:29 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
|
|
package db;
|
|
|
|
|
|
2018-12-18 12:36:38 +01:00
|
|
|
import "repos/protobuf/gogoproto/gogo.proto";
|
2020-12-17 19:54:31 +01:00
|
|
|
import "google/protobuf/timestamp.proto";
|
2018-12-18 12:36:38 +01:00
|
|
|
import "lib/protocol/bep.proto";
|
2020-10-02 07:07:05 +01:00
|
|
|
import "ext.proto";
|
2016-07-04 10:40:29 +00:00
|
|
|
|
|
|
|
|
message FileVersion {
|
2020-10-02 07:07:05 +01:00
|
|
|
protocol.Vector version = 1;
|
2020-05-30 09:50:23 +02:00
|
|
|
bool deleted = 2;
|
|
|
|
|
repeated bytes devices = 3;
|
|
|
|
|
repeated bytes invalid_devices = 4;
|
2016-07-04 10:40:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message VersionList {
|
|
|
|
|
option (gogoproto.goproto_stringer) = false;
|
2020-10-02 07:07:05 +01:00
|
|
|
repeated FileVersion versions = 1 [(ext.goname) = "RawVersions"];
|
2016-07-04 10:40:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Must be the same as FileInfo but without the blocks field
|
|
|
|
|
message FileInfoTruncated {
|
|
|
|
|
option (gogoproto.goproto_stringer) = false;
|
|
|
|
|
string name = 1;
|
|
|
|
|
int64 size = 3;
|
2016-08-06 13:05:59 +00:00
|
|
|
int64 modified_s = 5;
|
2020-10-02 07:07:05 +01:00
|
|
|
uint64 modified_by = 12 [(ext.gotype) = "github.com/syncthing/syncthing/lib/protocol.ShortID"];
|
|
|
|
|
protocol.Vector version = 9;
|
2016-07-29 19:54:24 +00:00
|
|
|
int64 sequence = 10;
|
2018-04-16 20:08:50 +02:00
|
|
|
// repeated BlockInfo Blocks = 16
|
2016-12-09 18:02:18 +00:00
|
|
|
string symlink_target = 17;
|
2020-01-24 08:35:44 +01:00
|
|
|
bytes blocks_hash = 18;
|
2020-11-09 15:33:32 +01:00
|
|
|
bytes encrypted = 19;
|
2019-12-08 13:31:26 +01:00
|
|
|
protocol.FileInfoType type = 2;
|
|
|
|
|
uint32 permissions = 4;
|
|
|
|
|
int32 modified_ns = 11;
|
2020-10-02 07:07:05 +01:00
|
|
|
int32 block_size = 13 [(ext.goname) = "RawBlockSize"];
|
2022-07-26 08:24:58 +02:00
|
|
|
protocol.PlatformData platform = 14;
|
2018-06-24 09:50:18 +02:00
|
|
|
|
|
|
|
|
// see bep.proto
|
2022-09-14 09:50:55 +02:00
|
|
|
uint32 local_flags = 1000;
|
|
|
|
|
bytes version_hash = 1001;
|
|
|
|
|
int64 inode_change_ns = 1002;
|
2019-12-08 13:31:26 +01:00
|
|
|
|
|
|
|
|
bool deleted = 6;
|
2020-10-02 07:07:05 +01:00
|
|
|
bool invalid = 7 [(ext.goname) = "RawInvalid"];
|
2019-12-08 13:31:26 +01:00
|
|
|
bool no_permissions = 8;
|
2016-07-04 10:40:29 +00:00
|
|
|
}
|
2017-12-14 09:51:17 +00:00
|
|
|
|
2020-01-24 08:35:44 +01:00
|
|
|
// BlockList is the structure used to store block lists
|
|
|
|
|
message BlockList {
|
2020-10-02 07:07:05 +01:00
|
|
|
repeated protocol.BlockInfo blocks = 1;
|
2020-01-24 08:35:44 +01:00
|
|
|
}
|
|
|
|
|
|
2020-05-13 14:28:42 +02:00
|
|
|
// IndirectionHashesOnly is used to only unmarshal the indirection hashes
|
|
|
|
|
// from a FileInfo
|
|
|
|
|
message IndirectionHashesOnly {
|
|
|
|
|
bytes blocks_hash = 18;
|
|
|
|
|
bytes version_hash = 1001;
|
2020-01-24 08:35:44 +01:00
|
|
|
}
|
|
|
|
|
|
2017-12-14 09:51:17 +00:00
|
|
|
// For each folder and device we keep one of these to track the current
|
|
|
|
|
// counts and sequence. We also keep one for the global state of the folder.
|
|
|
|
|
message Counts {
|
2020-09-04 11:09:36 +02:00
|
|
|
option (gogoproto.goproto_stringer) = false;
|
2020-10-02 07:07:05 +01:00
|
|
|
|
2018-07-12 11:15:57 +03:00
|
|
|
int32 files = 1;
|
|
|
|
|
int32 directories = 2;
|
|
|
|
|
int32 symlinks = 3;
|
|
|
|
|
int32 deleted = 4;
|
|
|
|
|
int64 bytes = 5;
|
|
|
|
|
int64 sequence = 6; // zero for the global state
|
2020-10-02 07:07:05 +01:00
|
|
|
bytes device_id = 17 [(ext.goname) = "DeviceID"]; // device ID for remote devices, or special values for local/global
|
|
|
|
|
uint32 local_flags = 18; // the local flag for this count bucket
|
2017-12-14 09:51:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message CountsSet {
|
2020-10-02 07:07:05 +01:00
|
|
|
repeated Counts counts = 1;
|
2017-12-14 09:51:17 +00:00
|
|
|
int64 created = 2; // unix nanos
|
|
|
|
|
}
|
2020-05-30 09:50:23 +02:00
|
|
|
|
|
|
|
|
message FileVersionDeprecated {
|
2020-10-02 07:07:05 +01:00
|
|
|
protocol.Vector version = 1;
|
2020-05-30 09:50:23 +02:00
|
|
|
bytes device = 2;
|
|
|
|
|
bool invalid = 3;
|
|
|
|
|
bool deleted = 4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message VersionListDeprecated {
|
|
|
|
|
option (gogoproto.goproto_stringer) = false;
|
2020-10-02 07:07:05 +01:00
|
|
|
repeated FileVersionDeprecated versions = 1;
|
2020-05-30 09:50:23 +02:00
|
|
|
}
|
2020-12-17 19:54:31 +01:00
|
|
|
|
|
|
|
|
message ObservedFolder {
|
2021-02-12 22:51:29 +01:00
|
|
|
google.protobuf.Timestamp time = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
|
|
|
string label = 2;
|
|
|
|
|
bool receive_encrypted = 3;
|
2021-06-17 13:53:02 +02:00
|
|
|
bool remote_encrypted = 4;
|
2020-12-17 19:54:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ObservedDevice {
|
|
|
|
|
google.protobuf.Timestamp time = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
|
|
|
string name = 2;
|
|
|
|
|
string address = 3;
|
|
|
|
|
}
|