Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Side by Side Diff: go/src/infra/monorail/monorail.proto

Issue 2056603002: [monorail go api] add IssuesList rpc (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file *partially* describes Monorail API. 5 // This file *partially* describes Monorail API.
6 // It is derived from 6 // It is derived from
7 // https://chromium.googlesource.com/infra/infra/+/f2e2a4d/appengine/monorail/se rvices/api_svc_v1.py 7 // https://chromium.googlesource.com/infra/infra/+/f2e2a4d/appengine/monorail/se rvices/api_svc_v1.py
8 // and 8 // and
9 // https://chromium.googlesource.com/infra/infra/+/f2e2a4d/appengine/monorail/pr oto/api_pb2_v1.py 9 // https://chromium.googlesource.com/infra/infra/+/f2e2a4d/appengine/monorail/pr oto/api_pb2_v1.py
10 10
11 syntax = "proto3"; 11 syntax = "proto3";
12 12
13 package monorail; 13 package monorail;
14 14
15 // Monorail service can manipulate issues. 15 // Monorail service can manipulate issues.
16 service Monorail { 16 service Monorail {
17 // Creates an issue. 17 // Creates an issue.
18 rpc InsertIssue(InsertIssueRequest) returns (InsertIssueResponse){}; 18 rpc InsertIssue(InsertIssueRequest) returns (InsertIssueResponse){};
19 // Posts a comment to an issue. Can update issue attributes, such as status. 19 // Posts a comment to an issue. Can update issue attributes, such as status.
20 rpc InsertComment(InsertCommentRequest) returns (InsertCommentResponse){}; 20 rpc InsertComment(InsertCommentRequest) returns (InsertCommentResponse){};
21 // Lists issues from a project.
22 rpc IssuesList(IssuesListRequest) returns (IssuesListResponse){};
21 } 23 }
22 24
23 // A monorail issue. 25 // A monorail issue.
24 message Issue { 26 message Issue {
25 // Reporter of the issue. 27 // Reporter of the issue.
26 AtomPerson author = 1; 28 AtomPerson author = 1;
27 // Issues that must be fixed before this one can be fixed. 29 // Issues that must be fixed before this one can be fixed.
28 repeated IssueRef blockedOn = 2; 30 repeated IssueRef blockedOn = 2;
29 // People participating in the issue discussion. 31 // People participating in the issue discussion.
30 repeated AtomPerson cc = 6; 32 repeated AtomPerson cc = 6;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 Update updates = 8; 95 Update updates = 8;
94 } 96 }
95 // Definition of the comment. 97 // Definition of the comment.
96 Comment comment = 1; 98 Comment comment = 1;
97 // The reference to post the comment to. 99 // The reference to post the comment to.
98 IssueRef issue = 2; 100 IssueRef issue = 2;
99 } 101 }
100 102
101 message InsertCommentResponse{} 103 message InsertCommentResponse{}
102 104
105 // Request for a list of Monorail.Issue()
nodir 2016/06/09 15:55:55 Why "()"?
seanmccullough1 2016/06/09 16:11:40 Why the () on every other Request message comment
nodir 2016/06/09 16:20:16 because those are RPCs, e.g. Monorail is a service
seanmccullough1 2016/06/09 16:26:27 oops sorry. Done.
106 message IssuesListRequest {
107 // String name of the project, e.g. "chromium".
108 string projectId = 1;
109 // Additional projects to search.
110 repeated string additionalProject = 2;
111 enum CannedQuery {
112 ALL = 0;
113 NEW = 1;
114 OPEN = 2;
115 OWNED = 3;
116 REPORTED = 4;
117 STARRED = 5;
118 TO_VERIFY = 6;
119 }
120 // Use a canned query.
121 CannedQuery can = 3;
122 // Issue label.
123 string label = 4;
nodir 2016/06/09 15:55:55 this field should have been repeated I've filed ht
seanmccullough1 2016/06/09 16:11:41 see comment on bug
nodir 2016/06/09 16:20:16 then document that this is a space-separated list
seanmccullough1 2016/06/09 16:26:27 Done.
124 // Maximum results to retrieve.
125 int32 maxResults = 5;
126 // Issue owner.
127 string owner = 6;
128 // Search for Issues published before this timestamp.
129 int64 publishedMax = 7;
130 // Search for Issues published after this timestamp.
131 int64 publishedMin = 8;
132 // Free-form text query.
133 string q = 9;
134 // Sort-by field.
135 string sort = 10;
nodir 2016/06/09 15:55:55 same here
seanmccullough1 2016/06/09 16:11:41 The point of this CL is to make it possible to use
nodir 2016/06/09 16:20:15 ack
136 // Starting index for pagination.
137 int32 startIndex = 11;
138 // Issue status.
139 string status = 12;
140 // Search for Issues most recently updated before this timestamp.
141 int64 updatedMax = 13;
142 // Search for Issues most recently updated after this timestamp.
143 int64 updatedMin = 14;
144 }
145
146 message ErrorMessage {
147 int32 code = 1;
148 string reason = 2;
149 string message = 3;
150 }
151
152 message IssuesListResponse {
153 ErrorMessage error = 1;
154 // Search results.
155 repeated Issue items = 2;
156 // Total size of matching result set, regardless of how many are included
157 // in this response.
158 int32 totalResults = 3;
159 // Should always be "monorail#issueList"
160 string kind = 4;
nodir 2016/06/09 15:55:55 kind is endpoints-specific (included in all respon
seanmccullough1 2016/06/09 16:11:41 Done.
161 }
162
103 // Defines a mutation to an issue. 163 // Defines a mutation to an issue.
104 // This message is partial. 164 // This message is partial.
105 // Derived from Update type in api_pb2_v1.py. 165 // Derived from Update type in api_pb2_v1.py.
106 message Update { 166 message Update {
107 // If set, the new status of the issue. 167 // If set, the new status of the issue.
108 string status = 2; 168 string status = 2;
109 } 169 }
110 170
111 // Identifies a Monorail user. 171 // Identifies a Monorail user.
112 message AtomPerson { 172 message AtomPerson {
113 // User email. 173 // User email.
114 string name = 1; 174 string name = 1;
115 } 175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698