-
Notifications
You must be signed in to change notification settings - Fork 0
/
url.proto
78 lines (65 loc) · 2.97 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
// Copyright 2020-2024 SIX AFTER, INC (SIX AFTER)
//
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: SIX AFTER, INC (SIX AFTER)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax="proto3";
package sixafter.types;
option go_package="github.com/sixafter/types;types";
option cc_enable_arenas = true;
option java_package = "com.sixafter.types";
option java_multiple_files = true;
option java_outer_classname = "UrlProto";
option objc_class_prefix = "TPB";
option csharp_namespace = "SixAfter.Types.WellKnownTypes";
// The `Url` message represents a Uniform Resource Locator (URL), which is a specific
// type of Uniform Resource Identifier (URI) used to locate resources on the web.
// A URL consists of various components like protocol, host, path, query, and more.
message Url {
// The protocol (or scheme) component of the URL.
// Example: "https", "http", or "ftp".
string protocol = 1;
// The host component of the URL.
// This specifies the domain name or IP address of the resource.
// Example: "example.com" or "192.168.1.1".
string host = 2;
// The path component of the URL.
// This represents the hierarchical location of the resource on the host.
// Example: "/resources/images" in "https://example.com/resources/images".
string path = 3;
// The port number of the URL.
// This specifies the communication port for the connection.
// Example: 443 for HTTPS, 80 for HTTP.
int32 port = 4;
// The file component of the URL.
// This is the specific file or resource being requested.
// Example: "image.png" in "https://example.com/resources/image.png".
string file = 5;
// The query component of the URL.
// This contains optional parameters appended to the URL, following a "?".
// Example: "id=123&name=test" in "https://example.com/page?id=123&name=test".
string query = 6;
// The authority component of the URL.
// This typically includes the host, port, and optionally the user-information.
// Example: "user@example.com:8080" in "https://user@example.com:8080/resource".
string authority = 7;
// The user-information component of the URL.
// This is the optional part before the host that provides user credentials.
// Example: "user:password" in "https://user:password@example.com".
string user_info = 8;
// The ref (also known as anchor) component of the URL.
// This identifies a secondary resource within the primary resource.
// Example: "section1" in "https://example.com/page#section1".
string ref = 9;
}