forked from grpc/grpc-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testv3.pb.go
236 lines (197 loc) · 8.44 KB
/
testv3.pb.go
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
// Code generated by protoc-gen-go.
// source: testv3.proto
// DO NOT EDIT!
/*
Package grpc_testingv3 is a generated protocol buffer package.
It is generated from these files:
testv3.proto
It has these top-level messages:
SearchResponseV3
SearchRequestV3
*/
package grpc_testingv3
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
type SearchResponseV3 struct {
Results []*SearchResponseV3_Result `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
}
func (m *SearchResponseV3) Reset() { *m = SearchResponseV3{} }
func (m *SearchResponseV3) String() string { return proto.CompactTextString(m) }
func (*SearchResponseV3) ProtoMessage() {}
func (*SearchResponseV3) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *SearchResponseV3) GetResults() []*SearchResponseV3_Result {
if m != nil {
return m.Results
}
return nil
}
type SearchResponseV3_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 *SearchResponseV3_Result) Reset() { *m = SearchResponseV3_Result{} }
func (m *SearchResponseV3_Result) String() string { return proto.CompactTextString(m) }
func (*SearchResponseV3_Result) ProtoMessage() {}
func (*SearchResponseV3_Result) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
type SearchRequestV3 struct {
Query string `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"`
}
func (m *SearchRequestV3) Reset() { *m = SearchRequestV3{} }
func (m *SearchRequestV3) String() string { return proto.CompactTextString(m) }
func (*SearchRequestV3) ProtoMessage() {}
func (*SearchRequestV3) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func init() {
proto.RegisterType((*SearchResponseV3)(nil), "grpc.testingv3.SearchResponseV3")
proto.RegisterType((*SearchResponseV3_Result)(nil), "grpc.testingv3.SearchResponseV3.Result")
proto.RegisterType((*SearchRequestV3)(nil), "grpc.testingv3.SearchRequestV3")
}
// 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.SupportPackageIsVersion3
// Client API for SearchServiceV3 service
type SearchServiceV3Client interface {
Search(ctx context.Context, in *SearchRequestV3, opts ...grpc.CallOption) (*SearchResponseV3, error)
StreamingSearch(ctx context.Context, opts ...grpc.CallOption) (SearchServiceV3_StreamingSearchClient, error)
}
type searchServiceV3Client struct {
cc *grpc.ClientConn
}
func NewSearchServiceV3Client(cc *grpc.ClientConn) SearchServiceV3Client {
return &searchServiceV3Client{cc}
}
func (c *searchServiceV3Client) Search(ctx context.Context, in *SearchRequestV3, opts ...grpc.CallOption) (*SearchResponseV3, error) {
out := new(SearchResponseV3)
err := grpc.Invoke(ctx, "/grpc.testingv3.SearchServiceV3/Search", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *searchServiceV3Client) StreamingSearch(ctx context.Context, opts ...grpc.CallOption) (SearchServiceV3_StreamingSearchClient, error) {
stream, err := grpc.NewClientStream(ctx, &_SearchServiceV3_serviceDesc.Streams[0], c.cc, "/grpc.testingv3.SearchServiceV3/StreamingSearch", opts...)
if err != nil {
return nil, err
}
x := &searchServiceV3StreamingSearchClient{stream}
return x, nil
}
type SearchServiceV3_StreamingSearchClient interface {
Send(*SearchRequestV3) error
Recv() (*SearchResponseV3, error)
grpc.ClientStream
}
type searchServiceV3StreamingSearchClient struct {
grpc.ClientStream
}
func (x *searchServiceV3StreamingSearchClient) Send(m *SearchRequestV3) error {
return x.ClientStream.SendMsg(m)
}
func (x *searchServiceV3StreamingSearchClient) Recv() (*SearchResponseV3, error) {
m := new(SearchResponseV3)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// Server API for SearchServiceV3 service
type SearchServiceV3Server interface {
Search(context.Context, *SearchRequestV3) (*SearchResponseV3, error)
StreamingSearch(SearchServiceV3_StreamingSearchServer) error
}
func RegisterSearchServiceV3Server(s *grpc.Server, srv SearchServiceV3Server) {
s.RegisterService(&_SearchServiceV3_serviceDesc, srv)
}
func _SearchServiceV3_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchRequestV3)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SearchServiceV3Server).Search(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.testingv3.SearchServiceV3/Search",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SearchServiceV3Server).Search(ctx, req.(*SearchRequestV3))
}
return interceptor(ctx, in, info, handler)
}
func _SearchServiceV3_StreamingSearch_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(SearchServiceV3Server).StreamingSearch(&searchServiceV3StreamingSearchServer{stream})
}
type SearchServiceV3_StreamingSearchServer interface {
Send(*SearchResponseV3) error
Recv() (*SearchRequestV3, error)
grpc.ServerStream
}
type searchServiceV3StreamingSearchServer struct {
grpc.ServerStream
}
func (x *searchServiceV3StreamingSearchServer) Send(m *SearchResponseV3) error {
return x.ServerStream.SendMsg(m)
}
func (x *searchServiceV3StreamingSearchServer) Recv() (*SearchRequestV3, error) {
m := new(SearchRequestV3)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
var _SearchServiceV3_serviceDesc = grpc.ServiceDesc{
ServiceName: "grpc.testingv3.SearchServiceV3",
HandlerType: (*SearchServiceV3Server)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Search",
Handler: _SearchServiceV3_Search_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "StreamingSearch",
Handler: _SearchServiceV3_StreamingSearch_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: fileDescriptor0,
}
func init() { proto.RegisterFile("testv3.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 240 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0x41, 0x4b, 0xc3, 0x40,
0x10, 0x85, 0x59, 0x83, 0xd1, 0x8e, 0x62, 0xcb, 0xe2, 0x21, 0xe4, 0x62, 0xe8, 0xa5, 0x39, 0x2d,
0xd2, 0xfd, 0x05, 0x9e, 0xf5, 0xb4, 0x81, 0xe2, 0xb5, 0x86, 0x21, 0x2e, 0xc4, 0x64, 0x3b, 0x33,
0x09, 0xf8, 0x7b, 0xfc, 0x13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