/usr/share/gocode/src/google.golang.org/grpc/reflection/grpc_testing/test.pb.go is in golang-google-grpc-dev 1.0.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 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 fileDescriptor2, []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 fileDescriptor2, []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 fileDescriptor2, []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", fileDescriptor2) }
var fileDescriptor2 = []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, 0x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