Codebase list golang-github-go-kit-kit / d056e6d
Update apache/thrift dependency to fix CVE-2020-13949 (#1098) * Update apache/thrift dependency to fix CVE-2020-13949 * Re-generate examples/addsvc thrift code Enrico authored 2 years ago GitHub committed 2 years ago
6 changed file(s) with 952 addition(s) and 778 deletion(s). Raw diff Collapse all Expand all
0 // Autogenerated by Thrift Compiler (1.0.0-dev)
1 // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
0 // Code generated by Thrift Compiler (0.14.1). DO NOT EDIT.
21
32 package addsvc
43
5 var GoUnusedProtection__ int;
6
4 var GoUnusedProtection__ int
0 // Autogenerated by Thrift Compiler (1.0.0-dev)
1 // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
0 // Code generated by Thrift Compiler (0.14.1). DO NOT EDIT.
21
32 package main
43
1514 "strconv"
1615 "strings"
1716 )
17
18 var _ = addsvc.GoUnusedProtection__
1819
1920 func Usage() {
2021 fmt.Fprintln(os.Stderr, "Usage of ", os.Args[0], " [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]:")
7374 flag.Usage()
7475 }
7576 host = parsedUrl.Host
76 useHttp = parsedUrl.Scheme == "" || parsedUrl.Scheme == "http" || parsedUrl.Scheme == "https"
77 useHttp = len(parsedUrl.Scheme) <= 0 || parsedUrl.Scheme == "http" || parsedUrl.Scheme == "https"
7778 } else if useHttp {
7879 _, err := url.Parse(fmt.Sprint("http://", host, ":", port))
7980 if err != nil {
148149 fmt.Fprintln(os.Stderr, "Sum requires 2 args")
149150 flag.Usage()
150151 }
151 argvalue0, err6 := (strconv.ParseInt(flag.Arg(1), 10, 64))
152 if err6 != nil {
152 argvalue0, err8 := (strconv.ParseInt(flag.Arg(1), 10, 64))
153 if err8 != nil {
153154 Usage()
154155 return
155156 }
156157 value0 := argvalue0
157 argvalue1, err7 := (strconv.ParseInt(flag.Arg(2), 10, 64))
158 if err7 != nil {
158 argvalue1, err9 := (strconv.ParseInt(flag.Arg(2), 10, 64))
159 if err9 != nil {
159160 Usage()
160161 return
161162 }
0 // Autogenerated by Thrift Compiler (1.0.0-dev)
1 // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
0 // Code generated by Thrift Compiler (0.14.1). DO NOT EDIT.
21
32 package addsvc
43
54 import (
65 "bytes"
76 "context"
8 "reflect"
97 "fmt"
108 "github.com/apache/thrift/lib/go/thrift"
9 "time"
1110 )
1211
1312 // (needed to ensure safety because of naive import list construction.)
1413 var _ = thrift.ZERO
1514 var _ = fmt.Printf
1615 var _ = context.Background
17 var _ = reflect.DeepEqual
16 var _ = time.Now
1817 var _ = bytes.Equal
19
2018
2119 func init() {
2220 }
23
0 // Autogenerated by Thrift Compiler (1.0.0-dev)
1 // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
0 // Code generated by Thrift Compiler (0.14.1). DO NOT EDIT.
21
32 package addsvc
43
54 import (
65 "bytes"
76 "context"
8 "reflect"
97 "fmt"
108 "github.com/apache/thrift/lib/go/thrift"
9 "time"
1110 )
1211
1312 // (needed to ensure safety because of naive import list construction.)
1413 var _ = thrift.ZERO
1514 var _ = fmt.Printf
1615 var _ = context.Background
17 var _ = reflect.DeepEqual
16 var _ = time.Now
1817 var _ = bytes.Equal
1918
2019 // Attributes:
2120 // - Value
2221 // - Err
2322 type SumReply struct {
24 Value int64 `thrift:"value,1" db:"value" json:"value"`
25 Err string `thrift:"err,2" db:"err" json:"err"`
23 Value int64 `thrift:"value,1" db:"value" json:"value"`
24 Err string `thrift:"err,2" db:"err" json:"err"`
2625 }
2726
2827 func NewSumReply() *SumReply {
29 return &SumReply{}
30 }
31
28 return &SumReply{}
29 }
3230
3331 func (p *SumReply) GetValue() int64 {
34 return p.Value
32 return p.Value
3533 }
3634
3735 func (p *SumReply) GetErr() string {
38 return p.Err
39 }
40 func (p *SumReply) Read(iprot thrift.TProtocol) error {
41 if _, err := iprot.ReadStructBegin(); err != nil {
42 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
43 }
44
45
46 for {
47 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
48 if err != nil {
49 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
50 }
51 if fieldTypeId == thrift.STOP { break; }
52 switch fieldId {
53 case 1:
54 if fieldTypeId == thrift.I64 {
55 if err := p.ReadField1(iprot); err != nil {
56 return err
57 }
58 } else {
59 if err := iprot.Skip(fieldTypeId); err != nil {
60 return err
61 }
62 }
63 case 2:
64 if fieldTypeId == thrift.STRING {
65 if err := p.ReadField2(iprot); err != nil {
66 return err
67 }
68 } else {
69 if err := iprot.Skip(fieldTypeId); err != nil {
70 return err
71 }
72 }
73 default:
74 if err := iprot.Skip(fieldTypeId); err != nil {
75 return err
76 }
77 }
78 if err := iprot.ReadFieldEnd(); err != nil {
79 return err
80 }
81 }
82 if err := iprot.ReadStructEnd(); err != nil {
83 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
84 }
85 return nil
86 }
87
88 func (p *SumReply) ReadField1(iprot thrift.TProtocol) error {
89 if v, err := iprot.ReadI64(); err != nil {
90 return thrift.PrependError("error reading field 1: ", err)
91 } else {
92 p.Value = v
93 }
94 return nil
95 }
96
97 func (p *SumReply) ReadField2(iprot thrift.TProtocol) error {
98 if v, err := iprot.ReadString(); err != nil {
99 return thrift.PrependError("error reading field 2: ", err)
100 } else {
101 p.Err = v
102 }
103 return nil
104 }
105
106 func (p *SumReply) Write(oprot thrift.TProtocol) error {
107 if err := oprot.WriteStructBegin("SumReply"); err != nil {
108 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
109 if p != nil {
110 if err := p.writeField1(oprot); err != nil { return err }
111 if err := p.writeField2(oprot); err != nil { return err }
112 }
113 if err := oprot.WriteFieldStop(); err != nil {
114 return thrift.PrependError("write field stop error: ", err) }
115 if err := oprot.WriteStructEnd(); err != nil {
116 return thrift.PrependError("write struct stop error: ", err) }
117 return nil
118 }
119
120 func (p *SumReply) writeField1(oprot thrift.TProtocol) (err error) {
121 if err := oprot.WriteFieldBegin("value", thrift.I64, 1); err != nil {
122 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err) }
123 if err := oprot.WriteI64(int64(p.Value)); err != nil {
124 return thrift.PrependError(fmt.Sprintf("%T.value (1) field write error: ", p), err) }
125 if err := oprot.WriteFieldEnd(); err != nil {
126 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err) }
127 return err
128 }
129
130 func (p *SumReply) writeField2(oprot thrift.TProtocol) (err error) {
131 if err := oprot.WriteFieldBegin("err", thrift.STRING, 2); err != nil {
132 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:err: ", p), err) }
133 if err := oprot.WriteString(string(p.Err)); err != nil {
134 return thrift.PrependError(fmt.Sprintf("%T.err (2) field write error: ", p), err) }
135 if err := oprot.WriteFieldEnd(); err != nil {
136 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:err: ", p), err) }
137 return err
36 return p.Err
37 }
38 func (p *SumReply) Read(ctx context.Context, iprot thrift.TProtocol) error {
39 if _, err := iprot.ReadStructBegin(ctx); err != nil {
40 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
41 }
42
43 for {
44 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
45 if err != nil {
46 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
47 }
48 if fieldTypeId == thrift.STOP {
49 break
50 }
51 switch fieldId {
52 case 1:
53 if fieldTypeId == thrift.I64 {
54 if err := p.ReadField1(ctx, iprot); err != nil {
55 return err
56 }
57 } else {
58 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
59 return err
60 }
61 }
62 case 2:
63 if fieldTypeId == thrift.STRING {
64 if err := p.ReadField2(ctx, iprot); err != nil {
65 return err
66 }
67 } else {
68 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
69 return err
70 }
71 }
72 default:
73 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
74 return err
75 }
76 }
77 if err := iprot.ReadFieldEnd(ctx); err != nil {
78 return err
79 }
80 }
81 if err := iprot.ReadStructEnd(ctx); err != nil {
82 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
83 }
84 return nil
85 }
86
87 func (p *SumReply) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
88 if v, err := iprot.ReadI64(ctx); err != nil {
89 return thrift.PrependError("error reading field 1: ", err)
90 } else {
91 p.Value = v
92 }
93 return nil
94 }
95
96 func (p *SumReply) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
97 if v, err := iprot.ReadString(ctx); err != nil {
98 return thrift.PrependError("error reading field 2: ", err)
99 } else {
100 p.Err = v
101 }
102 return nil
103 }
104
105 func (p *SumReply) Write(ctx context.Context, oprot thrift.TProtocol) error {
106 if err := oprot.WriteStructBegin(ctx, "SumReply"); err != nil {
107 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
108 }
109 if p != nil {
110 if err := p.writeField1(ctx, oprot); err != nil {
111 return err
112 }
113 if err := p.writeField2(ctx, oprot); err != nil {
114 return err
115 }
116 }
117 if err := oprot.WriteFieldStop(ctx); err != nil {
118 return thrift.PrependError("write field stop error: ", err)
119 }
120 if err := oprot.WriteStructEnd(ctx); err != nil {
121 return thrift.PrependError("write struct stop error: ", err)
122 }
123 return nil
124 }
125
126 func (p *SumReply) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
127 if err := oprot.WriteFieldBegin(ctx, "value", thrift.I64, 1); err != nil {
128 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err)
129 }
130 if err := oprot.WriteI64(ctx, int64(p.Value)); err != nil {
131 return thrift.PrependError(fmt.Sprintf("%T.value (1) field write error: ", p), err)
132 }
133 if err := oprot.WriteFieldEnd(ctx); err != nil {
134 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err)
135 }
136 return err
137 }
138
139 func (p *SumReply) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
140 if err := oprot.WriteFieldBegin(ctx, "err", thrift.STRING, 2); err != nil {
141 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:err: ", p), err)
142 }
143 if err := oprot.WriteString(ctx, string(p.Err)); err != nil {
144 return thrift.PrependError(fmt.Sprintf("%T.err (2) field write error: ", p), err)
145 }
146 if err := oprot.WriteFieldEnd(ctx); err != nil {
147 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:err: ", p), err)
148 }
149 return err
150 }
151
152 func (p *SumReply) Equals(other *SumReply) bool {
153 if p == other {
154 return true
155 } else if p == nil || other == nil {
156 return false
157 }
158 if p.Value != other.Value {
159 return false
160 }
161 if p.Err != other.Err {
162 return false
163 }
164 return true
138165 }
139166
140167 func (p *SumReply) String() string {
141 if p == nil {
142 return "<nil>"
143 }
144 return fmt.Sprintf("SumReply(%+v)", *p)
168 if p == nil {
169 return "<nil>"
170 }
171 return fmt.Sprintf("SumReply(%+v)", *p)
145172 }
146173
147174 // Attributes:
148175 // - Value
149176 // - Err
150177 type ConcatReply struct {
151 Value string `thrift:"value,1" db:"value" json:"value"`
152 Err string `thrift:"err,2" db:"err" json:"err"`
178 Value string `thrift:"value,1" db:"value" json:"value"`
179 Err string `thrift:"err,2" db:"err" json:"err"`
153180 }
154181
155182 func NewConcatReply() *ConcatReply {
156 return &ConcatReply{}
157 }
158
183 return &ConcatReply{}
184 }
159185
160186 func (p *ConcatReply) GetValue() string {
161 return p.Value
187 return p.Value
162188 }
163189
164190 func (p *ConcatReply) GetErr() string {
165 return p.Err
166 }
167 func (p *ConcatReply) Read(iprot thrift.TProtocol) error {
168 if _, err := iprot.ReadStructBegin(); err != nil {
169 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
170 }
171
172
173 for {
174 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
175 if err != nil {
176 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
177 }
178 if fieldTypeId == thrift.STOP { break; }
179 switch fieldId {
180 case 1:
181 if fieldTypeId == thrift.STRING {
182 if err := p.ReadField1(iprot); err != nil {
183 return err
184 }
185 } else {
186 if err := iprot.Skip(fieldTypeId); err != nil {
187 return err
188 }
189 }
190 case 2:
191 if fieldTypeId == thrift.STRING {
192 if err := p.ReadField2(iprot); err != nil {
193 return err
194 }
195 } else {
196 if err := iprot.Skip(fieldTypeId); err != nil {
197 return err
198 }
199 }
200 default:
201 if err := iprot.Skip(fieldTypeId); err != nil {
202 return err
203 }
204 }
205 if err := iprot.ReadFieldEnd(); err != nil {
206 return err
207 }
208 }
209 if err := iprot.ReadStructEnd(); err != nil {
210 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
211 }
212 return nil
213 }
214
215 func (p *ConcatReply) ReadField1(iprot thrift.TProtocol) error {
216 if v, err := iprot.ReadString(); err != nil {
217 return thrift.PrependError("error reading field 1: ", err)
218 } else {
219 p.Value = v
220 }
221 return nil
222 }
223
224 func (p *ConcatReply) ReadField2(iprot thrift.TProtocol) error {
225 if v, err := iprot.ReadString(); err != nil {
226 return thrift.PrependError("error reading field 2: ", err)
227 } else {
228 p.Err = v
229 }
230 return nil
231 }
232
233 func (p *ConcatReply) Write(oprot thrift.TProtocol) error {
234 if err := oprot.WriteStructBegin("ConcatReply"); err != nil {
235 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
236 if p != nil {
237 if err := p.writeField1(oprot); err != nil { return err }
238 if err := p.writeField2(oprot); err != nil { return err }
239 }
240 if err := oprot.WriteFieldStop(); err != nil {
241 return thrift.PrependError("write field stop error: ", err) }
242 if err := oprot.WriteStructEnd(); err != nil {
243 return thrift.PrependError("write struct stop error: ", err) }
244 return nil
245 }
246
247 func (p *ConcatReply) writeField1(oprot thrift.TProtocol) (err error) {
248 if err := oprot.WriteFieldBegin("value", thrift.STRING, 1); err != nil {
249 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err) }
250 if err := oprot.WriteString(string(p.Value)); err != nil {
251 return thrift.PrependError(fmt.Sprintf("%T.value (1) field write error: ", p), err) }
252 if err := oprot.WriteFieldEnd(); err != nil {
253 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err) }
254 return err
255 }
256
257 func (p *ConcatReply) writeField2(oprot thrift.TProtocol) (err error) {
258 if err := oprot.WriteFieldBegin("err", thrift.STRING, 2); err != nil {
259 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:err: ", p), err) }
260 if err := oprot.WriteString(string(p.Err)); err != nil {
261 return thrift.PrependError(fmt.Sprintf("%T.err (2) field write error: ", p), err) }
262 if err := oprot.WriteFieldEnd(); err != nil {
263 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:err: ", p), err) }
264 return err
191 return p.Err
192 }
193 func (p *ConcatReply) Read(ctx context.Context, iprot thrift.TProtocol) error {
194 if _, err := iprot.ReadStructBegin(ctx); err != nil {
195 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
196 }
197
198 for {
199 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
200 if err != nil {
201 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
202 }
203 if fieldTypeId == thrift.STOP {
204 break
205 }
206 switch fieldId {
207 case 1:
208 if fieldTypeId == thrift.STRING {
209 if err := p.ReadField1(ctx, iprot); err != nil {
210 return err
211 }
212 } else {
213 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
214 return err
215 }
216 }
217 case 2:
218 if fieldTypeId == thrift.STRING {
219 if err := p.ReadField2(ctx, iprot); err != nil {
220 return err
221 }
222 } else {
223 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
224 return err
225 }
226 }
227 default:
228 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
229 return err
230 }
231 }
232 if err := iprot.ReadFieldEnd(ctx); err != nil {
233 return err
234 }
235 }
236 if err := iprot.ReadStructEnd(ctx); err != nil {
237 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
238 }
239 return nil
240 }
241
242 func (p *ConcatReply) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
243 if v, err := iprot.ReadString(ctx); err != nil {
244 return thrift.PrependError("error reading field 1: ", err)
245 } else {
246 p.Value = v
247 }
248 return nil
249 }
250
251 func (p *ConcatReply) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
252 if v, err := iprot.ReadString(ctx); err != nil {
253 return thrift.PrependError("error reading field 2: ", err)
254 } else {
255 p.Err = v
256 }
257 return nil
258 }
259
260 func (p *ConcatReply) Write(ctx context.Context, oprot thrift.TProtocol) error {
261 if err := oprot.WriteStructBegin(ctx, "ConcatReply"); err != nil {
262 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
263 }
264 if p != nil {
265 if err := p.writeField1(ctx, oprot); err != nil {
266 return err
267 }
268 if err := p.writeField2(ctx, oprot); err != nil {
269 return err
270 }
271 }
272 if err := oprot.WriteFieldStop(ctx); err != nil {
273 return thrift.PrependError("write field stop error: ", err)
274 }
275 if err := oprot.WriteStructEnd(ctx); err != nil {
276 return thrift.PrependError("write struct stop error: ", err)
277 }
278 return nil
279 }
280
281 func (p *ConcatReply) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
282 if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 1); err != nil {
283 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err)
284 }
285 if err := oprot.WriteString(ctx, string(p.Value)); err != nil {
286 return thrift.PrependError(fmt.Sprintf("%T.value (1) field write error: ", p), err)
287 }
288 if err := oprot.WriteFieldEnd(ctx); err != nil {
289 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err)
290 }
291 return err
292 }
293
294 func (p *ConcatReply) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
295 if err := oprot.WriteFieldBegin(ctx, "err", thrift.STRING, 2); err != nil {
296 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:err: ", p), err)
297 }
298 if err := oprot.WriteString(ctx, string(p.Err)); err != nil {
299 return thrift.PrependError(fmt.Sprintf("%T.err (2) field write error: ", p), err)
300 }
301 if err := oprot.WriteFieldEnd(ctx); err != nil {
302 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:err: ", p), err)
303 }
304 return err
305 }
306
307 func (p *ConcatReply) Equals(other *ConcatReply) bool {
308 if p == other {
309 return true
310 } else if p == nil || other == nil {
311 return false
312 }
313 if p.Value != other.Value {
314 return false
315 }
316 if p.Err != other.Err {
317 return false
318 }
319 return true
265320 }
266321
267322 func (p *ConcatReply) String() string {
268 if p == nil {
269 return "<nil>"
270 }
271 return fmt.Sprintf("ConcatReply(%+v)", *p)
323 if p == nil {
324 return "<nil>"
325 }
326 return fmt.Sprintf("ConcatReply(%+v)", *p)
272327 }
273328
274329 type AddService interface {
275 // Parameters:
276 // - A
277 // - B
278 Sum(ctx context.Context, a int64, b int64) (r *SumReply, err error)
279 // Parameters:
280 // - A
281 // - B
282 Concat(ctx context.Context, a string, b string) (r *ConcatReply, err error)
330 // Parameters:
331 // - A
332 // - B
333 Sum(ctx context.Context, a int64, b int64) (_r *SumReply, _err error)
334 // Parameters:
335 // - A
336 // - B
337 Concat(ctx context.Context, a string, b string) (_r *ConcatReply, _err error)
283338 }
284339
285340 type AddServiceClient struct {
286 c thrift.TClient
341 c thrift.TClient
342 meta thrift.ResponseMeta
287343 }
288344
289345 func NewAddServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *AddServiceClient {
290 return &AddServiceClient{
291 c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)),
292 }
346 return &AddServiceClient{
347 c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)),
348 }
293349 }
294350
295351 func NewAddServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *AddServiceClient {
296 return &AddServiceClient{
297 c: thrift.NewTStandardClient(iprot, oprot),
298 }
352 return &AddServiceClient{
353 c: thrift.NewTStandardClient(iprot, oprot),
354 }
299355 }
300356
301357 func NewAddServiceClient(c thrift.TClient) *AddServiceClient {
302 return &AddServiceClient{
303 c: c,
304 }
358 return &AddServiceClient{
359 c: c,
360 }
305361 }
306362
307363 func (p *AddServiceClient) Client_() thrift.TClient {
308 return p.c
309 }
364 return p.c
365 }
366
367 func (p *AddServiceClient) LastResponseMeta_() thrift.ResponseMeta {
368 return p.meta
369 }
370
371 func (p *AddServiceClient) SetLastResponseMeta_(meta thrift.ResponseMeta) {
372 p.meta = meta
373 }
374
310375 // Parameters:
311376 // - A
312377 // - B
313 func (p *AddServiceClient) Sum(ctx context.Context, a int64, b int64) (r *SumReply, err error) {
314 var _args0 AddServiceSumArgs
315 _args0.A = a
316 _args0.B = b
317 var _result1 AddServiceSumResult
318 if err = p.Client_().Call(ctx, "Sum", &_args0, &_result1); err != nil {
319 return
320 }
321 return _result1.GetSuccess(), nil
378 func (p *AddServiceClient) Sum(ctx context.Context, a int64, b int64) (_r *SumReply, _err error) {
379 var _args0 AddServiceSumArgs
380 _args0.A = a
381 _args0.B = b
382 var _result2 AddServiceSumResult
383 var _meta1 thrift.ResponseMeta
384 _meta1, _err = p.Client_().Call(ctx, "Sum", &_args0, &_result2)
385 p.SetLastResponseMeta_(_meta1)
386 if _err != nil {
387 return
388 }
389 return _result2.GetSuccess(), nil
322390 }
323391
324392 // Parameters:
325393 // - A
326394 // - B
327 func (p *AddServiceClient) Concat(ctx context.Context, a string, b string) (r *ConcatReply, err error) {
328 var _args2 AddServiceConcatArgs
329 _args2.A = a
330 _args2.B = b
331 var _result3 AddServiceConcatResult
332 if err = p.Client_().Call(ctx, "Concat", &_args2, &_result3); err != nil {
333 return
334 }
335 return _result3.GetSuccess(), nil
395 func (p *AddServiceClient) Concat(ctx context.Context, a string, b string) (_r *ConcatReply, _err error) {
396 var _args3 AddServiceConcatArgs
397 _args3.A = a
398 _args3.B = b
399 var _result5 AddServiceConcatResult
400 var _meta4 thrift.ResponseMeta
401 _meta4, _err = p.Client_().Call(ctx, "Concat", &_args3, &_result5)
402 p.SetLastResponseMeta_(_meta4)
403 if _err != nil {
404 return
405 }
406 return _result5.GetSuccess(), nil
336407 }
337408
338409 type AddServiceProcessor struct {
339 processorMap map[string]thrift.TProcessorFunction
340 handler AddService
410 processorMap map[string]thrift.TProcessorFunction
411 handler AddService
341412 }
342413
343414 func (p *AddServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) {
344 p.processorMap[key] = processor
415 p.processorMap[key] = processor
345416 }
346417
347418 func (p *AddServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) {
348 processor, ok = p.processorMap[key]
349 return processor, ok
419 processor, ok = p.processorMap[key]
420 return processor, ok
350421 }
351422
352423 func (p *AddServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction {
353 return p.processorMap
424 return p.processorMap
354425 }
355426
356427 func NewAddServiceProcessor(handler AddService) *AddServiceProcessor {
357428
358 self4 := &AddServiceProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)}
359 self4.processorMap["Sum"] = &addServiceProcessorSum{handler:handler}
360 self4.processorMap["Concat"] = &addServiceProcessorConcat{handler:handler}
361 return self4
429 self6 := &AddServiceProcessor{handler: handler, processorMap: make(map[string]thrift.TProcessorFunction)}
430 self6.processorMap["Sum"] = &addServiceProcessorSum{handler: handler}
431 self6.processorMap["Concat"] = &addServiceProcessorConcat{handler: handler}
432 return self6
362433 }
363434
364435 func (p *AddServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
365 name, _, seqId, err := iprot.ReadMessageBegin()
366 if err != nil { return false, err }
367 if processor, ok := p.GetProcessorFunction(name); ok {
368 return processor.Process(ctx, seqId, iprot, oprot)
369 }
370 iprot.Skip(thrift.STRUCT)
371 iprot.ReadMessageEnd()
372 x5 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name)
373 oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId)
374 x5.Write(oprot)
375 oprot.WriteMessageEnd()
376 oprot.Flush(ctx)
377 return false, x5
436 name, _, seqId, err2 := iprot.ReadMessageBegin(ctx)
437 if err2 != nil {
438 return false, thrift.WrapTException(err2)
439 }
440 if processor, ok := p.GetProcessorFunction(name); ok {
441 return processor.Process(ctx, seqId, iprot, oprot)
442 }
443 iprot.Skip(ctx, thrift.STRUCT)
444 iprot.ReadMessageEnd(ctx)
445 x7 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function "+name)
446 oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId)
447 x7.Write(ctx, oprot)
448 oprot.WriteMessageEnd(ctx)
449 oprot.Flush(ctx)
450 return false, x7
378451
379452 }
380453
381454 type addServiceProcessorSum struct {
382 handler AddService
455 handler AddService
383456 }
384457
385458 func (p *addServiceProcessorSum) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
386 args := AddServiceSumArgs{}
387 if err = args.Read(iprot); err != nil {
388 iprot.ReadMessageEnd()
389 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
390 oprot.WriteMessageBegin("Sum", thrift.EXCEPTION, seqId)
391 x.Write(oprot)
392 oprot.WriteMessageEnd()
393 oprot.Flush(ctx)
394 return false, err
395 }
396
397 iprot.ReadMessageEnd()
398 result := AddServiceSumResult{}
399 var retval *SumReply
400 var err2 error
401 if retval, err2 = p.handler.Sum(ctx, args.A, args.B); err2 != nil {
402 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing Sum: " + err2.Error())
403 oprot.WriteMessageBegin("Sum", thrift.EXCEPTION, seqId)
404 x.Write(oprot)
405 oprot.WriteMessageEnd()
406 oprot.Flush(ctx)
407 return true, err2
408 } else {
409 result.Success = retval
410 }
411 if err2 = oprot.WriteMessageBegin("Sum", thrift.REPLY, seqId); err2 != nil {
412 err = err2
413 }
414 if err2 = result.Write(oprot); err == nil && err2 != nil {
415 err = err2
416 }
417 if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
418 err = err2
419 }
420 if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
421 err = err2
422 }
423 if err != nil {
424 return
425 }
426 return true, err
459 args := AddServiceSumArgs{}
460 var err2 error
461 if err2 = args.Read(ctx, iprot); err2 != nil {
462 iprot.ReadMessageEnd(ctx)
463 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error())
464 oprot.WriteMessageBegin(ctx, "Sum", thrift.EXCEPTION, seqId)
465 x.Write(ctx, oprot)
466 oprot.WriteMessageEnd(ctx)
467 oprot.Flush(ctx)
468 return false, thrift.WrapTException(err2)
469 }
470 iprot.ReadMessageEnd(ctx)
471
472 tickerCancel := func() {}
473 // Start a goroutine to do server side connectivity check.
474 if thrift.ServerConnectivityCheckInterval > 0 {
475 var cancel context.CancelFunc
476 ctx, cancel = context.WithCancel(ctx)
477 defer cancel()
478 var tickerCtx context.Context
479 tickerCtx, tickerCancel = context.WithCancel(context.Background())
480 defer tickerCancel()
481 go func(ctx context.Context, cancel context.CancelFunc) {
482 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval)
483 defer ticker.Stop()
484 for {
485 select {
486 case <-ctx.Done():
487 return
488 case <-ticker.C:
489 if !iprot.Transport().IsOpen() {
490 cancel()
491 return
492 }
493 }
494 }
495 }(tickerCtx, cancel)
496 }
497
498 result := AddServiceSumResult{}
499 var retval *SumReply
500 if retval, err2 = p.handler.Sum(ctx, args.A, args.B); err2 != nil {
501 tickerCancel()
502 if err2 == thrift.ErrAbandonRequest {
503 return false, thrift.WrapTException(err2)
504 }
505 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing Sum: "+err2.Error())
506 oprot.WriteMessageBegin(ctx, "Sum", thrift.EXCEPTION, seqId)
507 x.Write(ctx, oprot)
508 oprot.WriteMessageEnd(ctx)
509 oprot.Flush(ctx)
510 return true, thrift.WrapTException(err2)
511 } else {
512 result.Success = retval
513 }
514 tickerCancel()
515 if err2 = oprot.WriteMessageBegin(ctx, "Sum", thrift.REPLY, seqId); err2 != nil {
516 err = thrift.WrapTException(err2)
517 }
518 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil {
519 err = thrift.WrapTException(err2)
520 }
521 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil {
522 err = thrift.WrapTException(err2)
523 }
524 if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
525 err = thrift.WrapTException(err2)
526 }
527 if err != nil {
528 return
529 }
530 return true, err
427531 }
428532
429533 type addServiceProcessorConcat struct {
430 handler AddService
534 handler AddService
431535 }
432536
433537 func (p *addServiceProcessorConcat) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
434 args := AddServiceConcatArgs{}
435 if err = args.Read(iprot); err != nil {
436 iprot.ReadMessageEnd()
437 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
438 oprot.WriteMessageBegin("Concat", thrift.EXCEPTION, seqId)
439 x.Write(oprot)
440 oprot.WriteMessageEnd()
441 oprot.Flush(ctx)
442 return false, err
443 }
444
445 iprot.ReadMessageEnd()
446 result := AddServiceConcatResult{}
447 var retval *ConcatReply
448 var err2 error
449 if retval, err2 = p.handler.Concat(ctx, args.A, args.B); err2 != nil {
450 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing Concat: " + err2.Error())
451 oprot.WriteMessageBegin("Concat", thrift.EXCEPTION, seqId)
452 x.Write(oprot)
453 oprot.WriteMessageEnd()
454 oprot.Flush(ctx)
455 return true, err2
456 } else {
457 result.Success = retval
458 }
459 if err2 = oprot.WriteMessageBegin("Concat", thrift.REPLY, seqId); err2 != nil {
460 err = err2
461 }
462 if err2 = result.Write(oprot); err == nil && err2 != nil {
463 err = err2
464 }
465 if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
466 err = err2
467 }
468 if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
469 err = err2
470 }
471 if err != nil {
472 return
473 }
474 return true, err
475 }
476
538 args := AddServiceConcatArgs{}
539 var err2 error
540 if err2 = args.Read(ctx, iprot); err2 != nil {
541 iprot.ReadMessageEnd(ctx)
542 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error())
543 oprot.WriteMessageBegin(ctx, "Concat", thrift.EXCEPTION, seqId)
544 x.Write(ctx, oprot)
545 oprot.WriteMessageEnd(ctx)
546 oprot.Flush(ctx)
547 return false, thrift.WrapTException(err2)
548 }
549 iprot.ReadMessageEnd(ctx)
550
551 tickerCancel := func() {}
552 // Start a goroutine to do server side connectivity check.
553 if thrift.ServerConnectivityCheckInterval > 0 {
554 var cancel context.CancelFunc
555 ctx, cancel = context.WithCancel(ctx)
556 defer cancel()
557 var tickerCtx context.Context
558 tickerCtx, tickerCancel = context.WithCancel(context.Background())
559 defer tickerCancel()
560 go func(ctx context.Context, cancel context.CancelFunc) {
561 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval)
562 defer ticker.Stop()
563 for {
564 select {
565 case <-ctx.Done():
566 return
567 case <-ticker.C:
568 if !iprot.Transport().IsOpen() {
569 cancel()
570 return
571 }
572 }
573 }
574 }(tickerCtx, cancel)
575 }
576
577 result := AddServiceConcatResult{}
578 var retval *ConcatReply
579 if retval, err2 = p.handler.Concat(ctx, args.A, args.B); err2 != nil {
580 tickerCancel()
581 if err2 == thrift.ErrAbandonRequest {
582 return false, thrift.WrapTException(err2)
583 }
584 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing Concat: "+err2.Error())
585 oprot.WriteMessageBegin(ctx, "Concat", thrift.EXCEPTION, seqId)
586 x.Write(ctx, oprot)
587 oprot.WriteMessageEnd(ctx)
588 oprot.Flush(ctx)
589 return true, thrift.WrapTException(err2)
590 } else {
591 result.Success = retval
592 }
593 tickerCancel()
594 if err2 = oprot.WriteMessageBegin(ctx, "Concat", thrift.REPLY, seqId); err2 != nil {
595 err = thrift.WrapTException(err2)
596 }
597 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil {
598 err = thrift.WrapTException(err2)
599 }
600 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil {
601 err = thrift.WrapTException(err2)
602 }
603 if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
604 err = thrift.WrapTException(err2)
605 }
606 if err != nil {
607 return
608 }
609 return true, err
610 }
477611
478612 // HELPER FUNCTIONS AND STRUCTURES
479613
481615 // - A
482616 // - B
483617 type AddServiceSumArgs struct {
484 A int64 `thrift:"a,1" db:"a" json:"a"`
485 B int64 `thrift:"b,2" db:"b" json:"b"`
618 A int64 `thrift:"a,1" db:"a" json:"a"`
619 B int64 `thrift:"b,2" db:"b" json:"b"`
486620 }
487621
488622 func NewAddServiceSumArgs() *AddServiceSumArgs {
489 return &AddServiceSumArgs{}
490 }
491
623 return &AddServiceSumArgs{}
624 }
492625
493626 func (p *AddServiceSumArgs) GetA() int64 {
494 return p.A
627 return p.A
495628 }
496629
497630 func (p *AddServiceSumArgs) GetB() int64 {
498 return p.B
499 }
500 func (p *AddServiceSumArgs) Read(iprot thrift.TProtocol) error {
501 if _, err := iprot.ReadStructBegin(); err != nil {
502 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
503 }
504
505
506 for {
507 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
508 if err != nil {
509 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
510 }
511 if fieldTypeId == thrift.STOP { break; }
512 switch fieldId {
513 case 1:
514 if fieldTypeId == thrift.I64 {
515 if err := p.ReadField1(iprot); err != nil {
516 return err
517 }
518 } else {
519 if err := iprot.Skip(fieldTypeId); err != nil {
520 return err
521 }
522 }
523 case 2:
524 if fieldTypeId == thrift.I64 {
525 if err := p.ReadField2(iprot); err != nil {
526 return err
527 }
528 } else {
529 if err := iprot.Skip(fieldTypeId); err != nil {
530 return err
531 }
532 }
533 default:
534 if err := iprot.Skip(fieldTypeId); err != nil {
535 return err
536 }
537 }
538 if err := iprot.ReadFieldEnd(); err != nil {
539 return err
540 }
541 }
542 if err := iprot.ReadStructEnd(); err != nil {
543 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
544 }
545 return nil
546 }
547
548 func (p *AddServiceSumArgs) ReadField1(iprot thrift.TProtocol) error {
549 if v, err := iprot.ReadI64(); err != nil {
550 return thrift.PrependError("error reading field 1: ", err)
551 } else {
552 p.A = v
553 }
554 return nil
555 }
556
557 func (p *AddServiceSumArgs) ReadField2(iprot thrift.TProtocol) error {
558 if v, err := iprot.ReadI64(); err != nil {
559 return thrift.PrependError("error reading field 2: ", err)
560 } else {
561 p.B = v
562 }
563 return nil
564 }
565
566 func (p *AddServiceSumArgs) Write(oprot thrift.TProtocol) error {
567 if err := oprot.WriteStructBegin("Sum_args"); err != nil {
568 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
569 if p != nil {
570 if err := p.writeField1(oprot); err != nil { return err }
571 if err := p.writeField2(oprot); err != nil { return err }
572 }
573 if err := oprot.WriteFieldStop(); err != nil {
574 return thrift.PrependError("write field stop error: ", err) }
575 if err := oprot.WriteStructEnd(); err != nil {
576 return thrift.PrependError("write struct stop error: ", err) }
577 return nil
578 }
579
580 func (p *AddServiceSumArgs) writeField1(oprot thrift.TProtocol) (err error) {
581 if err := oprot.WriteFieldBegin("a", thrift.I64, 1); err != nil {
582 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:a: ", p), err) }
583 if err := oprot.WriteI64(int64(p.A)); err != nil {
584 return thrift.PrependError(fmt.Sprintf("%T.a (1) field write error: ", p), err) }
585 if err := oprot.WriteFieldEnd(); err != nil {
586 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:a: ", p), err) }
587 return err
588 }
589
590 func (p *AddServiceSumArgs) writeField2(oprot thrift.TProtocol) (err error) {
591 if err := oprot.WriteFieldBegin("b", thrift.I64, 2); err != nil {
592 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:b: ", p), err) }
593 if err := oprot.WriteI64(int64(p.B)); err != nil {
594 return thrift.PrependError(fmt.Sprintf("%T.b (2) field write error: ", p), err) }
595 if err := oprot.WriteFieldEnd(); err != nil {
596 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:b: ", p), err) }
597 return err
631 return p.B
632 }
633 func (p *AddServiceSumArgs) Read(ctx context.Context, iprot thrift.TProtocol) error {
634 if _, err := iprot.ReadStructBegin(ctx); err != nil {
635 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
636 }
637
638 for {
639 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
640 if err != nil {
641 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
642 }
643 if fieldTypeId == thrift.STOP {
644 break
645 }
646 switch fieldId {
647 case 1:
648 if fieldTypeId == thrift.I64 {
649 if err := p.ReadField1(ctx, iprot); err != nil {
650 return err
651 }
652 } else {
653 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
654 return err
655 }
656 }
657 case 2:
658 if fieldTypeId == thrift.I64 {
659 if err := p.ReadField2(ctx, iprot); err != nil {
660 return err
661 }
662 } else {
663 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
664 return err
665 }
666 }
667 default:
668 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
669 return err
670 }
671 }
672 if err := iprot.ReadFieldEnd(ctx); err != nil {
673 return err
674 }
675 }
676 if err := iprot.ReadStructEnd(ctx); err != nil {
677 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
678 }
679 return nil
680 }
681
682 func (p *AddServiceSumArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
683 if v, err := iprot.ReadI64(ctx); err != nil {
684 return thrift.PrependError("error reading field 1: ", err)
685 } else {
686 p.A = v
687 }
688 return nil
689 }
690
691 func (p *AddServiceSumArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
692 if v, err := iprot.ReadI64(ctx); err != nil {
693 return thrift.PrependError("error reading field 2: ", err)
694 } else {
695 p.B = v
696 }
697 return nil
698 }
699
700 func (p *AddServiceSumArgs) Write(ctx context.Context, oprot thrift.TProtocol) error {
701 if err := oprot.WriteStructBegin(ctx, "Sum_args"); err != nil {
702 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
703 }
704 if p != nil {
705 if err := p.writeField1(ctx, oprot); err != nil {
706 return err
707 }
708 if err := p.writeField2(ctx, oprot); err != nil {
709 return err
710 }
711 }
712 if err := oprot.WriteFieldStop(ctx); err != nil {
713 return thrift.PrependError("write field stop error: ", err)
714 }
715 if err := oprot.WriteStructEnd(ctx); err != nil {
716 return thrift.PrependError("write struct stop error: ", err)
717 }
718 return nil
719 }
720
721 func (p *AddServiceSumArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
722 if err := oprot.WriteFieldBegin(ctx, "a", thrift.I64, 1); err != nil {
723 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:a: ", p), err)
724 }
725 if err := oprot.WriteI64(ctx, int64(p.A)); err != nil {
726 return thrift.PrependError(fmt.Sprintf("%T.a (1) field write error: ", p), err)
727 }
728 if err := oprot.WriteFieldEnd(ctx); err != nil {
729 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:a: ", p), err)
730 }
731 return err
732 }
733
734 func (p *AddServiceSumArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
735 if err := oprot.WriteFieldBegin(ctx, "b", thrift.I64, 2); err != nil {
736 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:b: ", p), err)
737 }
738 if err := oprot.WriteI64(ctx, int64(p.B)); err != nil {
739 return thrift.PrependError(fmt.Sprintf("%T.b (2) field write error: ", p), err)
740 }
741 if err := oprot.WriteFieldEnd(ctx); err != nil {
742 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:b: ", p), err)
743 }
744 return err
598745 }
599746
600747 func (p *AddServiceSumArgs) String() string {
601 if p == nil {
602 return "<nil>"
603 }
604 return fmt.Sprintf("AddServiceSumArgs(%+v)", *p)
748 if p == nil {
749 return "<nil>"
750 }
751 return fmt.Sprintf("AddServiceSumArgs(%+v)", *p)
605752 }
606753
607754 // Attributes:
608755 // - Success
609756 type AddServiceSumResult struct {
610 Success *SumReply `thrift:"success,0" db:"success" json:"success,omitempty"`
757 Success *SumReply `thrift:"success,0" db:"success" json:"success,omitempty"`
611758 }
612759
613760 func NewAddServiceSumResult() *AddServiceSumResult {
614 return &AddServiceSumResult{}
761 return &AddServiceSumResult{}
615762 }
616763
617764 var AddServiceSumResult_Success_DEFAULT *SumReply
765
618766 func (p *AddServiceSumResult) GetSuccess() *SumReply {
619 if !p.IsSetSuccess() {
620 return AddServiceSumResult_Success_DEFAULT
621 }
622 return p.Success
767 if !p.IsSetSuccess() {
768 return AddServiceSumResult_Success_DEFAULT
769 }
770 return p.Success
623771 }
624772 func (p *AddServiceSumResult) IsSetSuccess() bool {
625 return p.Success != nil
626 }
627
628 func (p *AddServiceSumResult) Read(iprot thrift.TProtocol) error {
629 if _, err := iprot.ReadStructBegin(); err != nil {
630 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
631 }
632
633
634 for {
635 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
636 if err != nil {
637 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
638 }
639 if fieldTypeId == thrift.STOP { break; }
640 switch fieldId {
641 case 0:
642 if fieldTypeId == thrift.STRUCT {
643 if err := p.ReadField0(iprot); err != nil {
644 return err
645 }
646 } else {
647 if err := iprot.Skip(fieldTypeId); err != nil {
648 return err
649 }
650 }
651 default:
652 if err := iprot.Skip(fieldTypeId); err != nil {
653 return err
654 }
655 }
656 if err := iprot.ReadFieldEnd(); err != nil {
657 return err
658 }
659 }
660 if err := iprot.ReadStructEnd(); err != nil {
661 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
662 }
663 return nil
664 }
665
666 func (p *AddServiceSumResult) ReadField0(iprot thrift.TProtocol) error {
667 p.Success = &SumReply{}
668 if err := p.Success.Read(iprot); err != nil {
669 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
670 }
671 return nil
672 }
673
674 func (p *AddServiceSumResult) Write(oprot thrift.TProtocol) error {
675 if err := oprot.WriteStructBegin("Sum_result"); err != nil {
676 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
677 if p != nil {
678 if err := p.writeField0(oprot); err != nil { return err }
679 }
680 if err := oprot.WriteFieldStop(); err != nil {
681 return thrift.PrependError("write field stop error: ", err) }
682 if err := oprot.WriteStructEnd(); err != nil {
683 return thrift.PrependError("write struct stop error: ", err) }
684 return nil
685 }
686
687 func (p *AddServiceSumResult) writeField0(oprot thrift.TProtocol) (err error) {
688 if p.IsSetSuccess() {
689 if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
690 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
691 if err := p.Success.Write(oprot); err != nil {
692 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
693 }
694 if err := oprot.WriteFieldEnd(); err != nil {
695 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
696 }
697 return err
773 return p.Success != nil
774 }
775
776 func (p *AddServiceSumResult) Read(ctx context.Context, iprot thrift.TProtocol) error {
777 if _, err := iprot.ReadStructBegin(ctx); err != nil {
778 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
779 }
780
781 for {
782 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
783 if err != nil {
784 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
785 }
786 if fieldTypeId == thrift.STOP {
787 break
788 }
789 switch fieldId {
790 case 0:
791 if fieldTypeId == thrift.STRUCT {
792 if err := p.ReadField0(ctx, iprot); err != nil {
793 return err
794 }
795 } else {
796 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
797 return err
798 }
799 }
800 default:
801 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
802 return err
803 }
804 }
805 if err := iprot.ReadFieldEnd(ctx); err != nil {
806 return err
807 }
808 }
809 if err := iprot.ReadStructEnd(ctx); err != nil {
810 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
811 }
812 return nil
813 }
814
815 func (p *AddServiceSumResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error {
816 p.Success = &SumReply{}
817 if err := p.Success.Read(ctx, iprot); err != nil {
818 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
819 }
820 return nil
821 }
822
823 func (p *AddServiceSumResult) Write(ctx context.Context, oprot thrift.TProtocol) error {
824 if err := oprot.WriteStructBegin(ctx, "Sum_result"); err != nil {
825 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
826 }
827 if p != nil {
828 if err := p.writeField0(ctx, oprot); err != nil {
829 return err
830 }
831 }
832 if err := oprot.WriteFieldStop(ctx); err != nil {
833 return thrift.PrependError("write field stop error: ", err)
834 }
835 if err := oprot.WriteStructEnd(ctx); err != nil {
836 return thrift.PrependError("write struct stop error: ", err)
837 }
838 return nil
839 }
840
841 func (p *AddServiceSumResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) {
842 if p.IsSetSuccess() {
843 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil {
844 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
845 }
846 if err := p.Success.Write(ctx, oprot); err != nil {
847 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
848 }
849 if err := oprot.WriteFieldEnd(ctx); err != nil {
850 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
851 }
852 }
853 return err
698854 }
699855
700856 func (p *AddServiceSumResult) String() string {
701 if p == nil {
702 return "<nil>"
703 }
704 return fmt.Sprintf("AddServiceSumResult(%+v)", *p)
857 if p == nil {
858 return "<nil>"
859 }
860 return fmt.Sprintf("AddServiceSumResult(%+v)", *p)
705861 }
706862
707863 // Attributes:
708864 // - A
709865 // - B
710866 type AddServiceConcatArgs struct {
711 A string `thrift:"a,1" db:"a" json:"a"`
712 B string `thrift:"b,2" db:"b" json:"b"`
867 A string `thrift:"a,1" db:"a" json:"a"`
868 B string `thrift:"b,2" db:"b" json:"b"`
713869 }
714870
715871 func NewAddServiceConcatArgs() *AddServiceConcatArgs {
716 return &AddServiceConcatArgs{}
717 }
718
872 return &AddServiceConcatArgs{}
873 }
719874
720875 func (p *AddServiceConcatArgs) GetA() string {
721 return p.A
876 return p.A
722877 }
723878
724879 func (p *AddServiceConcatArgs) GetB() string {
725 return p.B
726 }
727 func (p *AddServiceConcatArgs) Read(iprot thrift.TProtocol) error {
728 if _, err := iprot.ReadStructBegin(); err != nil {
729 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
730 }
731
732
733 for {
734 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
735 if err != nil {
736 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
737 }
738 if fieldTypeId == thrift.STOP { break; }
739 switch fieldId {
740 case 1:
741 if fieldTypeId == thrift.STRING {
742 if err := p.ReadField1(iprot); err != nil {
743 return err
744 }
745 } else {
746 if err := iprot.Skip(fieldTypeId); err != nil {
747 return err
748 }
749 }
750 case 2:
751 if fieldTypeId == thrift.STRING {
752 if err := p.ReadField2(iprot); err != nil {
753 return err
754 }
755 } else {
756 if err := iprot.Skip(fieldTypeId); err != nil {
757 return err
758 }
759 }
760 default:
761 if err := iprot.Skip(fieldTypeId); err != nil {
762 return err
763 }
764 }
765 if err := iprot.ReadFieldEnd(); err != nil {
766 return err
767 }
768 }
769 if err := iprot.ReadStructEnd(); err != nil {
770 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
771 }
772 return nil
773 }
774
775 func (p *AddServiceConcatArgs) ReadField1(iprot thrift.TProtocol) error {
776 if v, err := iprot.ReadString(); err != nil {
777 return thrift.PrependError("error reading field 1: ", err)
778 } else {
779 p.A = v
780 }
781 return nil
782 }
783
784 func (p *AddServiceConcatArgs) ReadField2(iprot thrift.TProtocol) error {
785 if v, err := iprot.ReadString(); err != nil {
786 return thrift.PrependError("error reading field 2: ", err)
787 } else {
788 p.B = v
789 }
790 return nil
791 }
792
793 func (p *AddServiceConcatArgs) Write(oprot thrift.TProtocol) error {
794 if err := oprot.WriteStructBegin("Concat_args"); err != nil {
795 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
796 if p != nil {
797 if err := p.writeField1(oprot); err != nil { return err }
798 if err := p.writeField2(oprot); err != nil { return err }
799 }
800 if err := oprot.WriteFieldStop(); err != nil {
801 return thrift.PrependError("write field stop error: ", err) }
802 if err := oprot.WriteStructEnd(); err != nil {
803 return thrift.PrependError("write struct stop error: ", err) }
804 return nil
805 }
806
807 func (p *AddServiceConcatArgs) writeField1(oprot thrift.TProtocol) (err error) {
808 if err := oprot.WriteFieldBegin("a", thrift.STRING, 1); err != nil {
809 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:a: ", p), err) }
810 if err := oprot.WriteString(string(p.A)); err != nil {
811 return thrift.PrependError(fmt.Sprintf("%T.a (1) field write error: ", p), err) }
812 if err := oprot.WriteFieldEnd(); err != nil {
813 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:a: ", p), err) }
814 return err
815 }
816
817 func (p *AddServiceConcatArgs) writeField2(oprot thrift.TProtocol) (err error) {
818 if err := oprot.WriteFieldBegin("b", thrift.STRING, 2); err != nil {
819 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:b: ", p), err) }
820 if err := oprot.WriteString(string(p.B)); err != nil {
821 return thrift.PrependError(fmt.Sprintf("%T.b (2) field write error: ", p), err) }
822 if err := oprot.WriteFieldEnd(); err != nil {
823 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:b: ", p), err) }
824 return err
880 return p.B
881 }
882 func (p *AddServiceConcatArgs) Read(ctx context.Context, iprot thrift.TProtocol) error {
883 if _, err := iprot.ReadStructBegin(ctx); err != nil {
884 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
885 }
886
887 for {
888 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
889 if err != nil {
890 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
891 }
892 if fieldTypeId == thrift.STOP {
893 break
894 }
895 switch fieldId {
896 case 1:
897 if fieldTypeId == thrift.STRING {
898 if err := p.ReadField1(ctx, iprot); err != nil {
899 return err
900 }
901 } else {
902 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
903 return err
904 }
905 }
906 case 2:
907 if fieldTypeId == thrift.STRING {
908 if err := p.ReadField2(ctx, iprot); err != nil {
909 return err
910 }
911 } else {
912 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
913 return err
914 }
915 }
916 default:
917 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
918 return err
919 }
920 }
921 if err := iprot.ReadFieldEnd(ctx); err != nil {
922 return err
923 }
924 }
925 if err := iprot.ReadStructEnd(ctx); err != nil {
926 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
927 }
928 return nil
929 }
930
931 func (p *AddServiceConcatArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
932 if v, err := iprot.ReadString(ctx); err != nil {
933 return thrift.PrependError("error reading field 1: ", err)
934 } else {
935 p.A = v
936 }
937 return nil
938 }
939
940 func (p *AddServiceConcatArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
941 if v, err := iprot.ReadString(ctx); err != nil {
942 return thrift.PrependError("error reading field 2: ", err)
943 } else {
944 p.B = v
945 }
946 return nil
947 }
948
949 func (p *AddServiceConcatArgs) Write(ctx context.Context, oprot thrift.TProtocol) error {
950 if err := oprot.WriteStructBegin(ctx, "Concat_args"); err != nil {
951 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
952 }
953 if p != nil {
954 if err := p.writeField1(ctx, oprot); err != nil {
955 return err
956 }
957 if err := p.writeField2(ctx, oprot); err != nil {
958 return err
959 }
960 }
961 if err := oprot.WriteFieldStop(ctx); err != nil {
962 return thrift.PrependError("write field stop error: ", err)
963 }
964 if err := oprot.WriteStructEnd(ctx); err != nil {
965 return thrift.PrependError("write struct stop error: ", err)
966 }
967 return nil
968 }
969
970 func (p *AddServiceConcatArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) {
971 if err := oprot.WriteFieldBegin(ctx, "a", thrift.STRING, 1); err != nil {
972 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:a: ", p), err)
973 }
974 if err := oprot.WriteString(ctx, string(p.A)); err != nil {
975 return thrift.PrependError(fmt.Sprintf("%T.a (1) field write error: ", p), err)
976 }
977 if err := oprot.WriteFieldEnd(ctx); err != nil {
978 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:a: ", p), err)
979 }
980 return err
981 }
982
983 func (p *AddServiceConcatArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) {
984 if err := oprot.WriteFieldBegin(ctx, "b", thrift.STRING, 2); err != nil {
985 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:b: ", p), err)
986 }
987 if err := oprot.WriteString(ctx, string(p.B)); err != nil {
988 return thrift.PrependError(fmt.Sprintf("%T.b (2) field write error: ", p), err)
989 }
990 if err := oprot.WriteFieldEnd(ctx); err != nil {
991 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:b: ", p), err)
992 }
993 return err
825994 }
826995
827996 func (p *AddServiceConcatArgs) String() string {
828 if p == nil {
829 return "<nil>"
830 }
831 return fmt.Sprintf("AddServiceConcatArgs(%+v)", *p)
997 if p == nil {
998 return "<nil>"
999 }
1000 return fmt.Sprintf("AddServiceConcatArgs(%+v)", *p)
8321001 }
8331002
8341003 // Attributes:
8351004 // - Success
8361005 type AddServiceConcatResult struct {
837 Success *ConcatReply `thrift:"success,0" db:"success" json:"success,omitempty"`
1006 Success *ConcatReply `thrift:"success,0" db:"success" json:"success,omitempty"`
8381007 }
8391008
8401009 func NewAddServiceConcatResult() *AddServiceConcatResult {
841 return &AddServiceConcatResult{}
1010 return &AddServiceConcatResult{}
8421011 }
8431012
8441013 var AddServiceConcatResult_Success_DEFAULT *ConcatReply
1014
8451015 func (p *AddServiceConcatResult) GetSuccess() *ConcatReply {
846 if !p.IsSetSuccess() {
847 return AddServiceConcatResult_Success_DEFAULT
848 }
849 return p.Success
1016 if !p.IsSetSuccess() {
1017 return AddServiceConcatResult_Success_DEFAULT
1018 }
1019 return p.Success
8501020 }
8511021 func (p *AddServiceConcatResult) IsSetSuccess() bool {
852 return p.Success != nil
853 }
854
855 func (p *AddServiceConcatResult) Read(iprot thrift.TProtocol) error {
856 if _, err := iprot.ReadStructBegin(); err != nil {
857 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
858 }
859
860
861 for {
862 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
863 if err != nil {
864 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
865 }
866 if fieldTypeId == thrift.STOP { break; }
867 switch fieldId {
868 case 0:
869 if fieldTypeId == thrift.STRUCT {
870 if err := p.ReadField0(iprot); err != nil {
871 return err
872 }
873 } else {
874 if err := iprot.Skip(fieldTypeId); err != nil {
875 return err
876 }
877 }
878 default:
879 if err := iprot.Skip(fieldTypeId); err != nil {
880 return err
881 }
882 }
883 if err := iprot.ReadFieldEnd(); err != nil {
884 return err
885 }
886 }
887 if err := iprot.ReadStructEnd(); err != nil {
888 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
889 }
890 return nil
891 }
892
893 func (p *AddServiceConcatResult) ReadField0(iprot thrift.TProtocol) error {
894 p.Success = &ConcatReply{}
895 if err := p.Success.Read(iprot); err != nil {
896 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
897 }
898 return nil
899 }
900
901 func (p *AddServiceConcatResult) Write(oprot thrift.TProtocol) error {
902 if err := oprot.WriteStructBegin("Concat_result"); err != nil {
903 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
904 if p != nil {
905 if err := p.writeField0(oprot); err != nil { return err }
906 }
907 if err := oprot.WriteFieldStop(); err != nil {
908 return thrift.PrependError("write field stop error: ", err) }
909 if err := oprot.WriteStructEnd(); err != nil {
910 return thrift.PrependError("write struct stop error: ", err) }
911 return nil
912 }
913
914 func (p *AddServiceConcatResult) writeField0(oprot thrift.TProtocol) (err error) {
915 if p.IsSetSuccess() {
916 if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
917 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
918 if err := p.Success.Write(oprot); err != nil {
919 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
920 }
921 if err := oprot.WriteFieldEnd(); err != nil {
922 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
923 }
924 return err
1022 return p.Success != nil
1023 }
1024
1025 func (p *AddServiceConcatResult) Read(ctx context.Context, iprot thrift.TProtocol) error {
1026 if _, err := iprot.ReadStructBegin(ctx); err != nil {
1027 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
1028 }
1029
1030 for {
1031 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
1032 if err != nil {
1033 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
1034 }
1035 if fieldTypeId == thrift.STOP {
1036 break
1037 }
1038 switch fieldId {
1039 case 0:
1040 if fieldTypeId == thrift.STRUCT {
1041 if err := p.ReadField0(ctx, iprot); err != nil {
1042 return err
1043 }
1044 } else {
1045 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
1046 return err
1047 }
1048 }
1049 default:
1050 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
1051 return err
1052 }
1053 }
1054 if err := iprot.ReadFieldEnd(ctx); err != nil {
1055 return err
1056 }
1057 }
1058 if err := iprot.ReadStructEnd(ctx); err != nil {
1059 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
1060 }
1061 return nil
1062 }
1063
1064 func (p *AddServiceConcatResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error {
1065 p.Success = &ConcatReply{}
1066 if err := p.Success.Read(ctx, iprot); err != nil {
1067 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
1068 }
1069 return nil
1070 }
1071
1072 func (p *AddServiceConcatResult) Write(ctx context.Context, oprot thrift.TProtocol) error {
1073 if err := oprot.WriteStructBegin(ctx, "Concat_result"); err != nil {
1074 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
1075 }
1076 if p != nil {
1077 if err := p.writeField0(ctx, oprot); err != nil {
1078 return err
1079 }
1080 }
1081 if err := oprot.WriteFieldStop(ctx); err != nil {
1082 return thrift.PrependError("write field stop error: ", err)
1083 }
1084 if err := oprot.WriteStructEnd(ctx); err != nil {
1085 return thrift.PrependError("write struct stop error: ", err)
1086 }
1087 return nil
1088 }
1089
1090 func (p *AddServiceConcatResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) {
1091 if p.IsSetSuccess() {
1092 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil {
1093 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
1094 }
1095 if err := p.Success.Write(ctx, oprot); err != nil {
1096 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
1097 }
1098 if err := oprot.WriteFieldEnd(ctx); err != nil {
1099 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
1100 }
1101 }
1102 return err
9251103 }
9261104
9271105 func (p *AddServiceConcatResult) String() string {
928 if p == nil {
929 return "<nil>"
930 }
931 return fmt.Sprintf("AddServiceConcatResult(%+v)", *p)
932 }
933
934
1106 if p == nil {
1107 return "<nil>"
1108 }
1109 return fmt.Sprintf("AddServiceConcatResult(%+v)", *p)
1110 }
44 require (
55 github.com/VividCortex/gohistogram v1.0.0
66 github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
7 github.com/apache/thrift v0.13.0
7 github.com/apache/thrift v0.14.1
88 github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a
99 github.com/aws/aws-lambda-go v1.13.3
1010 github.com/aws/aws-sdk-go v1.27.0
1717 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
1818 github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI=
1919 github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
20 github.com/apache/thrift v0.14.1 h1:Yh8v0hpCj63p5edXOLaqTJW0IJ1p+eMW6+YSOqw1d6s=
21 github.com/apache/thrift v0.14.1/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
2022 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
2123 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I=
2224 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=