Switch to using the dep tool and update all the dependencies

This commit is contained in:
Nick Craig-Wood 2017-05-11 15:39:54 +01:00
parent 5135ff73cb
commit 98c2d2c41b
5321 changed files with 4483201 additions and 5922 deletions

View file

@ -0,0 +1,78 @@
// Code generated by protoc-gen-go.
// source: proto2.proto
// DO NOT EDIT!
/*
Package grpc_testing is a generated protocol buffer package.
It is generated from these files:
proto2.proto
proto2_ext.proto
proto2_ext2.proto
test.proto
It has these top-level messages:
ToBeExtended
Extension
AnotherExtension
SearchResponse
SearchRequest
*/
package grpc_testing
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// 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
type ToBeExtended struct {
Foo *int32 `protobuf:"varint,1,req,name=foo" json:"foo,omitempty"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
}
func (m *ToBeExtended) Reset() { *m = ToBeExtended{} }
func (m *ToBeExtended) String() string { return proto.CompactTextString(m) }
func (*ToBeExtended) ProtoMessage() {}
func (*ToBeExtended) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
var extRange_ToBeExtended = []proto.ExtensionRange{
{10, 30},
}
func (*ToBeExtended) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_ToBeExtended
}
func (m *ToBeExtended) GetFoo() int32 {
if m != nil && m.Foo != nil {
return *m.Foo
}
return 0
}
func init() {
proto.RegisterType((*ToBeExtended)(nil), "grpc.testing.ToBeExtended")
}
func init() { proto.RegisterFile("proto2.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 86 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f,
0xc9, 0x37, 0xd2, 0x03, 0x53, 0x42, 0x3c, 0xe9, 0x45, 0x05, 0xc9, 0x7a, 0x25, 0xa9, 0xc5, 0x25,
0x99, 0x79, 0xe9, 0x4a, 0x6a, 0x5c, 0x3c, 0x21, 0xf9, 0x4e, 0xa9, 0xae, 0x15, 0x25, 0xa9, 0x79,
0x29, 0xa9, 0x29, 0x42, 0x02, 0x5c, 0xcc, 0x69, 0xf9, 0xf9, 0x12, 0x8c, 0x0a, 0x4c, 0x1a, 0xac,
0x41, 0x20, 0xa6, 0x16, 0x0b, 0x07, 0x97, 0x80, 0x3c, 0x20, 0x00, 0x00, 0xff, 0xff, 0x74, 0x86,
0x9c, 0x08, 0x44, 0x00, 0x00, 0x00,
}

View file

@ -0,0 +1,8 @@
syntax = "proto2";
package grpc.testing;
message ToBeExtended {
required int32 foo = 1;
extensions 10 to 30;
}

View file

@ -0,0 +1,83 @@
// Code generated by protoc-gen-go.
// source: proto2_ext.proto
// DO NOT EDIT!
package grpc_testing
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type Extension struct {
Whatzit *int32 `protobuf:"varint,1,opt,name=whatzit" json:"whatzit,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Extension) Reset() { *m = Extension{} }
func (m *Extension) String() string { return proto.CompactTextString(m) }
func (*Extension) ProtoMessage() {}
func (*Extension) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (m *Extension) GetWhatzit() int32 {
if m != nil && m.Whatzit != nil {
return *m.Whatzit
}
return 0
}
var E_Foo = &proto.ExtensionDesc{
ExtendedType: (*ToBeExtended)(nil),
ExtensionType: (*int32)(nil),
Field: 13,
Name: "grpc.testing.foo",
Tag: "varint,13,opt,name=foo",
Filename: "proto2_ext.proto",
}
var E_Bar = &proto.ExtensionDesc{
ExtendedType: (*ToBeExtended)(nil),
ExtensionType: (*Extension)(nil),
Field: 17,
Name: "grpc.testing.bar",
Tag: "bytes,17,opt,name=bar",
Filename: "proto2_ext.proto",
}
var E_Baz = &proto.ExtensionDesc{
ExtendedType: (*ToBeExtended)(nil),
ExtensionType: (*SearchRequest)(nil),
Field: 19,
Name: "grpc.testing.baz",
Tag: "bytes,19,opt,name=baz",
Filename: "proto2_ext.proto",
}
func init() {
proto.RegisterType((*Extension)(nil), "grpc.testing.Extension")
proto.RegisterExtension(E_Foo)
proto.RegisterExtension(E_Bar)
proto.RegisterExtension(E_Baz)
}
func init() { proto.RegisterFile("proto2_ext.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 179 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x28, 0x28, 0xca, 0x2f,
0xc9, 0x37, 0x8a, 0x4f, 0xad, 0x28, 0xd1, 0x03, 0x33, 0x85, 0x78, 0xd2, 0x8b, 0x0a, 0x92, 0xf5,
0x4a, 0x52, 0x8b, 0x4b, 0x32, 0xf3, 0xd2, 0xa5, 0x78, 0x20, 0xf2, 0x10, 0x39, 0x29, 0x2e, 0x90,
0x30, 0x84, 0xad, 0xa4, 0xca, 0xc5, 0xe9, 0x5a, 0x51, 0x92, 0x9a, 0x57, 0x9c, 0x99, 0x9f, 0x27,
0x24, 0xc1, 0xc5, 0x5e, 0x9e, 0x91, 0x58, 0x52, 0x95, 0x59, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1,
0x1a, 0x04, 0xe3, 0x5a, 0xe9, 0x70, 0x31, 0xa7, 0xe5, 0xe7, 0x0b, 0x49, 0xe9, 0x21, 0x1b, 0xab,
0x17, 0x92, 0xef, 0x94, 0x0a, 0xd6, 0x9d, 0x92, 0x9a, 0x22, 0xc1, 0x0b, 0xd6, 0x01, 0x52, 0x66,
0xe5, 0xca, 0xc5, 0x9c, 0x94, 0x58, 0x84, 0x57, 0xb5, 0xa0, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x38,
0xaa, 0x0a, 0xb8, 0x4b, 0x82, 0x40, 0xfa, 0xad, 0x3c, 0x41, 0xc6, 0x54, 0xe1, 0x35, 0x46, 0x18,
0x6c, 0x8c, 0x34, 0xaa, 0x8a, 0xe0, 0xd4, 0xc4, 0xa2, 0xe4, 0x8c, 0xa0, 0xd4, 0xc2, 0xd2, 0xd4,
0xe2, 0x12, 0x90, 0x51, 0x55, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x71, 0x6b, 0x94, 0x9f, 0x21,
0x01, 0x00, 0x00,
}

View file

@ -0,0 +1,16 @@
syntax = "proto2";
package grpc.testing;
import "proto2.proto";
import "test.proto";
extend ToBeExtended {
optional int32 foo = 13;
optional Extension bar = 17;
optional SearchRequest baz = 19;
}
message Extension {
optional int32 whatzit = 1;
}

View file

@ -0,0 +1,72 @@
// Code generated by protoc-gen-go.
// source: proto2_ext2.proto
// DO NOT EDIT!
package grpc_testing
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type AnotherExtension struct {
Whatchamacallit *int32 `protobuf:"varint,1,opt,name=whatchamacallit" json:"whatchamacallit,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *AnotherExtension) Reset() { *m = AnotherExtension{} }
func (m *AnotherExtension) String() string { return proto.CompactTextString(m) }
func (*AnotherExtension) ProtoMessage() {}
func (*AnotherExtension) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (m *AnotherExtension) GetWhatchamacallit() int32 {
if m != nil && m.Whatchamacallit != nil {
return *m.Whatchamacallit
}
return 0
}
var E_Frob = &proto.ExtensionDesc{
ExtendedType: (*ToBeExtended)(nil),
ExtensionType: (*string)(nil),
Field: 23,
Name: "grpc.testing.frob",
Tag: "bytes,23,opt,name=frob",
Filename: "proto2_ext2.proto",
}
var E_Nitz = &proto.ExtensionDesc{
ExtendedType: (*ToBeExtended)(nil),
ExtensionType: (*AnotherExtension)(nil),
Field: 29,
Name: "grpc.testing.nitz",
Tag: "bytes,29,opt,name=nitz",
Filename: "proto2_ext2.proto",
}
func init() {
proto.RegisterType((*AnotherExtension)(nil), "grpc.testing.AnotherExtension")
proto.RegisterExtension(E_Frob)
proto.RegisterExtension(E_Nitz)
}
func init() { proto.RegisterFile("proto2_ext2.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{
// 165 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x2c, 0x28, 0xca, 0x2f,
0xc9, 0x37, 0x8a, 0x4f, 0xad, 0x28, 0x31, 0xd2, 0x03, 0xb3, 0x85, 0x78, 0xd2, 0x8b, 0x0a, 0x92,
0xf5, 0x4a, 0x52, 0x8b, 0x4b, 0x32, 0xf3, 0xd2, 0xa5, 0x78, 0x20, 0x0a, 0x20, 0x72, 0x4a, 0x36,
0x5c, 0x02, 0x8e, 0x79, 0xf9, 0x25, 0x19, 0xa9, 0x45, 0xae, 0x15, 0x25, 0xa9, 0x79, 0xc5, 0x99,
0xf9, 0x79, 0x42, 0x1a, 0x5c, 0xfc, 0xe5, 0x19, 0x89, 0x25, 0xc9, 0x19, 0x89, 0xb9, 0x89, 0xc9,
0x89, 0x39, 0x39, 0x99, 0x25, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xac, 0x41, 0xe8, 0xc2, 0x56, 0x7a,
0x5c, 0x2c, 0x69, 0x45, 0xf9, 0x49, 0x42, 0x52, 0x7a, 0xc8, 0x56, 0xe8, 0x85, 0xe4, 0x3b, 0xa5,
0x82, 0x8d, 0x4b, 0x49, 0x4d, 0x91, 0x10, 0x57, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xab, 0xb3, 0xf2,
0xe3, 0x62, 0xc9, 0xcb, 0x2c, 0xa9, 0xc2, 0xab, 0x5e, 0x56, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x0e,
0x55, 0x05, 0xba, 0x1b, 0x83, 0xc0, 0xe6, 0x00, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x7e, 0x0d,
0x26, 0xed, 0x00, 0x00, 0x00,
}

View file

@ -0,0 +1,14 @@
syntax = "proto2";
package grpc.testing;
import "proto2.proto";
extend ToBeExtended {
optional string frob = 23;
optional AnotherExtension nitz = 29;
}
message AnotherExtension {
optional int32 whatchamacallit = 1;
}

View file

@ -0,0 +1,248 @@
// Code generated by protoc-gen-go.
// source: test.proto
// DO NOT EDIT!
package grpc_testing
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
type SearchResponse struct {
Results []*SearchResponse_Result `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
}
func (m *SearchResponse) Reset() { *m = SearchResponse{} }
func (m *SearchResponse) String() string { return proto.CompactTextString(m) }
func (*SearchResponse) ProtoMessage() {}
func (*SearchResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
func (m *SearchResponse) GetResults() []*SearchResponse_Result {
if m != nil {
return m.Results
}
return nil
}
type SearchResponse_Result struct {
Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"`
Snippets []string `protobuf:"bytes,3,rep,name=snippets" json:"snippets,omitempty"`
}
func (m *SearchResponse_Result) Reset() { *m = SearchResponse_Result{} }
func (m *SearchResponse_Result) String() string { return proto.CompactTextString(m) }
func (*SearchResponse_Result) ProtoMessage() {}
func (*SearchResponse_Result) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 0} }
func (m *SearchResponse_Result) GetUrl() string {
if m != nil {
return m.Url
}
return ""
}
func (m *SearchResponse_Result) GetTitle() string {
if m != nil {
return m.Title
}
return ""
}
func (m *SearchResponse_Result) GetSnippets() []string {
if m != nil {
return m.Snippets
}
return nil
}
type SearchRequest struct {
Query string `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"`
}
func (m *SearchRequest) Reset() { *m = SearchRequest{} }
func (m *SearchRequest) String() string { return proto.CompactTextString(m) }
func (*SearchRequest) ProtoMessage() {}
func (*SearchRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
func (m *SearchRequest) GetQuery() string {
if m != nil {
return m.Query
}
return ""
}
func init() {
proto.RegisterType((*SearchResponse)(nil), "grpc.testing.SearchResponse")
proto.RegisterType((*SearchResponse_Result)(nil), "grpc.testing.SearchResponse.Result")
proto.RegisterType((*SearchRequest)(nil), "grpc.testing.SearchRequest")
}
// 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.SupportPackageIsVersion4
// Client API for SearchService service
type SearchServiceClient interface {
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
StreamingSearch(ctx context.Context, opts ...grpc.CallOption) (SearchService_StreamingSearchClient, error)
}
type searchServiceClient struct {
cc *grpc.ClientConn
}
func NewSearchServiceClient(cc *grpc.ClientConn) SearchServiceClient {
return &searchServiceClient{cc}
}
func (c *searchServiceClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) {
out := new(SearchResponse)
err := grpc.Invoke(ctx, "/grpc.testing.SearchService/Search", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *searchServiceClient) StreamingSearch(ctx context.Context, opts ...grpc.CallOption) (SearchService_StreamingSearchClient, error) {
stream, err := grpc.NewClientStream(ctx, &_SearchService_serviceDesc.Streams[0], c.cc, "/grpc.testing.SearchService/StreamingSearch", opts...)
if err != nil {
return nil, err
}
x := &searchServiceStreamingSearchClient{stream}
return x, nil
}
type SearchService_StreamingSearchClient interface {
Send(*SearchRequest) error
Recv() (*SearchResponse, error)
grpc.ClientStream
}
type searchServiceStreamingSearchClient struct {
grpc.ClientStream
}
func (x *searchServiceStreamingSearchClient) Send(m *SearchRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *searchServiceStreamingSearchClient) Recv() (*SearchResponse, error) {
m := new(SearchResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// Server API for SearchService service
type SearchServiceServer interface {
Search(context.Context, *SearchRequest) (*SearchResponse, error)
StreamingSearch(SearchService_StreamingSearchServer) error
}
func RegisterSearchServiceServer(s *grpc.Server, srv SearchServiceServer) {
s.RegisterService(&_SearchService_serviceDesc, srv)
}
func _SearchService_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SearchServiceServer).Search(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.testing.SearchService/Search",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SearchServiceServer).Search(ctx, req.(*SearchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SearchService_StreamingSearch_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(SearchServiceServer).StreamingSearch(&searchServiceStreamingSearchServer{stream})
}
type SearchService_StreamingSearchServer interface {
Send(*SearchResponse) error
Recv() (*SearchRequest, error)
grpc.ServerStream
}
type searchServiceStreamingSearchServer struct {
grpc.ServerStream
}
func (x *searchServiceStreamingSearchServer) Send(m *SearchResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *searchServiceStreamingSearchServer) Recv() (*SearchRequest, error) {
m := new(SearchRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
var _SearchService_serviceDesc = grpc.ServiceDesc{
ServiceName: "grpc.testing.SearchService",
HandlerType: (*SearchServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Search",
Handler: _SearchService_Search_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "StreamingSearch",
Handler: _SearchService_StreamingSearch_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "test.proto",
}
func init() { proto.RegisterFile("test.proto", fileDescriptor3) }
var fileDescriptor3 = []byte{
// 231 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x91, 0xbd, 0x4a, 0xc5, 0x40,
0x10, 0x85, 0x59, 0x83, 0xd1, 0x3b, 0xfe, 0x32, 0x58, 0x84, 0x68, 0x11, 0xae, 0x08, 0xa9, 0x16,
0xb9, 0xd6, 0x56, 0xb6, 0x16, 0xb2, 0x79, 0x82, 0x6b, 0x18, 0xe2, 0x42, 0x4c, 0x36, 0x33, 0x13,
0xc1, 0x87, 0xb1, 0xf5, 0x39, 0x25, 0x59, 0x23, 0x0a, 0x62, 0x63, 0xb7, 0xe7, 0xe3, 0xcc, 0xb7,
0xbb, 0x0c, 0x80, 0x92, 0xa8, 0x0d, 0xdc, 0x6b, 0x8f, 0x87, 0x0d, 0x87, 0xda, 0x4e, 0xc0, 0x77,
0xcd, 0xfa, 0xcd, 0xc0, 0x71, 0x45, 0x5b, 0xae, 0x9f, 0x1c, 0x49, 0xe8, 0x3b, 0x21, 0xbc, 0x85,
0x3d, 0x26, 0x19, 0x5b, 0x95, 0xcc, 0x14, 0x49, 0x79, 0xb0, 0xb9, 0xb4, 0xdf, 0x47, 0xec, 0xcf,
0xba, 0x75, 0x73, 0xd7, 0x2d, 0x33, 0xf9, 0x3d, 0xa4, 0x11, 0xe1, 0x29, 0x24, 0x23, 0xb7, 0x99,
0x29, 0x4c, 0xb9, 0x72, 0xd3, 0x11, 0xcf, 0x60, 0x57, 0xbd, 0xb6, 0x94, 0xed, 0xcc, 0x2c, 0x06,
0xcc, 0x61, 0x5f, 0x3a, 0x1f, 0x02, 0xa9, 0x64, 0x49, 0x91, 0x94, 0x2b, 0xf7, 0x95, 0xd7, 0x57,
0x70, 0xb4, 0xdc, 0x37, 0x8c, 0x24, 0x3a, 0x29, 0x86, 0x91, 0xf8, 0xf5, 0x53, 0x1b, 0xc3, 0xe6,
0xdd, 0x2c, 0xbd, 0x8a, 0xf8, 0xc5, 0xd7, 0x84, 0x77, 0x90, 0x46, 0x80, 0xe7, 0xbf, 0x3f, 0x7f,
0xd6, 0xe5, 0x17, 0x7f, 0xfd, 0x0d, 0x1f, 0xe0, 0xa4, 0x52, 0xa6, 0xed, 0xb3, 0xef, 0x9a, 0x7f,
0xdb, 0x4a, 0x73, 0x6d, 0x1e, 0xd3, 0x79, 0x09, 0x37, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x20,
0xd6, 0x09, 0xb8, 0x92, 0x01, 0x00, 0x00,
}

View file

@ -0,0 +1,21 @@
syntax = "proto3";
package grpc.testing;
message SearchResponse {
message Result {
string url = 1;
string title = 2;
repeated string snippets = 3;
}
repeated Result results = 1;
}
message SearchRequest {
string query = 1;
}
service SearchService {
rpc Search(SearchRequest) returns (SearchResponse);
rpc StreamingSearch(stream SearchRequest) returns (stream SearchResponse);
}