71 lines
2.0 KiB
Protocol Buffer
71 lines
2.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package archive_control.v1;
|
|
|
|
import "archive_control/v1/resource.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
enum MaterializationMethod {
|
|
MATERIALIZATION_METHOD_UNSPECIFIED = 0;
|
|
MATERIALIZATION_METHOD_HARD_LINK = 1;
|
|
MATERIALIZATION_METHOD_REFLINK = 2;
|
|
MATERIALIZATION_METHOD_COPY = 3;
|
|
MATERIALIZATION_METHOD_PREEXISTING_REUSED = 4;
|
|
}
|
|
|
|
enum ArtifactKind {
|
|
ARTIFACT_KIND_UNSPECIFIED = 0;
|
|
ARTIFACT_KIND_TORRENT_FILE = 1;
|
|
ARTIFACT_KIND_LIBTORRENT_PARTFILE = 2;
|
|
ARTIFACT_KIND_OTHER_AUXILIARY = 3;
|
|
}
|
|
|
|
message ManifestFile {
|
|
uint32 file_index = 1;
|
|
string payload_relative_path = 2;
|
|
string target_canonical_path = 3;
|
|
uint64 logical_bytes = 4;
|
|
uint64 allocated_bytes = 5;
|
|
bool sparse = 6;
|
|
MaterializationMethod source_staging_method = 7;
|
|
MaterializationMethod target_method = 8;
|
|
bool target_preexisted = 9;
|
|
}
|
|
|
|
message ManifestArtifact {
|
|
ArtifactKind kind = 1;
|
|
string payload_relative_path = 2;
|
|
uint64 logical_bytes = 3;
|
|
uint64 allocated_bytes = 4;
|
|
bool sparse = 5;
|
|
string format = 6;
|
|
string sha256_hex = 7;
|
|
}
|
|
|
|
// TransferManifest is written as canonical protobuf JSON into the isolated
|
|
// Syncthing job namespace. Paths are always relative to configured safe roots.
|
|
message TransferManifest {
|
|
uint32 manifest_version = 1;
|
|
string job_id = 2;
|
|
ResourceId resource_id = 3;
|
|
string source_client_id = 4;
|
|
string target_client_id = 5;
|
|
string route_id = 6;
|
|
SelectionSet requested_files = 7;
|
|
SelectionSet target_baseline_files = 8;
|
|
SelectionSet transfer_delta_files = 9;
|
|
repeated ManifestFile files = 10;
|
|
repeated ManifestArtifact artifacts = 11;
|
|
ResourceStateFingerprint source_fingerprint = 12;
|
|
ResourceStateFingerprint target_baseline_fingerprint = 13;
|
|
google.protobuf.Timestamp created_at = 14;
|
|
}
|
|
|
|
// ReadyMarker is written last. A destination trusts no manifest until the
|
|
// marker exists and its digest matches the manifest bytes.
|
|
message ReadyMarker {
|
|
string job_id = 1;
|
|
string manifest_sha256_hex = 2;
|
|
google.protobuf.Timestamp ready_at = 3;
|
|
}
|