OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / grpc / reflection / grpc_testing / test.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: test.proto
3
4 package grpc_testing
5
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9
10 import (
11         context "golang.org/x/net/context"
12         grpc "google.golang.org/grpc"
13 )
14
15 // Reference imports to suppress errors if they are not otherwise used.
16 var _ = proto.Marshal
17 var _ = fmt.Errorf
18 var _ = math.Inf
19
20 type SearchResponse struct {
21         Results []*SearchResponse_Result `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
22 }
23
24 func (m *SearchResponse) Reset()                    { *m = SearchResponse{} }
25 func (m *SearchResponse) String() string            { return proto.CompactTextString(m) }
26 func (*SearchResponse) ProtoMessage()               {}
27 func (*SearchResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
28
29 func (m *SearchResponse) GetResults() []*SearchResponse_Result {
30         if m != nil {
31                 return m.Results
32         }
33         return nil
34 }
35
36 type SearchResponse_Result struct {
37         Url      string   `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
38         Title    string   `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"`
39         Snippets []string `protobuf:"bytes,3,rep,name=snippets" json:"snippets,omitempty"`
40 }
41
42 func (m *SearchResponse_Result) Reset()                    { *m = SearchResponse_Result{} }
43 func (m *SearchResponse_Result) String() string            { return proto.CompactTextString(m) }
44 func (*SearchResponse_Result) ProtoMessage()               {}
45 func (*SearchResponse_Result) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 0} }
46
47 func (m *SearchResponse_Result) GetUrl() string {
48         if m != nil {
49                 return m.Url
50         }
51         return ""
52 }
53
54 func (m *SearchResponse_Result) GetTitle() string {
55         if m != nil {
56                 return m.Title
57         }
58         return ""
59 }
60
61 func (m *SearchResponse_Result) GetSnippets() []string {
62         if m != nil {
63                 return m.Snippets
64         }
65         return nil
66 }
67
68 type SearchRequest struct {
69         Query string `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"`
70 }
71
72 func (m *SearchRequest) Reset()                    { *m = SearchRequest{} }
73 func (m *SearchRequest) String() string            { return proto.CompactTextString(m) }
74 func (*SearchRequest) ProtoMessage()               {}
75 func (*SearchRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
76
77 func (m *SearchRequest) GetQuery() string {
78         if m != nil {
79                 return m.Query
80         }
81         return ""
82 }
83
84 func init() {
85         proto.RegisterType((*SearchResponse)(nil), "grpc.testing.SearchResponse")
86         proto.RegisterType((*SearchResponse_Result)(nil), "grpc.testing.SearchResponse.Result")
87         proto.RegisterType((*SearchRequest)(nil), "grpc.testing.SearchRequest")
88 }
89
90 // Reference imports to suppress errors if they are not otherwise used.
91 var _ context.Context
92 var _ grpc.ClientConn
93
94 // This is a compile-time assertion to ensure that this generated file
95 // is compatible with the grpc package it is being compiled against.
96 const _ = grpc.SupportPackageIsVersion4
97
98 // Client API for SearchService service
99
100 type SearchServiceClient interface {
101         Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
102         StreamingSearch(ctx context.Context, opts ...grpc.CallOption) (SearchService_StreamingSearchClient, error)
103 }
104
105 type searchServiceClient struct {
106         cc *grpc.ClientConn
107 }
108
109 func NewSearchServiceClient(cc *grpc.ClientConn) SearchServiceClient {
110         return &searchServiceClient{cc}
111 }
112
113 func (c *searchServiceClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) {
114         out := new(SearchResponse)
115         err := grpc.Invoke(ctx, "/grpc.testing.SearchService/Search", in, out, c.cc, opts...)
116         if err != nil {
117                 return nil, err
118         }
119         return out, nil
120 }
121
122 func (c *searchServiceClient) StreamingSearch(ctx context.Context, opts ...grpc.CallOption) (SearchService_StreamingSearchClient, error) {
123         stream, err := grpc.NewClientStream(ctx, &_SearchService_serviceDesc.Streams[0], c.cc, "/grpc.testing.SearchService/StreamingSearch", opts...)
124         if err != nil {
125                 return nil, err
126         }
127         x := &searchServiceStreamingSearchClient{stream}
128         return x, nil
129 }
130
131 type SearchService_StreamingSearchClient interface {
132         Send(*SearchRequest) error
133         Recv() (*SearchResponse, error)
134         grpc.ClientStream
135 }
136
137 type searchServiceStreamingSearchClient struct {
138         grpc.ClientStream
139 }
140
141 func (x *searchServiceStreamingSearchClient) Send(m *SearchRequest) error {
142         return x.ClientStream.SendMsg(m)
143 }
144
145 func (x *searchServiceStreamingSearchClient) Recv() (*SearchResponse, error) {
146         m := new(SearchResponse)
147         if err := x.ClientStream.RecvMsg(m); err != nil {
148                 return nil, err
149         }
150         return m, nil
151 }
152
153 // Server API for SearchService service
154
155 type SearchServiceServer interface {
156         Search(context.Context, *SearchRequest) (*SearchResponse, error)
157         StreamingSearch(SearchService_StreamingSearchServer) error
158 }
159
160 func RegisterSearchServiceServer(s *grpc.Server, srv SearchServiceServer) {
161         s.RegisterService(&_SearchService_serviceDesc, srv)
162 }
163
164 func _SearchService_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
165         in := new(SearchRequest)
166         if err := dec(in); err != nil {
167                 return nil, err
168         }
169         if interceptor == nil {
170                 return srv.(SearchServiceServer).Search(ctx, in)
171         }
172         info := &grpc.UnaryServerInfo{
173                 Server:     srv,
174                 FullMethod: "/grpc.testing.SearchService/Search",
175         }
176         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
177                 return srv.(SearchServiceServer).Search(ctx, req.(*SearchRequest))
178         }
179         return interceptor(ctx, in, info, handler)
180 }
181
182 func _SearchService_StreamingSearch_Handler(srv interface{}, stream grpc.ServerStream) error {
183         return srv.(SearchServiceServer).StreamingSearch(&searchServiceStreamingSearchServer{stream})
184 }
185
186 type SearchService_StreamingSearchServer interface {
187         Send(*SearchResponse) error
188         Recv() (*SearchRequest, error)
189         grpc.ServerStream
190 }
191
192 type searchServiceStreamingSearchServer struct {
193         grpc.ServerStream
194 }
195
196 func (x *searchServiceStreamingSearchServer) Send(m *SearchResponse) error {
197         return x.ServerStream.SendMsg(m)
198 }
199
200 func (x *searchServiceStreamingSearchServer) Recv() (*SearchRequest, error) {
201         m := new(SearchRequest)
202         if err := x.ServerStream.RecvMsg(m); err != nil {
203                 return nil, err
204         }
205         return m, nil
206 }
207
208 var _SearchService_serviceDesc = grpc.ServiceDesc{
209         ServiceName: "grpc.testing.SearchService",
210         HandlerType: (*SearchServiceServer)(nil),
211         Methods: []grpc.MethodDesc{
212                 {
213                         MethodName: "Search",
214                         Handler:    _SearchService_Search_Handler,
215                 },
216         },
217         Streams: []grpc.StreamDesc{
218                 {
219                         StreamName:    "StreamingSearch",
220                         Handler:       _SearchService_StreamingSearch_Handler,
221                         ServerStreams: true,
222                         ClientStreams: true,
223                 },
224         },
225         Metadata: "test.proto",
226 }
227
228 func init() { proto.RegisterFile("test.proto", fileDescriptor3) }
229
230 var fileDescriptor3 = []byte{
231         // 231 bytes of a gzipped FileDescriptorProto
232         0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x91, 0xbd, 0x4a, 0xc5, 0x40,
233         0x10, 0x85, 0x59, 0x83, 0xd1, 0x3b, 0xfe, 0x32, 0x58, 0x84, 0x68, 0x11, 0xae, 0x08, 0xa9, 0x16,
234         0xb9, 0xd6, 0x56, 0xb6, 0x16, 0xb2, 0x79, 0x82, 0x6b, 0x18, 0xe2, 0x42, 0x4c, 0x36, 0x33, 0x13,
235         0xc1, 0x87, 0xb1, 0xf5, 0x39, 0x25, 0x59, 0x23, 0x0a, 0x62, 0x63, 0xb7, 0xe7, 0xe3, 0xcc, 0xb7,
236         0xbb, 0x0c, 0x80, 0x92, 0xa8, 0x0d, 0xdc, 0x6b, 0x8f, 0x87, 0x0d, 0x87, 0xda, 0x4e, 0xc0, 0x77,
237         0xcd, 0xfa, 0xcd, 0xc0, 0x71, 0x45, 0x5b, 0xae, 0x9f, 0x1c, 0x49, 0xe8, 0x3b, 0x21, 0xbc, 0x85,
238         0x3d, 0x26, 0x19, 0x5b, 0x95, 0xcc, 0x14, 0x49, 0x79, 0xb0, 0xb9, 0xb4, 0xdf, 0x47, 0xec, 0xcf,
239         0xba, 0x75, 0x73, 0xd7, 0x2d, 0x33, 0xf9, 0x3d, 0xa4, 0x11, 0xe1, 0x29, 0x24, 0x23, 0xb7, 0x99,
240         0x29, 0x4c, 0xb9, 0x72, 0xd3, 0x11, 0xcf, 0x60, 0x57, 0xbd, 0xb6, 0x94, 0xed, 0xcc, 0x2c, 0x06,
241         0xcc, 0x61, 0x5f, 0x3a, 0x1f, 0x02, 0xa9, 0x64, 0x49, 0x91, 0x94, 0x2b, 0xf7, 0x95, 0xd7, 0x57,
242         0x70, 0xb4, 0xdc, 0x37, 0x8c, 0x24, 0x3a, 0x29, 0x86, 0x91, 0xf8, 0xf5, 0x53, 0x1b, 0xc3, 0xe6,
243         0xdd, 0x2c, 0xbd, 0x8a, 0xf8, 0xc5, 0xd7, 0x84, 0x77, 0x90, 0x46, 0x80, 0xe7, 0xbf, 0x3f, 0x7f,
244         0xd6, 0xe5, 0x17, 0x7f, 0xfd, 0x0d, 0x1f, 0xe0, 0xa4, 0x52, 0xa6, 0xed, 0xb3, 0xef, 0x9a, 0x7f,
245         0xdb, 0x4a, 0x73, 0x6d, 0x1e, 0xd3, 0x79, 0x09, 0x37, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x20,
246         0xd6, 0x09, 0xb8, 0x92, 0x01, 0x00, 0x00,
247 }