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

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

Issue 2037143002: Monorail client in Go (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: more tests 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
« no previous file with comments | « go/src/infra/monorail/monorail.proto ('k') | go/src/infra/monorail/monorail_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Code generated by protoc-gen-go.
2 // source: monorail.proto
3 // DO NOT EDIT!
4
5 /*
6 Package monorail is a generated protocol buffer package.
7
8 It is generated from these files:
9 monorail.proto
10
11 It has these top-level messages:
12 Issue
13 IssueRef
14 InsertIssueRequest
15 InsertIssueResponse
16 InsertCommentRequest
17 InsertCommentResponse
18 Update
19 AtomPerson
20 */
21 package monorail
22
23 import prpccommon "github.com/luci/luci-go/common/prpc"
24 import prpc "github.com/luci/luci-go/server/prpc"
25
26 import proto "github.com/golang/protobuf/proto"
27 import fmt "fmt"
28 import math "math"
29
30 import (
31 context "golang.org/x/net/context"
32 grpc "google.golang.org/grpc"
33 )
34
35 // Reference imports to suppress errors if they are not otherwise used.
36 var _ = proto.Marshal
37 var _ = fmt.Errorf
38 var _ = math.Inf
39
40 // This is a compile-time assertion to ensure that this generated file
41 // is compatible with the proto package it is being compiled against.
42 // A compilation error at this line likely means your copy of the
43 // proto package needs to be updated.
44 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
45
46 // A monorail issue.
47 type Issue struct {
48 // Reporter of the issue.
49 Author *AtomPerson `protobuf:"bytes,1,opt,name=author" json:"author,omit empty"`
50 // Issues that must be fixed before this one can be fixed.
51 BlockedOn []*IssueRef `protobuf:"bytes,2,rep,name=blockedOn" json:"block edOn,omitempty"`
52 // People participating in the issue discussion.
53 Cc []*AtomPerson `protobuf:"bytes,6,rep,name=cc" json:"cc,omitempty"`
54 // The text body of the issue.
55 Description string `protobuf:"bytes,8,opt,name=description" json:"descri ption,omitempty"`
56 // Identifier of the issue, unique within the appengine app.
57 Id int32 `protobuf:"varint,9,opt,name=id" json:"id,omitempty"`
58 // Monorail components for this issue.
59 Components []string `protobuf:"bytes,10,rep,name=components" json:"compo nents,omitempty"`
60 // Arbitrary indexed strings visible to users,
61 // usually of form "Key-Value" or "Key-Value-SubValue",
62 Labels []string `protobuf:"bytes,11,rep,name=labels" json:"labels,omitem pty"`
63 // Who is currently responsible for closing the issue.
64 Owner *AtomPerson `protobuf:"bytes,12,opt,name=owner" json:"owner,omitem pty"`
65 // Current status of issue. Standard values:
66 //
67 // Open statuses:
68 // "Unconrimed" - New, has been not verified or reproduced.
69 // "Untriaged" - Confirmed, not reviews for priority of assignment
70 // "Available" - Triaged, but no owner assigned
71 // "Started" - Work in progress.
72 // "ExternalDependency" - Requires action from a third party
73 // Closed statuses:
74 // "Fixed" - Work completed, needs verificaiton
75 // "Verified" - Test or reporter verified that the fix works
76 // "Duplicate" - Same root cause as another issue
77 // "WontFix" - Cannot reproduce, works as intended, invalid or absolete .
78 // "Archived" - Old issue with no activity.
79 Status string `protobuf:"bytes,17,opt,name=status" json:"status,omitempt y"`
80 // A one line description of the issue.
81 Summary string `protobuf:"bytes,18,opt,name=summary" json:"summary,omite mpty"`
82 }
83
84 func (m *Issue) Reset() { *m = Issue{} }
85 func (m *Issue) String() string { return proto.CompactTextString(m) }
86 func (*Issue) ProtoMessage() {}
87 func (*Issue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
88
89 func (m *Issue) GetAuthor() *AtomPerson {
90 if m != nil {
91 return m.Author
92 }
93 return nil
94 }
95
96 func (m *Issue) GetBlockedOn() []*IssueRef {
97 if m != nil {
98 return m.BlockedOn
99 }
100 return nil
101 }
102
103 func (m *Issue) GetCc() []*AtomPerson {
104 if m != nil {
105 return m.Cc
106 }
107 return nil
108 }
109
110 func (m *Issue) GetOwner() *AtomPerson {
111 if m != nil {
112 return m.Owner
113 }
114 return nil
115 }
116
117 // IssueRef references another issue in the same Monorail instance.
118 type IssueRef struct {
119 // ID of the issue.
120 IssueId int32 `protobuf:"varint,1,opt,name=issueId" json:"issueId,omitem pty"`
121 // ID of the project containing the issue.
122 ProjectId string `protobuf:"bytes,2,opt,name=projectId" json:"projectId, omitempty"`
123 }
124
125 func (m *IssueRef) Reset() { *m = IssueRef{} }
126 func (m *IssueRef) String() string { return proto.CompactTextString(m ) }
127 func (*IssueRef) ProtoMessage() {}
128 func (*IssueRef) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
129
130 // Request for Monorail.InsertIssue().
131 type InsertIssueRequest struct {
132 // Target project id.
133 ProjectId string `protobuf:"bytes,1,opt,name=projectId" json:"projectId, omitempty"`
134 // Definition of the issue.
135 // issue.id must be empty.
136 Issue *Issue `protobuf:"bytes,2,opt,name=issue" json:"issue,omitempty"`
137 // Whether to send email to participants.
138 SendEmail bool `protobuf:"varint,3,opt,name=sendEmail" json:"sendEmail,o mitempty"`
139 }
140
141 func (m *InsertIssueRequest) Reset() { *m = InsertIssueReques t{} }
142 func (m *InsertIssueRequest) String() string { return proto.CompactTe xtString(m) }
143 func (*InsertIssueRequest) ProtoMessage() {}
144 func (*InsertIssueRequest) Descriptor() ([]byte, []int) { return fileDescriptor0 , []int{2} }
145
146 func (m *InsertIssueRequest) GetIssue() *Issue {
147 if m != nil {
148 return m.Issue
149 }
150 return nil
151 }
152
153 // Response for Monorail.InsertIssue()
154 type InsertIssueResponse struct {
155 // Created issue.
156 Issue *Issue `protobuf:"bytes,1,opt,name=issue" json:"issue,omitempty"`
157 }
158
159 func (m *InsertIssueResponse) Reset() { *m = InsertIssueRespo nse{} }
160 func (m *InsertIssueResponse) String() string { return proto.CompactT extString(m) }
161 func (*InsertIssueResponse) ProtoMessage() {}
162 func (*InsertIssueResponse) Descriptor() ([]byte, []int) { return fileDescriptor 0, []int{3} }
163
164 func (m *InsertIssueResponse) GetIssue() *Issue {
165 if m != nil {
166 return m.Issue
167 }
168 return nil
169 }
170
171 // Request for Monorail.InsertComment()
172 type InsertCommentRequest struct {
173 // Definition of the comment.
174 Comment *InsertCommentRequest_Comment `protobuf:"bytes,1,opt,name=commen t" json:"comment,omitempty"`
175 // The reference to post the comment to.
176 Issue *IssueRef `protobuf:"bytes,2,opt,name=issue" json:"issue,omitempty "`
177 }
178
179 func (m *InsertCommentRequest) Reset() { *m = InsertCommentRe quest{} }
180 func (m *InsertCommentRequest) String() string { return proto.Compact TextString(m) }
181 func (*InsertCommentRequest) ProtoMessage() {}
182 func (*InsertCommentRequest) Descriptor() ([]byte, []int) { return fileDescripto r0, []int{4} }
183
184 func (m *InsertCommentRequest) GetComment() *InsertCommentRequest_Comment {
185 if m != nil {
186 return m.Comment
187 }
188 return nil
189 }
190
191 func (m *InsertCommentRequest) GetIssue() *IssueRef {
192 if m != nil {
193 return m.Issue
194 }
195 return nil
196 }
197
198 // Defines the comment.
199 // This message is partial.
200 // Derived from IssueCommentWrapper type in api_pb2_v1.py.
201 type InsertCommentRequest_Comment struct {
202 Content string `protobuf:"bytes,4,opt,name=content" json:"content,omite mpty"`
203 Updates *Update `protobuf:"bytes,8,opt,name=updates" json:"updates,omite mpty"`
204 }
205
206 func (m *InsertCommentRequest_Comment) Reset() { *m = InsertC ommentRequest_Comment{} }
207 func (m *InsertCommentRequest_Comment) String() string { return proto .CompactTextString(m) }
208 func (*InsertCommentRequest_Comment) ProtoMessage() {}
209 func (*InsertCommentRequest_Comment) Descriptor() ([]byte, []int) { return fileD escriptor0, []int{4, 0} }
210
211 func (m *InsertCommentRequest_Comment) GetUpdates() *Update {
212 if m != nil {
213 return m.Updates
214 }
215 return nil
216 }
217
218 type InsertCommentResponse struct {
219 }
220
221 func (m *InsertCommentResponse) Reset() { *m = InsertCommentR esponse{} }
222 func (m *InsertCommentResponse) String() string { return proto.Compac tTextString(m) }
223 func (*InsertCommentResponse) ProtoMessage() {}
224 func (*InsertCommentResponse) Descriptor() ([]byte, []int) { return fileDescript or0, []int{5} }
225
226 // Defines a mutation to an issue.
227 // This message is partial.
228 // Derived from Update type in api_pb2_v1.py.
229 type Update struct {
230 // If set, the new status of the issue.
231 Status string `protobuf:"bytes,2,opt,name=status" json:"status,omitempty "`
232 }
233
234 func (m *Update) Reset() { *m = Update{} }
235 func (m *Update) String() string { return proto.CompactTextString(m) }
236 func (*Update) ProtoMessage() {}
237 func (*Update) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
238
239 // Identifies a Monorail user.
240 type AtomPerson struct {
241 // User email.
242 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
243 }
244
245 func (m *AtomPerson) Reset() { *m = AtomPerson{} }
246 func (m *AtomPerson) String() string { return proto.CompactTextString (m) }
247 func (*AtomPerson) ProtoMessage() {}
248 func (*AtomPerson) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{ 7} }
249
250 func init() {
251 proto.RegisterType((*Issue)(nil), "monorail.Issue")
252 proto.RegisterType((*IssueRef)(nil), "monorail.IssueRef")
253 proto.RegisterType((*InsertIssueRequest)(nil), "monorail.InsertIssueRequ est")
254 proto.RegisterType((*InsertIssueResponse)(nil), "monorail.InsertIssueRes ponse")
255 proto.RegisterType((*InsertCommentRequest)(nil), "monorail.InsertComment Request")
256 proto.RegisterType((*InsertCommentRequest_Comment)(nil), "monorail.Inser tCommentRequest.Comment")
257 proto.RegisterType((*InsertCommentResponse)(nil), "monorail.InsertCommen tResponse")
258 proto.RegisterType((*Update)(nil), "monorail.Update")
259 proto.RegisterType((*AtomPerson)(nil), "monorail.AtomPerson")
260 }
261
262 // Reference imports to suppress errors if they are not otherwise used.
263 var _ context.Context
264 var _ grpc.ClientConn
265
266 // This is a compile-time assertion to ensure that this generated file
267 // is compatible with the grpc package it is being compiled against.
268 const _ = grpc.SupportPackageIsVersion2
269
270 // Client API for Monorail service
271
272 type MonorailClient interface {
273 // Creates an issue.
274 InsertIssue(ctx context.Context, in *InsertIssueRequest, opts ...grpc.Ca llOption) (*InsertIssueResponse, error)
275 // Posts a comment to an issue. Can update issue attributes, such as sta tus.
276 InsertComment(ctx context.Context, in *InsertCommentRequest, opts ...grp c.CallOption) (*InsertCommentResponse, error)
277 }
278 type monorailPRPCClient struct {
279 client *prpccommon.Client
280 }
281
282 func NewMonorailPRPCClient(client *prpccommon.Client) MonorailClient {
283 return &monorailPRPCClient{client}
284 }
285
286 func (c *monorailPRPCClient) InsertIssue(ctx context.Context, in *InsertIssueReq uest, opts ...grpc.CallOption) (*InsertIssueResponse, error) {
287 out := new(InsertIssueResponse)
288 err := c.client.Call(ctx, "monorail.Monorail", "InsertIssue", in, out, o pts...)
289 if err != nil {
290 return nil, err
291 }
292 return out, nil
293 }
294
295 func (c *monorailPRPCClient) InsertComment(ctx context.Context, in *InsertCommen tRequest, opts ...grpc.CallOption) (*InsertCommentResponse, error) {
296 out := new(InsertCommentResponse)
297 err := c.client.Call(ctx, "monorail.Monorail", "InsertComment", in, out, opts...)
298 if err != nil {
299 return nil, err
300 }
301 return out, nil
302 }
303
304 type monorailClient struct {
305 cc *grpc.ClientConn
306 }
307
308 func NewMonorailClient(cc *grpc.ClientConn) MonorailClient {
309 return &monorailClient{cc}
310 }
311
312 func (c *monorailClient) InsertIssue(ctx context.Context, in *InsertIssueRequest , opts ...grpc.CallOption) (*InsertIssueResponse, error) {
313 out := new(InsertIssueResponse)
314 err := grpc.Invoke(ctx, "/monorail.Monorail/InsertIssue", in, out, c.cc, opts...)
315 if err != nil {
316 return nil, err
317 }
318 return out, nil
319 }
320
321 func (c *monorailClient) InsertComment(ctx context.Context, in *InsertCommentReq uest, opts ...grpc.CallOption) (*InsertCommentResponse, error) {
322 out := new(InsertCommentResponse)
323 err := grpc.Invoke(ctx, "/monorail.Monorail/InsertComment", in, out, c.c c, opts...)
324 if err != nil {
325 return nil, err
326 }
327 return out, nil
328 }
329
330 // Server API for Monorail service
331
332 type MonorailServer interface {
333 // Creates an issue.
334 InsertIssue(context.Context, *InsertIssueRequest) (*InsertIssueResponse, error)
335 // Posts a comment to an issue. Can update issue attributes, such as sta tus.
336 InsertComment(context.Context, *InsertCommentRequest) (*InsertCommentRes ponse, error)
337 }
338
339 func RegisterMonorailServer(s prpc.Registrar, srv MonorailServer) {
340 s.RegisterService(&_Monorail_serviceDesc, srv)
341 }
342
343 func _Monorail_InsertIssue_Handler(srv interface{}, ctx context.Context, dec fun c(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, err or) {
344 in := new(InsertIssueRequest)
345 if err := dec(in); err != nil {
346 return nil, err
347 }
348 if interceptor == nil {
349 return srv.(MonorailServer).InsertIssue(ctx, in)
350 }
351 info := &grpc.UnaryServerInfo{
352 Server: srv,
353 FullMethod: "/monorail.Monorail/InsertIssue",
354 }
355 handler := func(ctx context.Context, req interface{}) (interface{}, erro r) {
356 return srv.(MonorailServer).InsertIssue(ctx, req.(*InsertIssueRe quest))
357 }
358 return interceptor(ctx, in, info, handler)
359 }
360
361 func _Monorail_InsertComment_Handler(srv interface{}, ctx context.Context, dec f unc(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, e rror) {
362 in := new(InsertCommentRequest)
363 if err := dec(in); err != nil {
364 return nil, err
365 }
366 if interceptor == nil {
367 return srv.(MonorailServer).InsertComment(ctx, in)
368 }
369 info := &grpc.UnaryServerInfo{
370 Server: srv,
371 FullMethod: "/monorail.Monorail/InsertComment",
372 }
373 handler := func(ctx context.Context, req interface{}) (interface{}, erro r) {
374 return srv.(MonorailServer).InsertComment(ctx, req.(*InsertComme ntRequest))
375 }
376 return interceptor(ctx, in, info, handler)
377 }
378
379 var _Monorail_serviceDesc = grpc.ServiceDesc{
380 ServiceName: "monorail.Monorail",
381 HandlerType: (*MonorailServer)(nil),
382 Methods: []grpc.MethodDesc{
383 {
384 MethodName: "InsertIssue",
385 Handler: _Monorail_InsertIssue_Handler,
386 },
387 {
388 MethodName: "InsertComment",
389 Handler: _Monorail_InsertComment_Handler,
390 },
391 },
392 Streams: []grpc.StreamDesc{},
393 }
394
395 var fileDescriptor0 = []byte{
396 // 491 bytes of a gzipped FileDescriptorProto
397 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x54, 0xdd, 0x8a, 0xd4, 0x30,
398 0x14, 0xb6, 0xdd, 0x6d, 0xa7, 0x3d, 0xd5, 0x55, 0x8f, 0xab, 0x86, 0x61, 0x5d, 0x87, 0xa2, 0xb2,
399 0x88, 0x0c, 0x32, 0xde, 0x7a, 0xe1, 0x0f, 0x5e, 0x0c, 0x28, 0x2b, 0x01, 0x1f, 0xa0, 0xd3, 0x46,
400 0xac, 0x4e, 0x92, 0xb1, 0x49, 0x59, 0x7c, 0x27, 0xdf, 0x46, 0x7c, 0x1f, 0xd3, 0x34, 0xb1, 0x9d,
401 0x61, 0x76, 0xee, 0x72, 0xf2, 0xfd, 0xe4, 0xf4, 0x3b, 0x87, 0xc2, 0x09, 0x97, 0x42, 0x36, 0x45,
402 0xbd, 0x9e, 0x6f, 0x1a, 0xa9, 0x25, 0x26, 0xbe, 0xce, 0xff, 0x86, 0x10, 0x2d, 0x95, 0x6a, 0x19,
403 0xbe, 0x80, 0xb8, 0x68, 0xf5, 0x37, 0xd9, 0x90, 0x60, 0x16, 0x5c, 0x64, 0x8b, 0xd3, 0xf9, 0x7f,
404 0xd1, 0x5b, 0x2d, 0xf9, 0x67, 0xd6, 0x28, 0x29, 0xa8, 0xe3, 0xe0, 0x4b, 0x48, 0x57, 0x6b, 0x59,
405 0xfe, 0x60, 0xd5, 0xa5, 0x20, 0xe1, 0xec, 0xc8, 0x08, 0x70, 0x10, 0x58, 0x47, 0xca, 0xbe, 0xd2,
406 0x81, 0x84, 0x4f, 0x20, 0x2c, 0x4b, 0x12, 0x5b, 0xea, 0x7e, 0x6f, 0x83, 0xe3, 0x0c, 0xb2, 0x8a,
407 0xa9, 0xb2, 0xa9, 0x37, 0xba, 0x96, 0x82, 0x24, 0xa6, 0x95, 0x94, 0x8e, 0xaf, 0xf0, 0x04, 0xc2,
408 0xba, 0x22, 0xa9, 0x01, 0x22, 0x6a, 0x4e, 0x78, 0x0e, 0x50, 0x4a, 0xbe, 0x91, 0x82, 0x09, 0xad,
409 0x08, 0x18, 0xff, 0x94, 0x8e, 0x6e, 0xf0, 0x01, 0xc4, 0xeb, 0x62, 0xc5, 0xd6, 0x8a, 0x64, 0x16,
410 0x73, 0x15, 0x3e, 0x87, 0x48, 0x5e, 0x09, 0xd6, 0x90, 0x9b, 0x07, 0x3e, 0xb7, 0xa7, 0x74, 0x1e,
411 0x4a, 0x17, 0xba, 0x55, 0xe4, 0xae, 0x6d, 0xc8, 0x55, 0x48, 0x60, 0xa2, 0x5a, 0xce, 0x8b, 0xe6,
412 0x17, 0x41, 0x0b, 0xf8, 0x32, 0x7f, 0x07, 0x89, 0x0f, 0xa1, 0x63, 0xd5, 0xdd, 0x79, 0x59, 0xd9,
413 0x68, 0x23, 0xea, 0x4b, 0x3c, 0x83, 0xd4, 0x0c, 0xe4, 0x3b, 0x2b, 0xb5, 0xc1, 0x42, 0xeb, 0x30,
414 0x5c, 0xe4, 0x57, 0x80, 0x4b, 0xa1, 0x58, 0xa3, 0x9d, 0xd3, 0xcf, 0x96, 0x29, 0xbd, 0xad, 0x09,
415 0x76, 0x34, 0xf8, 0x14, 0x22, 0x6b, 0x6e, 0xdd, 0xb2, 0xc5, 0xed, 0xdd, 0x99, 0xf4, 0x68, 0x67,
416 0xa2, 0x98, 0xa8, 0x3e, 0x70, 0x83, 0x90, 0x23, 0x43, 0x4d, 0xe8, 0x70, 0x91, 0xbf, 0x86, 0x7b,
417 0x5b, 0x0f, 0x2b, 0x93, 0xa5, 0x62, 0x83, 0x77, 0x70, 0xc8, 0x3b, 0xff, 0x13, 0xc0, 0x69, 0x2f,
418 0x7f, 0x2f, 0x39, 0x37, 0x33, 0xf0, 0x9d, 0xbf, 0x81, 0x49, 0xd9, 0xdf, 0x38, 0x87, 0x67, 0x23,
419 0x87, 0x3d, 0x82, 0xb9, 0x2f, 0xbd, 0x0c, 0x2f, 0xb6, 0xbf, 0x6e, 0xdf, 0xc6, 0xf5, 0x84, 0xe9,
420 0x25, 0x4c, 0x9c, 0xba, 0x8b, 0xbf, 0x94, 0x42, 0x77, 0xcf, 0x1e, 0xf7, 0x43, 0x72, 0xa5, 0x59,
421 0x81, 0x49, 0xbb, 0xa9, 0x0a, 0xcd, 0x94, 0x5d, 0xb4, 0x6c, 0x71, 0x67, 0x30, 0xfc, 0x62, 0x01,
422 0xea, 0x09, 0xf9, 0x43, 0xb8, 0xbf, 0xd3, 0x63, 0x9f, 0x4a, 0x3e, 0x83, 0xb8, 0xe7, 0x8e, 0xb6,
423 0x24, 0x1c, 0x6f, 0x89, 0x61, 0xc0, 0xb0, 0x52, 0x88, 0x70, 0x2c, 0x0a, 0xce, 0xdc, 0xe8, 0xec,
424 0x79, 0xf1, 0x3b, 0x80, 0xe4, 0x93, 0x7b, 0x19, 0x3f, 0x42, 0x36, 0x4a, 0x1f, 0xcf, 0x76, 0x43,
425 0x1a, 0x6f, 0xc3, 0xf4, 0xd1, 0x35, 0xa8, 0x6b, 0xee, 0x06, 0x52, 0xb8, 0xb5, 0xd5, 0x37, 0x9e,
426 0x1f, 0x0e, 0x7d, 0xfa, 0xf8, 0x5a, 0xdc, 0x7b, 0xae, 0x62, 0xfb, 0x17, 0x79, 0xf5, 0x2f, 0x00,
427 0x00, 0xff, 0xff, 0x94, 0xbb, 0xd9, 0x6f, 0x57, 0x04, 0x00, 0x00,
428 }
OLDNEW
« no previous file with comments | « go/src/infra/monorail/monorail.proto ('k') | go/src/infra/monorail/monorail_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698