This repository was archived by the owner on Dec 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathprofiles.proto
106 lines (94 loc) · 3.42 KB
/
profiles.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
102
103
104
105
106
syntax = "proto3";
package weave.works.profiles.v1;
option go_package = "github.com/weaveworks/profiles/pkg/protos";
import "google/api/annotations.proto";
service ProfilesService {
// Get will return a specific profile from the catalog
rpc Get(GetRequest) returns (GetResponse) {
option (google.api.http) = {
get: "/v1/profiles/{source_name}/{profile_name}"
};
}
// GetWithVersion will return a specific profile from the catalog
rpc GetWithVersion(GetWithVersionRequest) returns (GetWithVersionResponse) {
option (google.api.http) = {
get: "/v1/profiles/{source_name}/{profile_name}/{version}"
};
}
// ProfilesGreaterThanVersion returns all profiles which are of a greater version for a given profile with a version.
rpc ProfilesGreaterThanVersion(ProfilesGreaterThanVersionRequest) returns (ProfilesGreaterThanVersionResponse) {
option (google.api.http) = {
get: "/v1/profiles/{source_name}/{profile_name}/{version}/available_updates"
};
}
// Search will return a list of profiles which match query
rpc Search(SearchRequest) returns (SearchResponse) {
option (google.api.http) = {
get: "/v1/profiles"
};
}
}
// GetRequest defines parameters for the Get endpoint.
message GetRequest{
// Name of the catalog
string source_name = 1;
// Name of the profile
string profile_name = 2;
}
// GetResponse defines response parameters for Get endpoint.
message GetResponse{
ProfileCatalogEntry item = 1;
}
// ProfileDescription defines details about a given profile.
message ProfileCatalogEntry {
// Defines the branch or tag to use
string tag = 1;
// Name of the catalog the profile is listed in
string catalog_source = 2;
// The full URL path to the profile.yaml
string url = 3;
// The fields below are inlined from ProfileDescription.
// Name of the profile
string name = 4;
// Description of the profile
string description = 5;
// The maintainer of the profile
string maintainer = 6;
// Any prerequisites that should be met for this profile to be installable
repeated string prerequisites = 7;
}
// GetWithVersionRequest defines request parameters for GetWithVersion endpoint.
message GetWithVersionRequest{
// Name of the catalog
string source_name = 1;
// Name of the profile
string profile_name = 2;
// Version of the profile
string version = 3;
}
// GetWithVersionResponse defines response parameters for GetWithVersion endpoint.
message GetWithVersionResponse{
ProfileCatalogEntry item = 1;
}
// ProfilesGreaterThanVersionRequest defines request parameters for ProfilesGreaterThanVersion endpoint.
message ProfilesGreaterThanVersionRequest{
// Name of the catalog
string source_name = 1;
// Name of the profile
string profile_name = 2;
// Version of the profile
string version = 3;
}
// ProfilesGreaterThanVersionResponse defines response parameters for ProfilesGreaterThanVersion endpoint.
message ProfilesGreaterThanVersionResponse{
repeated ProfileCatalogEntry items = 1;
}
// SearchRequest defines request parameters for Search endpoint.
message SearchRequest{
// Defines a name to search for that is included in a profile's name
string name = 1;
}
// SearchResponse defines response parameters for Search endpoint.
message SearchResponse{
repeated ProfileCatalogEntry items = 1;
}