OSDN Git Service

add package
[bytom/vapor.git] / vendor / github.com / hashicorp / go-plugin / examples / bidirectional / proto / kv.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: kv.proto
3
4 /*
5 Package proto is a generated protocol buffer package.
6
7 It is generated from these files:
8         kv.proto
9
10 It has these top-level messages:
11         GetRequest
12         GetResponse
13         PutRequest
14         Empty
15         SumRequest
16         SumResponse
17 */
18 package proto
19
20 import proto1 "github.com/golang/protobuf/proto"
21 import fmt "fmt"
22 import math "math"
23
24 import (
25         context "golang.org/x/net/context"
26         grpc "google.golang.org/grpc"
27 )
28
29 // Reference imports to suppress errors if they are not otherwise used.
30 var _ = proto1.Marshal
31 var _ = fmt.Errorf
32 var _ = math.Inf
33
34 // This is a compile-time assertion to ensure that this generated file
35 // is compatible with the proto package it is being compiled against.
36 // A compilation error at this line likely means your copy of the
37 // proto package needs to be updated.
38 const _ = proto1.ProtoPackageIsVersion2 // please upgrade the proto package
39
40 type GetRequest struct {
41         Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
42 }
43
44 func (m *GetRequest) Reset()                    { *m = GetRequest{} }
45 func (m *GetRequest) String() string            { return proto1.CompactTextString(m) }
46 func (*GetRequest) ProtoMessage()               {}
47 func (*GetRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
48
49 func (m *GetRequest) GetKey() string {
50         if m != nil {
51                 return m.Key
52         }
53         return ""
54 }
55
56 type GetResponse struct {
57         Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
58 }
59
60 func (m *GetResponse) Reset()                    { *m = GetResponse{} }
61 func (m *GetResponse) String() string            { return proto1.CompactTextString(m) }
62 func (*GetResponse) ProtoMessage()               {}
63 func (*GetResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
64
65 func (m *GetResponse) GetValue() int64 {
66         if m != nil {
67                 return m.Value
68         }
69         return 0
70 }
71
72 type PutRequest struct {
73         AddServer uint32 `protobuf:"varint,1,opt,name=add_server,json=addServer" json:"add_server,omitempty"`
74         Key       string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
75         Value     int64  `protobuf:"varint,3,opt,name=value" json:"value,omitempty"`
76 }
77
78 func (m *PutRequest) Reset()                    { *m = PutRequest{} }
79 func (m *PutRequest) String() string            { return proto1.CompactTextString(m) }
80 func (*PutRequest) ProtoMessage()               {}
81 func (*PutRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
82
83 func (m *PutRequest) GetAddServer() uint32 {
84         if m != nil {
85                 return m.AddServer
86         }
87         return 0
88 }
89
90 func (m *PutRequest) GetKey() string {
91         if m != nil {
92                 return m.Key
93         }
94         return ""
95 }
96
97 func (m *PutRequest) GetValue() int64 {
98         if m != nil {
99                 return m.Value
100         }
101         return 0
102 }
103
104 type Empty struct {
105 }
106
107 func (m *Empty) Reset()                    { *m = Empty{} }
108 func (m *Empty) String() string            { return proto1.CompactTextString(m) }
109 func (*Empty) ProtoMessage()               {}
110 func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
111
112 type SumRequest struct {
113         A int64 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"`
114         B int64 `protobuf:"varint,2,opt,name=b" json:"b,omitempty"`
115 }
116
117 func (m *SumRequest) Reset()                    { *m = SumRequest{} }
118 func (m *SumRequest) String() string            { return proto1.CompactTextString(m) }
119 func (*SumRequest) ProtoMessage()               {}
120 func (*SumRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
121
122 func (m *SumRequest) GetA() int64 {
123         if m != nil {
124                 return m.A
125         }
126         return 0
127 }
128
129 func (m *SumRequest) GetB() int64 {
130         if m != nil {
131                 return m.B
132         }
133         return 0
134 }
135
136 type SumResponse struct {
137         R int64 `protobuf:"varint,1,opt,name=r" json:"r,omitempty"`
138 }
139
140 func (m *SumResponse) Reset()                    { *m = SumResponse{} }
141 func (m *SumResponse) String() string            { return proto1.CompactTextString(m) }
142 func (*SumResponse) ProtoMessage()               {}
143 func (*SumResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
144
145 func (m *SumResponse) GetR() int64 {
146         if m != nil {
147                 return m.R
148         }
149         return 0
150 }
151
152 func init() {
153         proto1.RegisterType((*GetRequest)(nil), "proto.GetRequest")
154         proto1.RegisterType((*GetResponse)(nil), "proto.GetResponse")
155         proto1.RegisterType((*PutRequest)(nil), "proto.PutRequest")
156         proto1.RegisterType((*Empty)(nil), "proto.Empty")
157         proto1.RegisterType((*SumRequest)(nil), "proto.SumRequest")
158         proto1.RegisterType((*SumResponse)(nil), "proto.SumResponse")
159 }
160
161 // Reference imports to suppress errors if they are not otherwise used.
162 var _ context.Context
163 var _ grpc.ClientConn
164
165 // This is a compile-time assertion to ensure that this generated file
166 // is compatible with the grpc package it is being compiled against.
167 const _ = grpc.SupportPackageIsVersion4
168
169 // Client API for Counter service
170
171 type CounterClient interface {
172         Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
173         Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*Empty, error)
174 }
175
176 type counterClient struct {
177         cc *grpc.ClientConn
178 }
179
180 func NewCounterClient(cc *grpc.ClientConn) CounterClient {
181         return &counterClient{cc}
182 }
183
184 func (c *counterClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
185         out := new(GetResponse)
186         err := grpc.Invoke(ctx, "/proto.Counter/Get", in, out, c.cc, opts...)
187         if err != nil {
188                 return nil, err
189         }
190         return out, nil
191 }
192
193 func (c *counterClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*Empty, error) {
194         out := new(Empty)
195         err := grpc.Invoke(ctx, "/proto.Counter/Put", in, out, c.cc, opts...)
196         if err != nil {
197                 return nil, err
198         }
199         return out, nil
200 }
201
202 // Server API for Counter service
203
204 type CounterServer interface {
205         Get(context.Context, *GetRequest) (*GetResponse, error)
206         Put(context.Context, *PutRequest) (*Empty, error)
207 }
208
209 func RegisterCounterServer(s *grpc.Server, srv CounterServer) {
210         s.RegisterService(&_Counter_serviceDesc, srv)
211 }
212
213 func _Counter_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
214         in := new(GetRequest)
215         if err := dec(in); err != nil {
216                 return nil, err
217         }
218         if interceptor == nil {
219                 return srv.(CounterServer).Get(ctx, in)
220         }
221         info := &grpc.UnaryServerInfo{
222                 Server:     srv,
223                 FullMethod: "/proto.Counter/Get",
224         }
225         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
226                 return srv.(CounterServer).Get(ctx, req.(*GetRequest))
227         }
228         return interceptor(ctx, in, info, handler)
229 }
230
231 func _Counter_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
232         in := new(PutRequest)
233         if err := dec(in); err != nil {
234                 return nil, err
235         }
236         if interceptor == nil {
237                 return srv.(CounterServer).Put(ctx, in)
238         }
239         info := &grpc.UnaryServerInfo{
240                 Server:     srv,
241                 FullMethod: "/proto.Counter/Put",
242         }
243         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
244                 return srv.(CounterServer).Put(ctx, req.(*PutRequest))
245         }
246         return interceptor(ctx, in, info, handler)
247 }
248
249 var _Counter_serviceDesc = grpc.ServiceDesc{
250         ServiceName: "proto.Counter",
251         HandlerType: (*CounterServer)(nil),
252         Methods: []grpc.MethodDesc{
253                 {
254                         MethodName: "Get",
255                         Handler:    _Counter_Get_Handler,
256                 },
257                 {
258                         MethodName: "Put",
259                         Handler:    _Counter_Put_Handler,
260                 },
261         },
262         Streams:  []grpc.StreamDesc{},
263         Metadata: "kv.proto",
264 }
265
266 // Client API for AddHelper service
267
268 type AddHelperClient interface {
269         Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumResponse, error)
270 }
271
272 type addHelperClient struct {
273         cc *grpc.ClientConn
274 }
275
276 func NewAddHelperClient(cc *grpc.ClientConn) AddHelperClient {
277         return &addHelperClient{cc}
278 }
279
280 func (c *addHelperClient) Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumResponse, error) {
281         out := new(SumResponse)
282         err := grpc.Invoke(ctx, "/proto.AddHelper/Sum", in, out, c.cc, opts...)
283         if err != nil {
284                 return nil, err
285         }
286         return out, nil
287 }
288
289 // Server API for AddHelper service
290
291 type AddHelperServer interface {
292         Sum(context.Context, *SumRequest) (*SumResponse, error)
293 }
294
295 func RegisterAddHelperServer(s *grpc.Server, srv AddHelperServer) {
296         s.RegisterService(&_AddHelper_serviceDesc, srv)
297 }
298
299 func _AddHelper_Sum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
300         in := new(SumRequest)
301         if err := dec(in); err != nil {
302                 return nil, err
303         }
304         if interceptor == nil {
305                 return srv.(AddHelperServer).Sum(ctx, in)
306         }
307         info := &grpc.UnaryServerInfo{
308                 Server:     srv,
309                 FullMethod: "/proto.AddHelper/Sum",
310         }
311         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
312                 return srv.(AddHelperServer).Sum(ctx, req.(*SumRequest))
313         }
314         return interceptor(ctx, in, info, handler)
315 }
316
317 var _AddHelper_serviceDesc = grpc.ServiceDesc{
318         ServiceName: "proto.AddHelper",
319         HandlerType: (*AddHelperServer)(nil),
320         Methods: []grpc.MethodDesc{
321                 {
322                         MethodName: "Sum",
323                         Handler:    _AddHelper_Sum_Handler,
324                 },
325         },
326         Streams:  []grpc.StreamDesc{},
327         Metadata: "kv.proto",
328 }
329
330 func init() { proto1.RegisterFile("kv.proto", fileDescriptor0) }
331
332 var fileDescriptor0 = []byte{
333         // 253 bytes of a gzipped FileDescriptorProto
334         0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x4f, 0x4b, 0x03, 0x31,
335         0x10, 0xc5, 0x89, 0x61, 0xad, 0xfb, 0xba, 0x82, 0x06, 0x0f, 0x52, 0x51, 0x24, 0x82, 0xf4, 0x20,
336         0x3d, 0xd4, 0x93, 0x47, 0x11, 0xa9, 0xc7, 0x92, 0xfd, 0x00, 0x25, 0x4b, 0xe6, 0xd4, 0x6e, 0x77,
337         0xcd, 0x26, 0x0b, 0xfd, 0xf6, 0xa5, 0xd9, 0x3f, 0xd9, 0x53, 0x32, 0x2f, 0x2f, 0xbf, 0x37, 0x33,
338         0xb8, 0xd9, 0xb7, 0xab, 0xda, 0x56, 0xae, 0x12, 0x49, 0x38, 0xe4, 0x0b, 0xb0, 0x21, 0xa7, 0xe8,
339         0xdf, 0x53, 0xe3, 0xc4, 0x1d, 0xf8, 0x9e, 0x4e, 0x8f, 0xec, 0x95, 0x2d, 0x53, 0x75, 0xb9, 0xca,
340         0x37, 0xcc, 0xc3, 0x7b, 0x53, 0x57, 0xc7, 0x86, 0xc4, 0x03, 0x92, 0x56, 0x1f, 0x3c, 0x05, 0x0b,
341         0x57, 0x5d, 0x21, 0x73, 0x60, 0xeb, 0x47, 0xc8, 0x33, 0xa0, 0x8d, 0xd9, 0x35, 0x64, 0x5b, 0xb2,
342         0xc1, 0x78, 0xab, 0x52, 0x6d, 0x4c, 0x1e, 0x84, 0x21, 0xe3, 0x6a, 0xcc, 0x88, 0x50, 0x3e, 0x85,
343         0xce, 0x90, 0xfc, 0x96, 0xb5, 0x3b, 0xc9, 0x25, 0x90, 0xfb, 0x72, 0xa0, 0x67, 0x60, 0xba, 0x4f,
344         0x67, 0xfa, 0x52, 0x15, 0x01, 0xc5, 0x15, 0x2b, 0xe4, 0x13, 0xe6, 0xc1, 0xd9, 0x37, 0x9b, 0x81,
345         0xd9, 0xc1, 0x6a, 0xd7, 0x3b, 0xcc, 0x7e, 0x2a, 0x7f, 0x74, 0x64, 0xc5, 0x07, 0xf8, 0x86, 0x9c,
346         0xb8, 0xef, 0x56, 0xb1, 0x8a, 0x0b, 0x58, 0x88, 0xa9, 0xd4, 0x63, 0xde, 0xc1, 0xb7, 0x3e, 0xba,
347         0xe3, 0xa4, 0x8b, 0xac, 0x97, 0x42, 0x9f, 0xeb, 0x2f, 0xa4, 0xdf, 0xc6, 0xfc, 0xd1, 0xa1, 0xee,
348         0x22, 0x72, 0x5f, 0x8e, 0x9f, 0xe2, 0x00, 0x63, 0xc4, 0xa4, 0xd3, 0xe2, 0x3a, 0x48, 0x9f, 0xe7,
349         0x00, 0x00, 0x00, 0xff, 0xff, 0x40, 0xa3, 0x85, 0x07, 0x9f, 0x01, 0x00, 0x00,
350 }