-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsession.proto
101 lines (92 loc) · 4.74 KB
/
session.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
* This file was taken from
* https://github.com/mutagen-io/mutagen/tree/v0.18.1/pkg/synchronization/session.proto
*
* MIT License
*
* Copyright (c) 2016-present Docker, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
syntax = "proto3";
package synchronization;
option csharp_namespace = "Coder.Desktop.MutagenSdk.Proto.Synchronization";
option go_package = "github.com/mutagen-io/mutagen/pkg/synchronization";
import "google/protobuf/timestamp.proto";
import "synchronization/configuration.proto";
import "synchronization/version.proto";
import "url/url.proto";
// Session represents a synchronization session configuration and persistent
// state. It is mutable within the context of the daemon, so it should be
// accessed and modified in a synchronized fashion. Outside of the daemon (e.g.
// when returned via the API), it should be considered immutable.
message Session {
// The identifier, version, creationTime, and creatingVersion* fields are
// considered the "header" fields for all session versions. A message
// composed purely of these fields is guaranteed to be compatible with all
// future session versions. This can be used to dispatch session decoding to
// more specific message structures once multiple session version formats
// are implemented.
// Identifier is the (unique) session identifier. It is static. It cannot be
// empty.
string identifier = 1;
// Version is the session version. It is static.
Version version = 2;
// CreationTime is the creation time of the session. It is static. It cannot
// be nil.
google.protobuf.Timestamp creationTime = 3;
// CreatingVersionMajor is the major version component of the version of
// Mutagen which created the session. It is static.
uint32 creatingVersionMajor = 4;
// CreatingVersionMinor is the minor version component of the version of
// Mutagen which created the session. It is static.
uint32 creatingVersionMinor = 5;
// CreatingVersionPatch is the patch version component of the version of
// Mutagen which created the session. It is static.
uint32 creatingVersionPatch = 6;
// The remaining fields are those currently used by session version 1.
// Alpha is the alpha endpoint URL. It is static. It cannot be nil.
url.URL alpha = 7;
// Beta is the beta endpoint URL. It is static. It cannot be nil.
url.URL beta = 8;
// Configuration is the flattened session configuration. It is static. It
// cannot be nil.
Configuration configuration = 9;
// ConfigurationAlpha are the alpha-specific session configuration
// overrides. It is static. It may be nil for existing sessions loaded from
// disk, but it is not considered valid unless non-nil, so it should be
// replaced with an empty default value in-memory if a nil on-disk value is
// detected.
Configuration configurationAlpha = 11;
// ConfigurationBeta are the beta-specific session configuration overrides.
// It is static. It may be nil for existing sessions loaded from disk, but
// it is not considered valid unless non-nil, so it should be replaced with
// an empty default value in-memory if a nil on-disk value is detected.
Configuration configurationBeta = 12;
// Name is a user-friendly name for the session. It may be empty and is not
// guaranteed to be unique across all sessions. It is only used as a simpler
// handle for specifying sessions. It is static.
string name = 14;
// Labels are the session labels. They are static.
map<string, string> labels = 13;
// Paused indicates whether or not the session is marked as paused.
bool paused = 10;
// NOTE: Fields 11, 12, 13, and 14 are used above. They are out of order for
// historical reasons.
}