-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathurl.proto
91 lines (79 loc) · 3.46 KB
/
url.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
/*
* This file was taken from
* https://github.com/coder/mutagen/tree/v0.18.2/pkg/url/url.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 url;
option csharp_namespace = "Coder.Desktop.MutagenSdk.Proto.Url";
option go_package = "github.com/mutagen-io/mutagen/pkg/url";
// Kind indicates the kind of a URL.
enum Kind {
// Synchronization indicates a synchronization URL.
Synchronization = 0;
// Forwarding indicates a forwarding URL.
Forwarding = 1;
}
// Protocol indicates a location type.
enum Protocol {
// Local indicates that the resource is on the local system.
Local = 0;
// SSH indicates that the resource is accessible via SSH.
SSH = 1;
// Enumeration value 2 is reserved for custom protocols.
// Enumeration value 3 was previously used for the mutagen.io-based tunnel
// protocol. This protocol was experimental and only available as part of
// the v0.11.x release series. It should not be re-used.
// Enumeration values 4-10 are reserved for core protocols.
// Docker indicates that the resource is inside a Docker container.
Docker = 11;
}
// URL represents a pointer to a resource. It should be considered immutable.
message URL {
// Kind indicates the URL kind.
// NOTE: This field number is out of order for historical reasons.
Kind kind = 7;
// Protocol indicates a location type.
Protocol protocol = 1;
// User is the user under which a resource should be accessed.
string user = 2;
// Host is protocol-specific, but generally indicates the location of the
// remote.
string host = 3;
// Port indicates a TCP port via which to access the remote location, if
// applicable.
uint32 port = 4;
// Path indicates the path of a resource.
string path = 5;
// Environment contains captured environment variable information. It is not
// a required component and its contents and their behavior depend on the
// transport implementation.
map<string, string> environment = 6;
// Field 7 is already used above for the kind field. It is out of order for
// historical reasons.
// Parameters are internal transport parameters. These are set for URLs
// generated internally that require additional metadata. Parameters are not
// required and their behavior is dependent on the transport implementation.
map<string, string> parameters = 8;
}