OSDN Git Service

delete miner
[bytom/vapor.git] / vendor / github.com / go-kit / kit / examples / addsvc / pb / addsvc.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: addsvc.proto
3
4 /*
5 Package pb is a generated protocol buffer package.
6
7 It is generated from these files:
8         addsvc.proto
9
10 It has these top-level messages:
11         SumRequest
12         SumReply
13         ConcatRequest
14         ConcatReply
15 */
16 package pb
17
18 import proto "github.com/golang/protobuf/proto"
19 import fmt "fmt"
20 import math "math"
21
22 import (
23         context "golang.org/x/net/context"
24         grpc "google.golang.org/grpc"
25 )
26
27 // Reference imports to suppress errors if they are not otherwise used.
28 var _ = proto.Marshal
29 var _ = fmt.Errorf
30 var _ = math.Inf
31
32 // This is a compile-time assertion to ensure that this generated file
33 // is compatible with the proto package it is being compiled against.
34 // A compilation error at this line likely means your copy of the
35 // proto package needs to be updated.
36 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
37
38 // The sum request contains two parameters.
39 type SumRequest struct {
40         A int64 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"`
41         B int64 `protobuf:"varint,2,opt,name=b" json:"b,omitempty"`
42 }
43
44 func (m *SumRequest) Reset()                    { *m = SumRequest{} }
45 func (m *SumRequest) String() string            { return proto.CompactTextString(m) }
46 func (*SumRequest) ProtoMessage()               {}
47 func (*SumRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
48
49 func (m *SumRequest) GetA() int64 {
50         if m != nil {
51                 return m.A
52         }
53         return 0
54 }
55
56 func (m *SumRequest) GetB() int64 {
57         if m != nil {
58                 return m.B
59         }
60         return 0
61 }
62
63 // The sum response contains the result of the calculation.
64 type SumReply struct {
65         V   int64  `protobuf:"varint,1,opt,name=v" json:"v,omitempty"`
66         Err string `protobuf:"bytes,2,opt,name=err" json:"err,omitempty"`
67 }
68
69 func (m *SumReply) Reset()                    { *m = SumReply{} }
70 func (m *SumReply) String() string            { return proto.CompactTextString(m) }
71 func (*SumReply) ProtoMessage()               {}
72 func (*SumReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
73
74 func (m *SumReply) GetV() int64 {
75         if m != nil {
76                 return m.V
77         }
78         return 0
79 }
80
81 func (m *SumReply) GetErr() string {
82         if m != nil {
83                 return m.Err
84         }
85         return ""
86 }
87
88 // The Concat request contains two parameters.
89 type ConcatRequest struct {
90         A string `protobuf:"bytes,1,opt,name=a" json:"a,omitempty"`
91         B string `protobuf:"bytes,2,opt,name=b" json:"b,omitempty"`
92 }
93
94 func (m *ConcatRequest) Reset()                    { *m = ConcatRequest{} }
95 func (m *ConcatRequest) String() string            { return proto.CompactTextString(m) }
96 func (*ConcatRequest) ProtoMessage()               {}
97 func (*ConcatRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
98
99 func (m *ConcatRequest) GetA() string {
100         if m != nil {
101                 return m.A
102         }
103         return ""
104 }
105
106 func (m *ConcatRequest) GetB() string {
107         if m != nil {
108                 return m.B
109         }
110         return ""
111 }
112
113 // The Concat response contains the result of the concatenation.
114 type ConcatReply struct {
115         V   string `protobuf:"bytes,1,opt,name=v" json:"v,omitempty"`
116         Err string `protobuf:"bytes,2,opt,name=err" json:"err,omitempty"`
117 }
118
119 func (m *ConcatReply) Reset()                    { *m = ConcatReply{} }
120 func (m *ConcatReply) String() string            { return proto.CompactTextString(m) }
121 func (*ConcatReply) ProtoMessage()               {}
122 func (*ConcatReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
123
124 func (m *ConcatReply) GetV() string {
125         if m != nil {
126                 return m.V
127         }
128         return ""
129 }
130
131 func (m *ConcatReply) GetErr() string {
132         if m != nil {
133                 return m.Err
134         }
135         return ""
136 }
137
138 func init() {
139         proto.RegisterType((*SumRequest)(nil), "pb.SumRequest")
140         proto.RegisterType((*SumReply)(nil), "pb.SumReply")
141         proto.RegisterType((*ConcatRequest)(nil), "pb.ConcatRequest")
142         proto.RegisterType((*ConcatReply)(nil), "pb.ConcatReply")
143 }
144
145 // Reference imports to suppress errors if they are not otherwise used.
146 var _ context.Context
147 var _ grpc.ClientConn
148
149 // This is a compile-time assertion to ensure that this generated file
150 // is compatible with the grpc package it is being compiled against.
151 const _ = grpc.SupportPackageIsVersion4
152
153 // Client API for Add service
154
155 type AddClient interface {
156         // Sums two integers.
157         Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumReply, error)
158         // Concatenates two strings
159         Concat(ctx context.Context, in *ConcatRequest, opts ...grpc.CallOption) (*ConcatReply, error)
160 }
161
162 type addClient struct {
163         cc *grpc.ClientConn
164 }
165
166 func NewAddClient(cc *grpc.ClientConn) AddClient {
167         return &addClient{cc}
168 }
169
170 func (c *addClient) Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumReply, error) {
171         out := new(SumReply)
172         err := grpc.Invoke(ctx, "/pb.Add/Sum", in, out, c.cc, opts...)
173         if err != nil {
174                 return nil, err
175         }
176         return out, nil
177 }
178
179 func (c *addClient) Concat(ctx context.Context, in *ConcatRequest, opts ...grpc.CallOption) (*ConcatReply, error) {
180         out := new(ConcatReply)
181         err := grpc.Invoke(ctx, "/pb.Add/Concat", in, out, c.cc, opts...)
182         if err != nil {
183                 return nil, err
184         }
185         return out, nil
186 }
187
188 // Server API for Add service
189
190 type AddServer interface {
191         // Sums two integers.
192         Sum(context.Context, *SumRequest) (*SumReply, error)
193         // Concatenates two strings
194         Concat(context.Context, *ConcatRequest) (*ConcatReply, error)
195 }
196
197 func RegisterAddServer(s *grpc.Server, srv AddServer) {
198         s.RegisterService(&_Add_serviceDesc, srv)
199 }
200
201 func _Add_Sum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
202         in := new(SumRequest)
203         if err := dec(in); err != nil {
204                 return nil, err
205         }
206         if interceptor == nil {
207                 return srv.(AddServer).Sum(ctx, in)
208         }
209         info := &grpc.UnaryServerInfo{
210                 Server:     srv,
211                 FullMethod: "/pb.Add/Sum",
212         }
213         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
214                 return srv.(AddServer).Sum(ctx, req.(*SumRequest))
215         }
216         return interceptor(ctx, in, info, handler)
217 }
218
219 func _Add_Concat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
220         in := new(ConcatRequest)
221         if err := dec(in); err != nil {
222                 return nil, err
223         }
224         if interceptor == nil {
225                 return srv.(AddServer).Concat(ctx, in)
226         }
227         info := &grpc.UnaryServerInfo{
228                 Server:     srv,
229                 FullMethod: "/pb.Add/Concat",
230         }
231         handler := func(ctx context.Context, req interface{}) (interface{}, error) {
232                 return srv.(AddServer).Concat(ctx, req.(*ConcatRequest))
233         }
234         return interceptor(ctx, in, info, handler)
235 }
236
237 var _Add_serviceDesc = grpc.ServiceDesc{
238         ServiceName: "pb.Add",
239         HandlerType: (*AddServer)(nil),
240         Methods: []grpc.MethodDesc{
241                 {
242                         MethodName: "Sum",
243                         Handler:    _Add_Sum_Handler,
244                 },
245                 {
246                         MethodName: "Concat",
247                         Handler:    _Add_Concat_Handler,
248                 },
249         },
250         Streams:  []grpc.StreamDesc{},
251         Metadata: "addsvc.proto",
252 }
253
254 func init() { proto.RegisterFile("addsvc.proto", fileDescriptor0) }
255
256 var fileDescriptor0 = []byte{
257         // 189 bytes of a gzipped FileDescriptorProto
258         0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x4c, 0x49, 0x29,
259         0x2e, 0x4b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x52, 0xd2, 0xe0, 0xe2,
260         0x0a, 0x2e, 0xcd, 0x0d, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0xe2, 0xe1, 0x62, 0x4c, 0x94,
261         0x60, 0x54, 0x60, 0xd4, 0x60, 0x0e, 0x62, 0x4c, 0x04, 0xf1, 0x92, 0x24, 0x98, 0x20, 0xbc, 0x24,
262         0x25, 0x2d, 0x2e, 0x0e, 0xb0, 0xca, 0x82, 0x9c, 0x4a, 0x90, 0x4c, 0x19, 0x4c, 0x5d, 0x99, 0x90,
263         0x00, 0x17, 0x73, 0x6a, 0x51, 0x11, 0x58, 0x25, 0x67, 0x10, 0x88, 0xa9, 0xa4, 0xcd, 0xc5, 0xeb,
264         0x9c, 0x9f, 0x97, 0x9c, 0x58, 0x82, 0x61, 0x30, 0x27, 0x8a, 0xc1, 0x9c, 0x20, 0x83, 0x75, 0xb9,
265         0xb8, 0x61, 0x8a, 0x51, 0xcc, 0xe6, 0xc4, 0x6a, 0xb6, 0x51, 0x0c, 0x17, 0xb3, 0x63, 0x4a, 0x8a,
266         0x90, 0x2a, 0x17, 0x73, 0x70, 0x69, 0xae, 0x10, 0x9f, 0x5e, 0x41, 0x92, 0x1e, 0xc2, 0x07, 0x52,
267         0x3c, 0x70, 0x7e, 0x41, 0x4e, 0xa5, 0x12, 0x83, 0x90, 0x1e, 0x17, 0x1b, 0xc4, 0x70, 0x21, 0x41,
268         0x90, 0x0c, 0x8a, 0xab, 0xa4, 0xf8, 0x91, 0x85, 0xc0, 0xea, 0x93, 0xd8, 0xc0, 0x41, 0x63, 0x0c,
269         0x08, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x37, 0x81, 0x99, 0x2a, 0x01, 0x00, 0x00,
270 }