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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/monorail/monorail.pb.go
diff --git a/go/src/infra/monorail/monorail.pb.go b/go/src/infra/monorail/monorail.pb.go
new file mode 100644
index 0000000000000000000000000000000000000000..6cf4c7e41c96fc8a3bc9003962f82144299e120d
--- /dev/null
+++ b/go/src/infra/monorail/monorail.pb.go
@@ -0,0 +1,428 @@
+// Code generated by protoc-gen-go.
+// source: monorail.proto
+// DO NOT EDIT!
+
+/*
+Package monorail is a generated protocol buffer package.
+
+It is generated from these files:
+ monorail.proto
+
+It has these top-level messages:
+ Issue
+ IssueRef
+ InsertIssueRequest
+ InsertIssueResponse
+ InsertCommentRequest
+ InsertCommentResponse
+ Update
+ AtomPerson
+*/
+package monorail
+
+import prpccommon "github.com/luci/luci-go/common/prpc"
+import prpc "github.com/luci/luci-go/server/prpc"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import (
+ context "golang.org/x/net/context"
+ grpc "google.golang.org/grpc"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+// A monorail issue.
+type Issue struct {
+ // Reporter of the issue.
+ Author *AtomPerson `protobuf:"bytes,1,opt,name=author" json:"author,omitempty"`
+ // Issues that must be fixed before this one can be fixed.
+ BlockedOn []*IssueRef `protobuf:"bytes,2,rep,name=blockedOn" json:"blockedOn,omitempty"`
+ // People participating in the issue discussion.
+ Cc []*AtomPerson `protobuf:"bytes,6,rep,name=cc" json:"cc,omitempty"`
+ // The text body of the issue.
+ Description string `protobuf:"bytes,8,opt,name=description" json:"description,omitempty"`
+ // Identifier of the issue, unique within the appengine app.
+ Id int32 `protobuf:"varint,9,opt,name=id" json:"id,omitempty"`
+ // Monorail components for this issue.
+ Components []string `protobuf:"bytes,10,rep,name=components" json:"components,omitempty"`
+ // Arbitrary indexed strings visible to users,
+ // usually of form "Key-Value" or "Key-Value-SubValue",
+ Labels []string `protobuf:"bytes,11,rep,name=labels" json:"labels,omitempty"`
+ // Who is currently responsible for closing the issue.
+ Owner *AtomPerson `protobuf:"bytes,12,opt,name=owner" json:"owner,omitempty"`
+ // Current status of issue. Standard values:
+ //
+ // Open statuses:
+ // "Unconrimed" - New, has been not verified or reproduced.
+ // "Untriaged" - Confirmed, not reviews for priority of assignment
+ // "Available" - Triaged, but no owner assigned
+ // "Started" - Work in progress.
+ // "ExternalDependency" - Requires action from a third party
+ // Closed statuses:
+ // "Fixed" - Work completed, needs verificaiton
+ // "Verified" - Test or reporter verified that the fix works
+ // "Duplicate" - Same root cause as another issue
+ // "WontFix" - Cannot reproduce, works as intended, invalid or absolete.
+ // "Archived" - Old issue with no activity.
+ Status string `protobuf:"bytes,17,opt,name=status" json:"status,omitempty"`
+ // A one line description of the issue.
+ Summary string `protobuf:"bytes,18,opt,name=summary" json:"summary,omitempty"`
+}
+
+func (m *Issue) Reset() { *m = Issue{} }
+func (m *Issue) String() string { return proto.CompactTextString(m) }
+func (*Issue) ProtoMessage() {}
+func (*Issue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
+
+func (m *Issue) GetAuthor() *AtomPerson {
+ if m != nil {
+ return m.Author
+ }
+ return nil
+}
+
+func (m *Issue) GetBlockedOn() []*IssueRef {
+ if m != nil {
+ return m.BlockedOn
+ }
+ return nil
+}
+
+func (m *Issue) GetCc() []*AtomPerson {
+ if m != nil {
+ return m.Cc
+ }
+ return nil
+}
+
+func (m *Issue) GetOwner() *AtomPerson {
+ if m != nil {
+ return m.Owner
+ }
+ return nil
+}
+
+// IssueRef references another issue in the same Monorail instance.
+type IssueRef struct {
+ // ID of the issue.
+ IssueId int32 `protobuf:"varint,1,opt,name=issueId" json:"issueId,omitempty"`
+ // ID of the project containing the issue.
+ ProjectId string `protobuf:"bytes,2,opt,name=projectId" json:"projectId,omitempty"`
+}
+
+func (m *IssueRef) Reset() { *m = IssueRef{} }
+func (m *IssueRef) String() string { return proto.CompactTextString(m) }
+func (*IssueRef) ProtoMessage() {}
+func (*IssueRef) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
+
+// Request for Monorail.InsertIssue().
+type InsertIssueRequest struct {
+ // Target project id.
+ ProjectId string `protobuf:"bytes,1,opt,name=projectId" json:"projectId,omitempty"`
+ // Definition of the issue.
+ // issue.id must be empty.
+ Issue *Issue `protobuf:"bytes,2,opt,name=issue" json:"issue,omitempty"`
+ // Whether to send email to participants.
+ SendEmail bool `protobuf:"varint,3,opt,name=sendEmail" json:"sendEmail,omitempty"`
+}
+
+func (m *InsertIssueRequest) Reset() { *m = InsertIssueRequest{} }
+func (m *InsertIssueRequest) String() string { return proto.CompactTextString(m) }
+func (*InsertIssueRequest) ProtoMessage() {}
+func (*InsertIssueRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
+
+func (m *InsertIssueRequest) GetIssue() *Issue {
+ if m != nil {
+ return m.Issue
+ }
+ return nil
+}
+
+// Response for Monorail.InsertIssue()
+type InsertIssueResponse struct {
+ // Created issue.
+ Issue *Issue `protobuf:"bytes,1,opt,name=issue" json:"issue,omitempty"`
+}
+
+func (m *InsertIssueResponse) Reset() { *m = InsertIssueResponse{} }
+func (m *InsertIssueResponse) String() string { return proto.CompactTextString(m) }
+func (*InsertIssueResponse) ProtoMessage() {}
+func (*InsertIssueResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
+
+func (m *InsertIssueResponse) GetIssue() *Issue {
+ if m != nil {
+ return m.Issue
+ }
+ return nil
+}
+
+// Request for Monorail.InsertComment()
+type InsertCommentRequest struct {
+ // Definition of the comment.
+ Comment *InsertCommentRequest_Comment `protobuf:"bytes,1,opt,name=comment" json:"comment,omitempty"`
+ // The reference to post the comment to.
+ Issue *IssueRef `protobuf:"bytes,2,opt,name=issue" json:"issue,omitempty"`
+}
+
+func (m *InsertCommentRequest) Reset() { *m = InsertCommentRequest{} }
+func (m *InsertCommentRequest) String() string { return proto.CompactTextString(m) }
+func (*InsertCommentRequest) ProtoMessage() {}
+func (*InsertCommentRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
+
+func (m *InsertCommentRequest) GetComment() *InsertCommentRequest_Comment {
+ if m != nil {
+ return m.Comment
+ }
+ return nil
+}
+
+func (m *InsertCommentRequest) GetIssue() *IssueRef {
+ if m != nil {
+ return m.Issue
+ }
+ return nil
+}
+
+// Defines the comment.
+// This message is partial.
+// Derived from IssueCommentWrapper type in api_pb2_v1.py.
+type InsertCommentRequest_Comment struct {
+ Content string `protobuf:"bytes,4,opt,name=content" json:"content,omitempty"`
+ Updates *Update `protobuf:"bytes,8,opt,name=updates" json:"updates,omitempty"`
+}
+
+func (m *InsertCommentRequest_Comment) Reset() { *m = InsertCommentRequest_Comment{} }
+func (m *InsertCommentRequest_Comment) String() string { return proto.CompactTextString(m) }
+func (*InsertCommentRequest_Comment) ProtoMessage() {}
+func (*InsertCommentRequest_Comment) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0} }
+
+func (m *InsertCommentRequest_Comment) GetUpdates() *Update {
+ if m != nil {
+ return m.Updates
+ }
+ return nil
+}
+
+type InsertCommentResponse struct {
+}
+
+func (m *InsertCommentResponse) Reset() { *m = InsertCommentResponse{} }
+func (m *InsertCommentResponse) String() string { return proto.CompactTextString(m) }
+func (*InsertCommentResponse) ProtoMessage() {}
+func (*InsertCommentResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
+
+// Defines a mutation to an issue.
+// This message is partial.
+// Derived from Update type in api_pb2_v1.py.
+type Update struct {
+ // If set, the new status of the issue.
+ Status string `protobuf:"bytes,2,opt,name=status" json:"status,omitempty"`
+}
+
+func (m *Update) Reset() { *m = Update{} }
+func (m *Update) String() string { return proto.CompactTextString(m) }
+func (*Update) ProtoMessage() {}
+func (*Update) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
+
+// Identifies a Monorail user.
+type AtomPerson struct {
+ // User email.
+ Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+}
+
+func (m *AtomPerson) Reset() { *m = AtomPerson{} }
+func (m *AtomPerson) String() string { return proto.CompactTextString(m) }
+func (*AtomPerson) ProtoMessage() {}
+func (*AtomPerson) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
+
+func init() {
+ proto.RegisterType((*Issue)(nil), "monorail.Issue")
+ proto.RegisterType((*IssueRef)(nil), "monorail.IssueRef")
+ proto.RegisterType((*InsertIssueRequest)(nil), "monorail.InsertIssueRequest")
+ proto.RegisterType((*InsertIssueResponse)(nil), "monorail.InsertIssueResponse")
+ proto.RegisterType((*InsertCommentRequest)(nil), "monorail.InsertCommentRequest")
+ proto.RegisterType((*InsertCommentRequest_Comment)(nil), "monorail.InsertCommentRequest.Comment")
+ proto.RegisterType((*InsertCommentResponse)(nil), "monorail.InsertCommentResponse")
+ proto.RegisterType((*Update)(nil), "monorail.Update")
+ proto.RegisterType((*AtomPerson)(nil), "monorail.AtomPerson")
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConn
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+const _ = grpc.SupportPackageIsVersion2
+
+// Client API for Monorail service
+
+type MonorailClient interface {
+ // Creates an issue.
+ InsertIssue(ctx context.Context, in *InsertIssueRequest, opts ...grpc.CallOption) (*InsertIssueResponse, error)
+ // Posts a comment to an issue. Can update issue attributes, such as status.
+ InsertComment(ctx context.Context, in *InsertCommentRequest, opts ...grpc.CallOption) (*InsertCommentResponse, error)
+}
+type monorailPRPCClient struct {
+ client *prpccommon.Client
+}
+
+func NewMonorailPRPCClient(client *prpccommon.Client) MonorailClient {
+ return &monorailPRPCClient{client}
+}
+
+func (c *monorailPRPCClient) InsertIssue(ctx context.Context, in *InsertIssueRequest, opts ...grpc.CallOption) (*InsertIssueResponse, error) {
+ out := new(InsertIssueResponse)
+ err := c.client.Call(ctx, "monorail.Monorail", "InsertIssue", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *monorailPRPCClient) InsertComment(ctx context.Context, in *InsertCommentRequest, opts ...grpc.CallOption) (*InsertCommentResponse, error) {
+ out := new(InsertCommentResponse)
+ err := c.client.Call(ctx, "monorail.Monorail", "InsertComment", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+type monorailClient struct {
+ cc *grpc.ClientConn
+}
+
+func NewMonorailClient(cc *grpc.ClientConn) MonorailClient {
+ return &monorailClient{cc}
+}
+
+func (c *monorailClient) InsertIssue(ctx context.Context, in *InsertIssueRequest, opts ...grpc.CallOption) (*InsertIssueResponse, error) {
+ out := new(InsertIssueResponse)
+ err := grpc.Invoke(ctx, "/monorail.Monorail/InsertIssue", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *monorailClient) InsertComment(ctx context.Context, in *InsertCommentRequest, opts ...grpc.CallOption) (*InsertCommentResponse, error) {
+ out := new(InsertCommentResponse)
+ err := grpc.Invoke(ctx, "/monorail.Monorail/InsertComment", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// Server API for Monorail service
+
+type MonorailServer interface {
+ // Creates an issue.
+ InsertIssue(context.Context, *InsertIssueRequest) (*InsertIssueResponse, error)
+ // Posts a comment to an issue. Can update issue attributes, such as status.
+ InsertComment(context.Context, *InsertCommentRequest) (*InsertCommentResponse, error)
+}
+
+func RegisterMonorailServer(s prpc.Registrar, srv MonorailServer) {
+ s.RegisterService(&_Monorail_serviceDesc, srv)
+}
+
+func _Monorail_InsertIssue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(InsertIssueRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MonorailServer).InsertIssue(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/monorail.Monorail/InsertIssue",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MonorailServer).InsertIssue(ctx, req.(*InsertIssueRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Monorail_InsertComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(InsertCommentRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MonorailServer).InsertComment(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/monorail.Monorail/InsertComment",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MonorailServer).InsertComment(ctx, req.(*InsertCommentRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+var _Monorail_serviceDesc = grpc.ServiceDesc{
+ ServiceName: "monorail.Monorail",
+ HandlerType: (*MonorailServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "InsertIssue",
+ Handler: _Monorail_InsertIssue_Handler,
+ },
+ {
+ MethodName: "InsertComment",
+ Handler: _Monorail_InsertComment_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+}
+
+var fileDescriptor0 = []byte{
+ // 491 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x54, 0xdd, 0x8a, 0xd4, 0x30,
+ 0x14, 0xb6, 0xdd, 0x6d, 0xa7, 0x3d, 0xd5, 0x55, 0x8f, 0xab, 0x86, 0x61, 0x5d, 0x87, 0xa2, 0xb2,
+ 0x88, 0x0c, 0x32, 0xde, 0x7a, 0xe1, 0x0f, 0x5e, 0x0c, 0x28, 0x2b, 0x01, 0x1f, 0xa0, 0xd3, 0x46,
+ 0xac, 0x4e, 0x92, 0xb1, 0x49, 0x59, 0x7c, 0x27, 0xdf, 0x46, 0x7c, 0x1f, 0xd3, 0x34, 0xb1, 0x9d,
+ 0x61, 0x76, 0xee, 0x72, 0xf2, 0xfd, 0xe4, 0xf4, 0x3b, 0x87, 0xc2, 0x09, 0x97, 0x42, 0x36, 0x45,
+ 0xbd, 0x9e, 0x6f, 0x1a, 0xa9, 0x25, 0x26, 0xbe, 0xce, 0xff, 0x86, 0x10, 0x2d, 0x95, 0x6a, 0x19,
+ 0xbe, 0x80, 0xb8, 0x68, 0xf5, 0x37, 0xd9, 0x90, 0x60, 0x16, 0x5c, 0x64, 0x8b, 0xd3, 0xf9, 0x7f,
+ 0xd1, 0x5b, 0x2d, 0xf9, 0x67, 0xd6, 0x28, 0x29, 0xa8, 0xe3, 0xe0, 0x4b, 0x48, 0x57, 0x6b, 0x59,
+ 0xfe, 0x60, 0xd5, 0xa5, 0x20, 0xe1, 0xec, 0xc8, 0x08, 0x70, 0x10, 0x58, 0x47, 0xca, 0xbe, 0xd2,
+ 0x81, 0x84, 0x4f, 0x20, 0x2c, 0x4b, 0x12, 0x5b, 0xea, 0x7e, 0x6f, 0x83, 0xe3, 0x0c, 0xb2, 0x8a,
+ 0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33, 0xf0, 0x9d, 0xbf, 0x81, 0x49, 0xd9, 0xdf, 0x38, 0x87, 0x67, 0x23,
+ 0x87, 0x3d, 0x82, 0xb9, 0x2f, 0xbd, 0x0c, 0x2f, 0xb6, 0xbf, 0x6e, 0xdf, 0xc6, 0xf5, 0x84, 0xe9,
+ 0x25, 0x4c, 0x9c, 0xba, 0x8b, 0xbf, 0x94, 0x42, 0x77, 0xcf, 0x1e, 0xf7, 0x43, 0x72, 0xa5, 0x59,
+ 0x81, 0x49, 0xbb, 0xa9, 0x0a, 0xcd, 0x94, 0x5d, 0xb4, 0x6c, 0x71, 0x67, 0x30, 0xfc, 0x62, 0x01,
+ 0xea, 0x09, 0xf9, 0x43, 0xb8, 0xbf, 0xd3, 0x63, 0x9f, 0x4a, 0x3e, 0x83, 0xb8, 0xe7, 0x8e, 0xb6,
+ 0x24, 0x1c, 0x6f, 0x89, 0x61, 0xc0, 0xb0, 0x52, 0x88, 0x70, 0x2c, 0x0a, 0xce, 0xdc, 0xe8, 0xec,
+ 0x79, 0xf1, 0x3b, 0x80, 0xe4, 0x93, 0x7b, 0x19, 0x3f, 0x42, 0x36, 0x4a, 0x1f, 0xcf, 0x76, 0x43,
+ 0x1a, 0x6f, 0xc3, 0xf4, 0xd1, 0x35, 0xa8, 0x6b, 0xee, 0x06, 0x52, 0xb8, 0xb5, 0xd5, 0x37, 0x9e,
+ 0x1f, 0x0e, 0x7d, 0xfa, 0xf8, 0x5a, 0xdc, 0x7b, 0xae, 0x62, 0xfb, 0x17, 0x79, 0xf5, 0x2f, 0x00,
+ 0x00, 0xff, 0xff, 0x94, 0xbb, 0xd9, 0x6f, 0x57, 0x04, 0x00, 0x00,
+}
« 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