| OLD | NEW |
| (Empty) | |
| 1 // Code generated by protoc-gen-go. |
| 2 // source: github.com/luci/luci-go/milo/api/proto/buildinfo.proto |
| 3 // DO NOT EDIT! |
| 4 |
| 5 package milo |
| 6 |
| 7 import prpc "github.com/luci/luci-go/grpc/prpc" |
| 8 |
| 9 import proto "github.com/golang/protobuf/proto" |
| 10 import fmt "fmt" |
| 11 import math "math" |
| 12 import milo1 "github.com/luci/luci-go/common/proto/milo" |
| 13 |
| 14 import ( |
| 15 context "golang.org/x/net/context" |
| 16 grpc "google.golang.org/grpc" |
| 17 ) |
| 18 |
| 19 // Reference imports to suppress errors if they are not otherwise used. |
| 20 var _ = proto.Marshal |
| 21 var _ = fmt.Errorf |
| 22 var _ = math.Inf |
| 23 |
| 24 type BuildInfoRequest struct { |
| 25 // Types that are valid to be assigned to Build: |
| 26 // *BuildInfoRequest_Buildbot |
| 27 // *BuildInfoRequest_Swarming_ |
| 28 Build isBuildInfoRequest_Build `protobuf_oneof:"build"` |
| 29 // Project hint is a LUCI project suggestion for this build. Some builds
, |
| 30 // notably older ones, may not contain enough metadata to resolve their |
| 31 // project. Resolution may succeed if this hint is provided and correct. |
| 32 // |
| 33 // This field is optional, and its use is discouraged unless necessary. |
| 34 ProjectHint string `protobuf:"bytes,11,opt,name=project_hint,json=projec
tHint" json:"project_hint,omitempty"` |
| 35 } |
| 36 |
| 37 func (m *BuildInfoRequest) Reset() { *m = BuildInfoRequest{}
} |
| 38 func (m *BuildInfoRequest) String() string { return proto.CompactText
String(m) } |
| 39 func (*BuildInfoRequest) ProtoMessage() {} |
| 40 func (*BuildInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor1,
[]int{0} } |
| 41 |
| 42 type isBuildInfoRequest_Build interface { |
| 43 isBuildInfoRequest_Build() |
| 44 } |
| 45 |
| 46 type BuildInfoRequest_Buildbot struct { |
| 47 Buildbot *BuildInfoRequest_BuildBot `protobuf:"bytes,1,opt,name=buildbot
,oneof"` |
| 48 } |
| 49 type BuildInfoRequest_Swarming_ struct { |
| 50 Swarming *BuildInfoRequest_Swarming `protobuf:"bytes,2,opt,name=swarming
,oneof"` |
| 51 } |
| 52 |
| 53 func (*BuildInfoRequest_Buildbot) isBuildInfoRequest_Build() {} |
| 54 func (*BuildInfoRequest_Swarming_) isBuildInfoRequest_Build() {} |
| 55 |
| 56 func (m *BuildInfoRequest) GetBuild() isBuildInfoRequest_Build { |
| 57 if m != nil { |
| 58 return m.Build |
| 59 } |
| 60 return nil |
| 61 } |
| 62 |
| 63 func (m *BuildInfoRequest) GetBuildbot() *BuildInfoRequest_BuildBot { |
| 64 if x, ok := m.GetBuild().(*BuildInfoRequest_Buildbot); ok { |
| 65 return x.Buildbot |
| 66 } |
| 67 return nil |
| 68 } |
| 69 |
| 70 func (m *BuildInfoRequest) GetSwarming() *BuildInfoRequest_Swarming { |
| 71 if x, ok := m.GetBuild().(*BuildInfoRequest_Swarming_); ok { |
| 72 return x.Swarming |
| 73 } |
| 74 return nil |
| 75 } |
| 76 |
| 77 func (m *BuildInfoRequest) GetProjectHint() string { |
| 78 if m != nil { |
| 79 return m.ProjectHint |
| 80 } |
| 81 return "" |
| 82 } |
| 83 |
| 84 // XXX_OneofFuncs is for the internal use of the proto package. |
| 85 func (*BuildInfoRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buff
er) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error)
, func(msg proto.Message) (n int), []interface{}) { |
| 86 return _BuildInfoRequest_OneofMarshaler, _BuildInfoRequest_OneofUnmarsha
ler, _BuildInfoRequest_OneofSizer, []interface{}{ |
| 87 (*BuildInfoRequest_Buildbot)(nil), |
| 88 (*BuildInfoRequest_Swarming_)(nil), |
| 89 } |
| 90 } |
| 91 |
| 92 func _BuildInfoRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error
{ |
| 93 m := msg.(*BuildInfoRequest) |
| 94 // build |
| 95 switch x := m.Build.(type) { |
| 96 case *BuildInfoRequest_Buildbot: |
| 97 b.EncodeVarint(1<<3 | proto.WireBytes) |
| 98 if err := b.EncodeMessage(x.Buildbot); err != nil { |
| 99 return err |
| 100 } |
| 101 case *BuildInfoRequest_Swarming_: |
| 102 b.EncodeVarint(2<<3 | proto.WireBytes) |
| 103 if err := b.EncodeMessage(x.Swarming); err != nil { |
| 104 return err |
| 105 } |
| 106 case nil: |
| 107 default: |
| 108 return fmt.Errorf("BuildInfoRequest.Build has unexpected type %T
", x) |
| 109 } |
| 110 return nil |
| 111 } |
| 112 |
| 113 func _BuildInfoRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *pro
to.Buffer) (bool, error) { |
| 114 m := msg.(*BuildInfoRequest) |
| 115 switch tag { |
| 116 case 1: // build.buildbot |
| 117 if wire != proto.WireBytes { |
| 118 return true, proto.ErrInternalBadWireType |
| 119 } |
| 120 msg := new(BuildInfoRequest_BuildBot) |
| 121 err := b.DecodeMessage(msg) |
| 122 m.Build = &BuildInfoRequest_Buildbot{msg} |
| 123 return true, err |
| 124 case 2: // build.swarming |
| 125 if wire != proto.WireBytes { |
| 126 return true, proto.ErrInternalBadWireType |
| 127 } |
| 128 msg := new(BuildInfoRequest_Swarming) |
| 129 err := b.DecodeMessage(msg) |
| 130 m.Build = &BuildInfoRequest_Swarming_{msg} |
| 131 return true, err |
| 132 default: |
| 133 return false, nil |
| 134 } |
| 135 } |
| 136 |
| 137 func _BuildInfoRequest_OneofSizer(msg proto.Message) (n int) { |
| 138 m := msg.(*BuildInfoRequest) |
| 139 // build |
| 140 switch x := m.Build.(type) { |
| 141 case *BuildInfoRequest_Buildbot: |
| 142 s := proto.Size(x.Buildbot) |
| 143 n += proto.SizeVarint(1<<3 | proto.WireBytes) |
| 144 n += proto.SizeVarint(uint64(s)) |
| 145 n += s |
| 146 case *BuildInfoRequest_Swarming_: |
| 147 s := proto.Size(x.Swarming) |
| 148 n += proto.SizeVarint(2<<3 | proto.WireBytes) |
| 149 n += proto.SizeVarint(uint64(s)) |
| 150 n += s |
| 151 case nil: |
| 152 default: |
| 153 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) |
| 154 } |
| 155 return n |
| 156 } |
| 157 |
| 158 // The request for the name of a BuildBot built. |
| 159 type BuildInfoRequest_BuildBot struct { |
| 160 // The master name. |
| 161 MasterName string `protobuf:"bytes,1,opt,name=master_name,json=masterNam
e" json:"master_name,omitempty"` |
| 162 // The builder name server. |
| 163 BuilderName string `protobuf:"bytes,2,opt,name=builder_name,json=builder
Name" json:"builder_name,omitempty"` |
| 164 // The build number. |
| 165 BuildNumber int64 `protobuf:"varint,3,opt,name=build_number,json=buildNu
mber" json:"build_number,omitempty"` |
| 166 } |
| 167 |
| 168 func (m *BuildInfoRequest_BuildBot) Reset() { *m = BuildInfoR
equest_BuildBot{} } |
| 169 func (m *BuildInfoRequest_BuildBot) String() string { return proto.Co
mpactTextString(m) } |
| 170 func (*BuildInfoRequest_BuildBot) ProtoMessage() {} |
| 171 func (*BuildInfoRequest_BuildBot) Descriptor() ([]byte, []int) { return fileDesc
riptor1, []int{0, 0} } |
| 172 |
| 173 func (m *BuildInfoRequest_BuildBot) GetMasterName() string { |
| 174 if m != nil { |
| 175 return m.MasterName |
| 176 } |
| 177 return "" |
| 178 } |
| 179 |
| 180 func (m *BuildInfoRequest_BuildBot) GetBuilderName() string { |
| 181 if m != nil { |
| 182 return m.BuilderName |
| 183 } |
| 184 return "" |
| 185 } |
| 186 |
| 187 func (m *BuildInfoRequest_BuildBot) GetBuildNumber() int64 { |
| 188 if m != nil { |
| 189 return m.BuildNumber |
| 190 } |
| 191 return 0 |
| 192 } |
| 193 |
| 194 // The request containing a Swarming task. |
| 195 type BuildInfoRequest_Swarming struct { |
| 196 // The Swarming task name. |
| 197 Task string `protobuf:"bytes,1,opt,name=task" json:"task,omitempty"` |
| 198 } |
| 199 |
| 200 func (m *BuildInfoRequest_Swarming) Reset() { *m = BuildInfoR
equest_Swarming{} } |
| 201 func (m *BuildInfoRequest_Swarming) String() string { return proto.Co
mpactTextString(m) } |
| 202 func (*BuildInfoRequest_Swarming) ProtoMessage() {} |
| 203 func (*BuildInfoRequest_Swarming) Descriptor() ([]byte, []int) { return fileDesc
riptor1, []int{0, 1} } |
| 204 |
| 205 func (m *BuildInfoRequest_Swarming) GetTask() string { |
| 206 if m != nil { |
| 207 return m.Task |
| 208 } |
| 209 return "" |
| 210 } |
| 211 |
| 212 // The request containing the name of the master. |
| 213 type BuildInfoResponse struct { |
| 214 // The LUCI project that this build belongs to. |
| 215 Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitem
pty"` |
| 216 // The main build step. |
| 217 Step *milo1.Step `protobuf:"bytes,2,opt,name=step" json:"step,omitempty"
` |
| 218 // The LogDog annotation stream for this build. The Prefix will be popul
ated |
| 219 // and can be used as the prefix for any un-prefixed LogdogStream in "st
ep". |
| 220 AnnotationStream *milo1.LogdogStream `protobuf:"bytes,3,opt,name=annotat
ion_stream,json=annotationStream" json:"annotation_stream,omitempty"` |
| 221 } |
| 222 |
| 223 func (m *BuildInfoResponse) Reset() { *m = BuildInfoResponse{
} } |
| 224 func (m *BuildInfoResponse) String() string { return proto.CompactTex
tString(m) } |
| 225 func (*BuildInfoResponse) ProtoMessage() {} |
| 226 func (*BuildInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor1,
[]int{1} } |
| 227 |
| 228 func (m *BuildInfoResponse) GetProject() string { |
| 229 if m != nil { |
| 230 return m.Project |
| 231 } |
| 232 return "" |
| 233 } |
| 234 |
| 235 func (m *BuildInfoResponse) GetStep() *milo1.Step { |
| 236 if m != nil { |
| 237 return m.Step |
| 238 } |
| 239 return nil |
| 240 } |
| 241 |
| 242 func (m *BuildInfoResponse) GetAnnotationStream() *milo1.LogdogStream { |
| 243 if m != nil { |
| 244 return m.AnnotationStream |
| 245 } |
| 246 return nil |
| 247 } |
| 248 |
| 249 func init() { |
| 250 proto.RegisterType((*BuildInfoRequest)(nil), "milo.BuildInfoRequest") |
| 251 proto.RegisterType((*BuildInfoRequest_BuildBot)(nil), "milo.BuildInfoReq
uest.BuildBot") |
| 252 proto.RegisterType((*BuildInfoRequest_Swarming)(nil), "milo.BuildInfoReq
uest.Swarming") |
| 253 proto.RegisterType((*BuildInfoResponse)(nil), "milo.BuildInfoResponse") |
| 254 } |
| 255 |
| 256 // Reference imports to suppress errors if they are not otherwise used. |
| 257 var _ context.Context |
| 258 var _ grpc.ClientConn |
| 259 |
| 260 // This is a compile-time assertion to ensure that this generated file |
| 261 // is compatible with the grpc package it is being compiled against. |
| 262 const _ = grpc.SupportPackageIsVersion4 |
| 263 |
| 264 // Client API for BuildInfo service |
| 265 |
| 266 type BuildInfoClient interface { |
| 267 Get(ctx context.Context, in *BuildInfoRequest, opts ...grpc.CallOption)
(*BuildInfoResponse, error) |
| 268 } |
| 269 type buildInfoPRPCClient struct { |
| 270 client *prpc.Client |
| 271 } |
| 272 |
| 273 func NewBuildInfoPRPCClient(client *prpc.Client) BuildInfoClient { |
| 274 return &buildInfoPRPCClient{client} |
| 275 } |
| 276 |
| 277 func (c *buildInfoPRPCClient) Get(ctx context.Context, in *BuildInfoRequest, opt
s ...grpc.CallOption) (*BuildInfoResponse, error) { |
| 278 out := new(BuildInfoResponse) |
| 279 err := c.client.Call(ctx, "milo.BuildInfo", "Get", in, out, opts...) |
| 280 if err != nil { |
| 281 return nil, err |
| 282 } |
| 283 return out, nil |
| 284 } |
| 285 |
| 286 type buildInfoClient struct { |
| 287 cc *grpc.ClientConn |
| 288 } |
| 289 |
| 290 func NewBuildInfoClient(cc *grpc.ClientConn) BuildInfoClient { |
| 291 return &buildInfoClient{cc} |
| 292 } |
| 293 |
| 294 func (c *buildInfoClient) Get(ctx context.Context, in *BuildInfoRequest, opts ..
.grpc.CallOption) (*BuildInfoResponse, error) { |
| 295 out := new(BuildInfoResponse) |
| 296 err := grpc.Invoke(ctx, "/milo.BuildInfo/Get", in, out, c.cc, opts...) |
| 297 if err != nil { |
| 298 return nil, err |
| 299 } |
| 300 return out, nil |
| 301 } |
| 302 |
| 303 // Server API for BuildInfo service |
| 304 |
| 305 type BuildInfoServer interface { |
| 306 Get(context.Context, *BuildInfoRequest) (*BuildInfoResponse, error) |
| 307 } |
| 308 |
| 309 func RegisterBuildInfoServer(s prpc.Registrar, srv BuildInfoServer) { |
| 310 s.RegisterService(&_BuildInfo_serviceDesc, srv) |
| 311 } |
| 312 |
| 313 func _BuildInfo_Get_Handler(srv interface{}, ctx context.Context, dec func(inter
face{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 314 in := new(BuildInfoRequest) |
| 315 if err := dec(in); err != nil { |
| 316 return nil, err |
| 317 } |
| 318 if interceptor == nil { |
| 319 return srv.(BuildInfoServer).Get(ctx, in) |
| 320 } |
| 321 info := &grpc.UnaryServerInfo{ |
| 322 Server: srv, |
| 323 FullMethod: "/milo.BuildInfo/Get", |
| 324 } |
| 325 handler := func(ctx context.Context, req interface{}) (interface{}, erro
r) { |
| 326 return srv.(BuildInfoServer).Get(ctx, req.(*BuildInfoRequest)) |
| 327 } |
| 328 return interceptor(ctx, in, info, handler) |
| 329 } |
| 330 |
| 331 var _BuildInfo_serviceDesc = grpc.ServiceDesc{ |
| 332 ServiceName: "milo.BuildInfo", |
| 333 HandlerType: (*BuildInfoServer)(nil), |
| 334 Methods: []grpc.MethodDesc{ |
| 335 { |
| 336 MethodName: "Get", |
| 337 Handler: _BuildInfo_Get_Handler, |
| 338 }, |
| 339 }, |
| 340 Streams: []grpc.StreamDesc{}, |
| 341 Metadata: "github.com/luci/luci-go/milo/api/proto/buildinfo.proto", |
| 342 } |
| 343 |
| 344 func init() { |
| 345 proto.RegisterFile("github.com/luci/luci-go/milo/api/proto/buildinfo.pro
to", fileDescriptor1) |
| 346 } |
| 347 |
| 348 var fileDescriptor1 = []byte{ |
| 349 // 377 bytes of a gzipped FileDescriptorProto |
| 350 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x92,
0x4d, 0xae, 0xda, 0x30, |
| 351 0x14, 0x85, 0x1b, 0xa0, 0x7d, 0x70, 0xd3, 0xc1, 0x7b, 0x1e, 0xb4, 0x51,
0x06, 0x40, 0x19, 0x31, |
| 352 0x69, 0x22, 0x51, 0x89, 0x49, 0x55, 0x55, 0xa2, 0x83, 0x52, 0xa9, 0x62,
0x10, 0x16, 0x10, 0x39, |
| 353 0xc1, 0x04, 0xb7, 0xd8, 0x37, 0xc4, 0x37, 0xea, 0x2e, 0xba, 0xb5, 0x6e,
0xa9, 0x8a, 0xed, 0x40, |
| 354 0x7f, 0xdf, 0x04, 0xe1, 0xe3, 0xf3, 0x9d, 0x7b, 0x6c, 0x07, 0xd6, 0x95,
0xa4, 0x53, 0x5b, 0x24, |
| 355 0x25, 0xaa, 0xf4, 0xdc, 0x96, 0xd2, 0xfe, 0xbc, 0xae, 0x30, 0x55, 0xf2,
0x8c, 0x29, 0xaf, 0x65, |
| 356 0x5a, 0x37, 0x48, 0x98, 0x16, 0xad, 0x3c, 0x1f, 0xa4, 0x3e, 0x62, 0x62,
0xd7, 0x6c, 0xd4, 0xed, |
| 357 0xc7, 0x6f, 0xff, 0x47, 0x97, 0xa8, 0x14, 0x6a, 0xcf, 0xba, 0x28, 0xad,
0x91, 0x38, 0x49, 0xd4, |
| 358 0xc6, 0x45, 0x2c, 0x7e, 0x0c, 0xe0, 0x7e, 0xd3, 0xc5, 0x7e, 0xd2, 0x47,
0xcc, 0xc4, 0xa5, 0x15, |
| 359 0x86, 0xd8, 0x3b, 0x18, 0xdb, 0x51, 0x05, 0x52, 0x14, 0xcc, 0x83, 0x65,
0xb8, 0x9a, 0x25, 0x1d, |
| 360 0x9f, 0xfc, 0xe9, 0x74, 0xc2, 0x06, 0x69, 0xfb, 0x24, 0xbb, 0x22, 0x1d,
0x6e, 0xbe, 0xf1, 0x46, |
| 361 0x49, 0x5d, 0x45, 0x83, 0x47, 0xf1, 0xbd, 0xb7, 0x75, 0x78, 0x8f, 0xb0,
0x57, 0xf0, 0xbc, 0x6e, |
| 362 0xf0, 0x8b, 0x28, 0x29, 0x3f, 0x49, 0x4d, 0x51, 0x38, 0x0f, 0x96, 0x93,
0x2c, 0xf4, 0xda, 0x56, |
| 363 0x6a, 0x8a, 0x2f, 0x30, 0xee, 0x27, 0xb3, 0x19, 0x84, 0x8a, 0x1b, 0x12,
0x4d, 0xae, 0xb9, 0x12, |
| 364 0xb6, 0xef, 0x24, 0x03, 0x27, 0xed, 0xb8, 0x12, 0x5d, 0x9e, 0xad, 0xd6,
0x3b, 0x06, 0x2e, 0xcf, |
| 365 0x6b, 0xbf, 0x59, 0x72, 0xdd, 0xaa, 0x42, 0x34, 0xd1, 0x70, 0x1e, 0x2c,
0x87, 0xde, 0xb2, 0xb3, |
| 366 0x52, 0x3c, 0x85, 0x71, 0xdf, 0x96, 0x31, 0x18, 0x11, 0x37, 0x5f, 0xfd,
0x2c, 0xfb, 0x7f, 0x73, |
| 367 0x07, 0x4f, 0xad, 0x7d, 0xf1, 0x3d, 0x80, 0x87, 0x5f, 0x0e, 0x6a, 0x6a,
0xd4, 0x46, 0xb0, 0x08, |
| 368 0xee, 0xfc, 0x01, 0x3c, 0xd5, 0x2f, 0xd9, 0x14, 0x46, 0x86, 0x44, 0xed,
0x6f, 0x0a, 0xdc, 0x4d, |
| 369 0xed, 0x49, 0xd4, 0x99, 0xd5, 0xd9, 0x7b, 0x78, 0xb8, 0x3d, 0x5b, 0x6e,
0xa8, 0x11, 0x5c, 0xd9, |
| 370 0x82, 0xe1, 0x8a, 0x39, 0xf3, 0x67, 0xac, 0x0e, 0x58, 0xed, 0xed, 0x4e,
0x76, 0x7f, 0x33, 0x3b, |
| 371 0x65, 0xf5, 0x01, 0x26, 0xd7, 0x3e, 0x6c, 0x0d, 0xc3, 0x8f, 0x82, 0xd8,
0x8b, 0x7f, 0x3f, 0x48, |
| 372 0xfc, 0xf2, 0x2f, 0xdd, 0xf5, 0x2f, 0x9e, 0xd9, 0xcf, 0xe5, 0xcd, 0xcf,
0x00, 0x00, 0x00, 0xff, |
| 373 0xff, 0x84, 0xf6, 0x82, 0x31, 0xab, 0x02, 0x00, 0x00, |
| 374 } |
| OLD | NEW |