github.com/uuosio/chaintester@v0.0.0-20230731100329-1f6fad7372e5/interfaces/interfaces.go (about) 1 // Code generated by Thrift Compiler (0.15.0). DO NOT EDIT. 2 3 package interfaces 4 5 import ( 6 "bytes" 7 "context" 8 "fmt" 9 "time" 10 thrift "github.com/apache/thrift/lib/go/thrift" 11 ) 12 13 // (needed to ensure safety because of naive import list construction.) 14 var _ = thrift.ZERO 15 var _ = fmt.Printf 16 var _ = context.Background 17 var _ = time.Now 18 var _ = bytes.Equal 19 20 // Attributes: 21 // - Exc 22 type TransactionException struct { 23 Exc string `thrift:"exc,1" db:"exc" json:"exc"` 24 } 25 26 func NewTransactionException() *TransactionException { 27 return &TransactionException{} 28 } 29 30 31 func (p *TransactionException) GetExc() string { 32 return p.Exc 33 } 34 func (p *TransactionException) Read(ctx context.Context, iprot thrift.TProtocol) error { 35 if _, err := iprot.ReadStructBegin(ctx); err != nil { 36 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 37 } 38 39 40 for { 41 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 42 if err != nil { 43 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 44 } 45 if fieldTypeId == thrift.STOP { break; } 46 switch fieldId { 47 case 1: 48 if fieldTypeId == thrift.STRING { 49 if err := p.ReadField1(ctx, iprot); err != nil { 50 return err 51 } 52 } else { 53 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 54 return err 55 } 56 } 57 default: 58 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 59 return err 60 } 61 } 62 if err := iprot.ReadFieldEnd(ctx); err != nil { 63 return err 64 } 65 } 66 if err := iprot.ReadStructEnd(ctx); err != nil { 67 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 68 } 69 return nil 70 } 71 72 func (p *TransactionException) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 73 if v, err := iprot.ReadString(ctx); err != nil { 74 return thrift.PrependError("error reading field 1: ", err) 75 } else { 76 p.Exc = v 77 } 78 return nil 79 } 80 81 func (p *TransactionException) Write(ctx context.Context, oprot thrift.TProtocol) error { 82 if err := oprot.WriteStructBegin(ctx, "TransactionException"); err != nil { 83 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 84 if p != nil { 85 if err := p.writeField1(ctx, oprot); err != nil { return err } 86 } 87 if err := oprot.WriteFieldStop(ctx); err != nil { 88 return thrift.PrependError("write field stop error: ", err) } 89 if err := oprot.WriteStructEnd(ctx); err != nil { 90 return thrift.PrependError("write struct stop error: ", err) } 91 return nil 92 } 93 94 func (p *TransactionException) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 95 if err := oprot.WriteFieldBegin(ctx, "exc", thrift.STRING, 1); err != nil { 96 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:exc: ", p), err) } 97 if err := oprot.WriteString(ctx, string(p.Exc)); err != nil { 98 return thrift.PrependError(fmt.Sprintf("%T.exc (1) field write error: ", p), err) } 99 if err := oprot.WriteFieldEnd(ctx); err != nil { 100 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:exc: ", p), err) } 101 return err 102 } 103 104 func (p *TransactionException) Equals(other *TransactionException) bool { 105 if p == other { 106 return true 107 } else if p == nil || other == nil { 108 return false 109 } 110 if p.Exc != other.Exc { return false } 111 return true 112 } 113 114 func (p *TransactionException) String() string { 115 if p == nil { 116 return "<nil>" 117 } 118 return fmt.Sprintf("TransactionException(%+v)", *p) 119 } 120 121 func (p *TransactionException) Error() string { 122 return p.String() 123 } 124 125 func (TransactionException) TExceptionType() thrift.TExceptionType { 126 return thrift.TExceptionTypeCompiled 127 } 128 129 var _ thrift.TException = (*TransactionException)(nil) 130 131 // Attributes: 132 // - ErrorMessage 133 type AssertException struct { 134 ErrorMessage string `thrift:"error_message,1" db:"error_message" json:"error_message"` 135 } 136 137 func NewAssertException() *AssertException { 138 return &AssertException{} 139 } 140 141 142 func (p *AssertException) GetErrorMessage() string { 143 return p.ErrorMessage 144 } 145 func (p *AssertException) Read(ctx context.Context, iprot thrift.TProtocol) error { 146 if _, err := iprot.ReadStructBegin(ctx); err != nil { 147 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 148 } 149 150 151 for { 152 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 153 if err != nil { 154 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 155 } 156 if fieldTypeId == thrift.STOP { break; } 157 switch fieldId { 158 case 1: 159 if fieldTypeId == thrift.STRING { 160 if err := p.ReadField1(ctx, iprot); err != nil { 161 return err 162 } 163 } else { 164 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 165 return err 166 } 167 } 168 default: 169 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 170 return err 171 } 172 } 173 if err := iprot.ReadFieldEnd(ctx); err != nil { 174 return err 175 } 176 } 177 if err := iprot.ReadStructEnd(ctx); err != nil { 178 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 179 } 180 return nil 181 } 182 183 func (p *AssertException) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 184 if v, err := iprot.ReadString(ctx); err != nil { 185 return thrift.PrependError("error reading field 1: ", err) 186 } else { 187 p.ErrorMessage = v 188 } 189 return nil 190 } 191 192 func (p *AssertException) Write(ctx context.Context, oprot thrift.TProtocol) error { 193 if err := oprot.WriteStructBegin(ctx, "AssertException"); err != nil { 194 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 195 if p != nil { 196 if err := p.writeField1(ctx, oprot); err != nil { return err } 197 } 198 if err := oprot.WriteFieldStop(ctx); err != nil { 199 return thrift.PrependError("write field stop error: ", err) } 200 if err := oprot.WriteStructEnd(ctx); err != nil { 201 return thrift.PrependError("write struct stop error: ", err) } 202 return nil 203 } 204 205 func (p *AssertException) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 206 if err := oprot.WriteFieldBegin(ctx, "error_message", thrift.STRING, 1); err != nil { 207 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:error_message: ", p), err) } 208 if err := oprot.WriteString(ctx, string(p.ErrorMessage)); err != nil { 209 return thrift.PrependError(fmt.Sprintf("%T.error_message (1) field write error: ", p), err) } 210 if err := oprot.WriteFieldEnd(ctx); err != nil { 211 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:error_message: ", p), err) } 212 return err 213 } 214 215 func (p *AssertException) Equals(other *AssertException) bool { 216 if p == other { 217 return true 218 } else if p == nil || other == nil { 219 return false 220 } 221 if p.ErrorMessage != other.ErrorMessage { return false } 222 return true 223 } 224 225 func (p *AssertException) String() string { 226 if p == nil { 227 return "<nil>" 228 } 229 return fmt.Sprintf("AssertException(%+v)", *p) 230 } 231 232 func (p *AssertException) Error() string { 233 return p.String() 234 } 235 236 func (AssertException) TExceptionType() thrift.TExceptionType { 237 return thrift.TExceptionTypeCompiled 238 } 239 240 var _ thrift.TException = (*AssertException)(nil) 241 242 // Attributes: 243 // - RawArgs_ 244 // - JSONArgs_ 245 type ActionArguments struct { 246 RawArgs_ []byte `thrift:"raw_args,1" db:"raw_args" json:"raw_args,omitempty"` 247 JSONArgs_ *string `thrift:"json_args,2" db:"json_args" json:"json_args,omitempty"` 248 } 249 250 func NewActionArguments() *ActionArguments { 251 return &ActionArguments{} 252 } 253 254 var ActionArguments_RawArgs__DEFAULT []byte 255 256 func (p *ActionArguments) GetRawArgs_() []byte { 257 return p.RawArgs_ 258 } 259 var ActionArguments_JSONArgs__DEFAULT string 260 func (p *ActionArguments) GetJSONArgs_() string { 261 if !p.IsSetJSONArgs_() { 262 return ActionArguments_JSONArgs__DEFAULT 263 } 264 return *p.JSONArgs_ 265 } 266 func (p *ActionArguments) CountSetFieldsActionArguments() int { 267 count := 0 268 if (p.IsSetRawArgs_()) { 269 count++ 270 } 271 if (p.IsSetJSONArgs_()) { 272 count++ 273 } 274 return count 275 276 } 277 278 func (p *ActionArguments) IsSetRawArgs_() bool { 279 return p.RawArgs_ != nil 280 } 281 282 func (p *ActionArguments) IsSetJSONArgs_() bool { 283 return p.JSONArgs_ != nil 284 } 285 286 func (p *ActionArguments) Read(ctx context.Context, iprot thrift.TProtocol) error { 287 if _, err := iprot.ReadStructBegin(ctx); err != nil { 288 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 289 } 290 291 292 for { 293 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 294 if err != nil { 295 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 296 } 297 if fieldTypeId == thrift.STOP { break; } 298 switch fieldId { 299 case 1: 300 if fieldTypeId == thrift.STRING { 301 if err := p.ReadField1(ctx, iprot); err != nil { 302 return err 303 } 304 } else { 305 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 306 return err 307 } 308 } 309 case 2: 310 if fieldTypeId == thrift.STRING { 311 if err := p.ReadField2(ctx, iprot); err != nil { 312 return err 313 } 314 } else { 315 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 316 return err 317 } 318 } 319 default: 320 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 321 return err 322 } 323 } 324 if err := iprot.ReadFieldEnd(ctx); err != nil { 325 return err 326 } 327 } 328 if err := iprot.ReadStructEnd(ctx); err != nil { 329 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 330 } 331 return nil 332 } 333 334 func (p *ActionArguments) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 335 if v, err := iprot.ReadBinary(ctx); err != nil { 336 return thrift.PrependError("error reading field 1: ", err) 337 } else { 338 p.RawArgs_ = v 339 } 340 return nil 341 } 342 343 func (p *ActionArguments) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 344 if v, err := iprot.ReadString(ctx); err != nil { 345 return thrift.PrependError("error reading field 2: ", err) 346 } else { 347 p.JSONArgs_ = &v 348 } 349 return nil 350 } 351 352 func (p *ActionArguments) Write(ctx context.Context, oprot thrift.TProtocol) error { 353 if c := p.CountSetFieldsActionArguments(); c != 1 { 354 return fmt.Errorf("%T write union: exactly one field must be set (%d set)", p, c) 355 } 356 if err := oprot.WriteStructBegin(ctx, "ActionArguments"); err != nil { 357 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 358 if p != nil { 359 if err := p.writeField1(ctx, oprot); err != nil { return err } 360 if err := p.writeField2(ctx, oprot); err != nil { return err } 361 } 362 if err := oprot.WriteFieldStop(ctx); err != nil { 363 return thrift.PrependError("write field stop error: ", err) } 364 if err := oprot.WriteStructEnd(ctx); err != nil { 365 return thrift.PrependError("write struct stop error: ", err) } 366 return nil 367 } 368 369 func (p *ActionArguments) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 370 if p.IsSetRawArgs_() { 371 if err := oprot.WriteFieldBegin(ctx, "raw_args", thrift.STRING, 1); err != nil { 372 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:raw_args: ", p), err) } 373 if err := oprot.WriteBinary(ctx, p.RawArgs_); err != nil { 374 return thrift.PrependError(fmt.Sprintf("%T.raw_args (1) field write error: ", p), err) } 375 if err := oprot.WriteFieldEnd(ctx); err != nil { 376 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:raw_args: ", p), err) } 377 } 378 return err 379 } 380 381 func (p *ActionArguments) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 382 if p.IsSetJSONArgs_() { 383 if err := oprot.WriteFieldBegin(ctx, "json_args", thrift.STRING, 2); err != nil { 384 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:json_args: ", p), err) } 385 if err := oprot.WriteString(ctx, string(*p.JSONArgs_)); err != nil { 386 return thrift.PrependError(fmt.Sprintf("%T.json_args (2) field write error: ", p), err) } 387 if err := oprot.WriteFieldEnd(ctx); err != nil { 388 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:json_args: ", p), err) } 389 } 390 return err 391 } 392 393 func (p *ActionArguments) Equals(other *ActionArguments) bool { 394 if p == other { 395 return true 396 } else if p == nil || other == nil { 397 return false 398 } 399 if bytes.Compare(p.RawArgs_, other.RawArgs_) != 0 { return false } 400 if p.JSONArgs_ != other.JSONArgs_ { 401 if p.JSONArgs_ == nil || other.JSONArgs_ == nil { 402 return false 403 } 404 if (*p.JSONArgs_) != (*other.JSONArgs_) { return false } 405 } 406 return true 407 } 408 409 func (p *ActionArguments) String() string { 410 if p == nil { 411 return "<nil>" 412 } 413 return fmt.Sprintf("ActionArguments(%+v)", *p) 414 } 415 416 // Attributes: 417 // - Account 418 // - Action 419 // - Permissions 420 // - Arguments 421 type Action struct { 422 Account string `thrift:"account,1" db:"account" json:"account"` 423 Action string `thrift:"action,2" db:"action" json:"action"` 424 Permissions string `thrift:"permissions,3" db:"permissions" json:"permissions"` 425 Arguments *ActionArguments `thrift:"arguments,4" db:"arguments" json:"arguments"` 426 } 427 428 func NewAction() *Action { 429 return &Action{} 430 } 431 432 433 func (p *Action) GetAccount() string { 434 return p.Account 435 } 436 437 func (p *Action) GetAction() string { 438 return p.Action 439 } 440 441 func (p *Action) GetPermissions() string { 442 return p.Permissions 443 } 444 var Action_Arguments_DEFAULT *ActionArguments 445 func (p *Action) GetArguments() *ActionArguments { 446 if !p.IsSetArguments() { 447 return Action_Arguments_DEFAULT 448 } 449 return p.Arguments 450 } 451 func (p *Action) IsSetArguments() bool { 452 return p.Arguments != nil 453 } 454 455 func (p *Action) Read(ctx context.Context, iprot thrift.TProtocol) error { 456 if _, err := iprot.ReadStructBegin(ctx); err != nil { 457 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 458 } 459 460 461 for { 462 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 463 if err != nil { 464 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 465 } 466 if fieldTypeId == thrift.STOP { break; } 467 switch fieldId { 468 case 1: 469 if fieldTypeId == thrift.STRING { 470 if err := p.ReadField1(ctx, iprot); err != nil { 471 return err 472 } 473 } else { 474 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 475 return err 476 } 477 } 478 case 2: 479 if fieldTypeId == thrift.STRING { 480 if err := p.ReadField2(ctx, iprot); err != nil { 481 return err 482 } 483 } else { 484 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 485 return err 486 } 487 } 488 case 3: 489 if fieldTypeId == thrift.STRING { 490 if err := p.ReadField3(ctx, iprot); err != nil { 491 return err 492 } 493 } else { 494 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 495 return err 496 } 497 } 498 case 4: 499 if fieldTypeId == thrift.STRUCT { 500 if err := p.ReadField4(ctx, iprot); err != nil { 501 return err 502 } 503 } else { 504 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 505 return err 506 } 507 } 508 default: 509 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 510 return err 511 } 512 } 513 if err := iprot.ReadFieldEnd(ctx); err != nil { 514 return err 515 } 516 } 517 if err := iprot.ReadStructEnd(ctx); err != nil { 518 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 519 } 520 return nil 521 } 522 523 func (p *Action) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 524 if v, err := iprot.ReadString(ctx); err != nil { 525 return thrift.PrependError("error reading field 1: ", err) 526 } else { 527 p.Account = v 528 } 529 return nil 530 } 531 532 func (p *Action) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 533 if v, err := iprot.ReadString(ctx); err != nil { 534 return thrift.PrependError("error reading field 2: ", err) 535 } else { 536 p.Action = v 537 } 538 return nil 539 } 540 541 func (p *Action) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 542 if v, err := iprot.ReadString(ctx); err != nil { 543 return thrift.PrependError("error reading field 3: ", err) 544 } else { 545 p.Permissions = v 546 } 547 return nil 548 } 549 550 func (p *Action) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 551 p.Arguments = &ActionArguments{} 552 if err := p.Arguments.Read(ctx, iprot); err != nil { 553 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Arguments), err) 554 } 555 return nil 556 } 557 558 func (p *Action) Write(ctx context.Context, oprot thrift.TProtocol) error { 559 if err := oprot.WriteStructBegin(ctx, "Action"); err != nil { 560 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 561 if p != nil { 562 if err := p.writeField1(ctx, oprot); err != nil { return err } 563 if err := p.writeField2(ctx, oprot); err != nil { return err } 564 if err := p.writeField3(ctx, oprot); err != nil { return err } 565 if err := p.writeField4(ctx, oprot); err != nil { return err } 566 } 567 if err := oprot.WriteFieldStop(ctx); err != nil { 568 return thrift.PrependError("write field stop error: ", err) } 569 if err := oprot.WriteStructEnd(ctx); err != nil { 570 return thrift.PrependError("write struct stop error: ", err) } 571 return nil 572 } 573 574 func (p *Action) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 575 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRING, 1); err != nil { 576 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:account: ", p), err) } 577 if err := oprot.WriteString(ctx, string(p.Account)); err != nil { 578 return thrift.PrependError(fmt.Sprintf("%T.account (1) field write error: ", p), err) } 579 if err := oprot.WriteFieldEnd(ctx); err != nil { 580 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:account: ", p), err) } 581 return err 582 } 583 584 func (p *Action) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 585 if err := oprot.WriteFieldBegin(ctx, "action", thrift.STRING, 2); err != nil { 586 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:action: ", p), err) } 587 if err := oprot.WriteString(ctx, string(p.Action)); err != nil { 588 return thrift.PrependError(fmt.Sprintf("%T.action (2) field write error: ", p), err) } 589 if err := oprot.WriteFieldEnd(ctx); err != nil { 590 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:action: ", p), err) } 591 return err 592 } 593 594 func (p *Action) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 595 if err := oprot.WriteFieldBegin(ctx, "permissions", thrift.STRING, 3); err != nil { 596 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:permissions: ", p), err) } 597 if err := oprot.WriteString(ctx, string(p.Permissions)); err != nil { 598 return thrift.PrependError(fmt.Sprintf("%T.permissions (3) field write error: ", p), err) } 599 if err := oprot.WriteFieldEnd(ctx); err != nil { 600 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:permissions: ", p), err) } 601 return err 602 } 603 604 func (p *Action) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 605 if err := oprot.WriteFieldBegin(ctx, "arguments", thrift.STRUCT, 4); err != nil { 606 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:arguments: ", p), err) } 607 if err := p.Arguments.Write(ctx, oprot); err != nil { 608 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Arguments), err) 609 } 610 if err := oprot.WriteFieldEnd(ctx); err != nil { 611 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:arguments: ", p), err) } 612 return err 613 } 614 615 func (p *Action) Equals(other *Action) bool { 616 if p == other { 617 return true 618 } else if p == nil || other == nil { 619 return false 620 } 621 if p.Account != other.Account { return false } 622 if p.Action != other.Action { return false } 623 if p.Permissions != other.Permissions { return false } 624 if !p.Arguments.Equals(other.Arguments) { return false } 625 return true 626 } 627 628 func (p *Action) String() string { 629 if p == nil { 630 return "<nil>" 631 } 632 return fmt.Sprintf("Action(%+v)", *p) 633 } 634 635 // Attributes: 636 // - RawValue 637 type Uint64 struct { 638 RawValue []byte `thrift:"rawValue,1" db:"rawValue" json:"rawValue"` 639 } 640 641 func NewUint64() *Uint64 { 642 return &Uint64{} 643 } 644 645 646 func (p *Uint64) GetRawValue() []byte { 647 return p.RawValue 648 } 649 func (p *Uint64) Read(ctx context.Context, iprot thrift.TProtocol) error { 650 if _, err := iprot.ReadStructBegin(ctx); err != nil { 651 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 652 } 653 654 655 for { 656 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 657 if err != nil { 658 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 659 } 660 if fieldTypeId == thrift.STOP { break; } 661 switch fieldId { 662 case 1: 663 if fieldTypeId == thrift.STRING { 664 if err := p.ReadField1(ctx, iprot); err != nil { 665 return err 666 } 667 } else { 668 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 669 return err 670 } 671 } 672 default: 673 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 674 return err 675 } 676 } 677 if err := iprot.ReadFieldEnd(ctx); err != nil { 678 return err 679 } 680 } 681 if err := iprot.ReadStructEnd(ctx); err != nil { 682 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 683 } 684 return nil 685 } 686 687 func (p *Uint64) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 688 if v, err := iprot.ReadBinary(ctx); err != nil { 689 return thrift.PrependError("error reading field 1: ", err) 690 } else { 691 p.RawValue = v 692 } 693 return nil 694 } 695 696 func (p *Uint64) Write(ctx context.Context, oprot thrift.TProtocol) error { 697 if err := oprot.WriteStructBegin(ctx, "Uint64"); err != nil { 698 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 699 if p != nil { 700 if err := p.writeField1(ctx, oprot); err != nil { return err } 701 } 702 if err := oprot.WriteFieldStop(ctx); err != nil { 703 return thrift.PrependError("write field stop error: ", err) } 704 if err := oprot.WriteStructEnd(ctx); err != nil { 705 return thrift.PrependError("write struct stop error: ", err) } 706 return nil 707 } 708 709 func (p *Uint64) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 710 if err := oprot.WriteFieldBegin(ctx, "rawValue", thrift.STRING, 1); err != nil { 711 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:rawValue: ", p), err) } 712 if err := oprot.WriteBinary(ctx, p.RawValue); err != nil { 713 return thrift.PrependError(fmt.Sprintf("%T.rawValue (1) field write error: ", p), err) } 714 if err := oprot.WriteFieldEnd(ctx); err != nil { 715 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:rawValue: ", p), err) } 716 return err 717 } 718 719 func (p *Uint64) Equals(other *Uint64) bool { 720 if p == other { 721 return true 722 } else if p == nil || other == nil { 723 return false 724 } 725 if bytes.Compare(p.RawValue, other.RawValue) != 0 { return false } 726 return true 727 } 728 729 func (p *Uint64) String() string { 730 if p == nil { 731 return "<nil>" 732 } 733 return fmt.Sprintf("Uint64(%+v)", *p) 734 } 735 736 // Attributes: 737 // - Size 738 // - Buffer 739 type DataBuffer struct { 740 Size int32 `thrift:"size,1" db:"size" json:"size"` 741 Buffer []byte `thrift:"buffer,2" db:"buffer" json:"buffer"` 742 } 743 744 func NewDataBuffer() *DataBuffer { 745 return &DataBuffer{} 746 } 747 748 749 func (p *DataBuffer) GetSize() int32 { 750 return p.Size 751 } 752 753 func (p *DataBuffer) GetBuffer() []byte { 754 return p.Buffer 755 } 756 func (p *DataBuffer) Read(ctx context.Context, iprot thrift.TProtocol) error { 757 if _, err := iprot.ReadStructBegin(ctx); err != nil { 758 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 759 } 760 761 762 for { 763 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 764 if err != nil { 765 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 766 } 767 if fieldTypeId == thrift.STOP { break; } 768 switch fieldId { 769 case 1: 770 if fieldTypeId == thrift.I32 { 771 if err := p.ReadField1(ctx, iprot); err != nil { 772 return err 773 } 774 } else { 775 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 776 return err 777 } 778 } 779 case 2: 780 if fieldTypeId == thrift.STRING { 781 if err := p.ReadField2(ctx, iprot); err != nil { 782 return err 783 } 784 } else { 785 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 786 return err 787 } 788 } 789 default: 790 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 791 return err 792 } 793 } 794 if err := iprot.ReadFieldEnd(ctx); err != nil { 795 return err 796 } 797 } 798 if err := iprot.ReadStructEnd(ctx); err != nil { 799 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 800 } 801 return nil 802 } 803 804 func (p *DataBuffer) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 805 if v, err := iprot.ReadI32(ctx); err != nil { 806 return thrift.PrependError("error reading field 1: ", err) 807 } else { 808 p.Size = v 809 } 810 return nil 811 } 812 813 func (p *DataBuffer) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 814 if v, err := iprot.ReadBinary(ctx); err != nil { 815 return thrift.PrependError("error reading field 2: ", err) 816 } else { 817 p.Buffer = v 818 } 819 return nil 820 } 821 822 func (p *DataBuffer) Write(ctx context.Context, oprot thrift.TProtocol) error { 823 if err := oprot.WriteStructBegin(ctx, "DataBuffer"); err != nil { 824 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 825 if p != nil { 826 if err := p.writeField1(ctx, oprot); err != nil { return err } 827 if err := p.writeField2(ctx, oprot); err != nil { return err } 828 } 829 if err := oprot.WriteFieldStop(ctx); err != nil { 830 return thrift.PrependError("write field stop error: ", err) } 831 if err := oprot.WriteStructEnd(ctx); err != nil { 832 return thrift.PrependError("write struct stop error: ", err) } 833 return nil 834 } 835 836 func (p *DataBuffer) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 837 if err := oprot.WriteFieldBegin(ctx, "size", thrift.I32, 1); err != nil { 838 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:size: ", p), err) } 839 if err := oprot.WriteI32(ctx, int32(p.Size)); err != nil { 840 return thrift.PrependError(fmt.Sprintf("%T.size (1) field write error: ", p), err) } 841 if err := oprot.WriteFieldEnd(ctx); err != nil { 842 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:size: ", p), err) } 843 return err 844 } 845 846 func (p *DataBuffer) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 847 if err := oprot.WriteFieldBegin(ctx, "buffer", thrift.STRING, 2); err != nil { 848 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:buffer: ", p), err) } 849 if err := oprot.WriteBinary(ctx, p.Buffer); err != nil { 850 return thrift.PrependError(fmt.Sprintf("%T.buffer (2) field write error: ", p), err) } 851 if err := oprot.WriteFieldEnd(ctx); err != nil { 852 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:buffer: ", p), err) } 853 return err 854 } 855 856 func (p *DataBuffer) Equals(other *DataBuffer) bool { 857 if p == other { 858 return true 859 } else if p == nil || other == nil { 860 return false 861 } 862 if p.Size != other.Size { return false } 863 if bytes.Compare(p.Buffer, other.Buffer) != 0 { return false } 864 return true 865 } 866 867 func (p *DataBuffer) String() string { 868 if p == nil { 869 return "<nil>" 870 } 871 return fmt.Sprintf("DataBuffer(%+v)", *p) 872 } 873 874 // Attributes: 875 // - Iterator 876 // - Primary 877 type NextPreviousReturn struct { 878 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 879 Primary *Uint64 `thrift:"primary,2" db:"primary" json:"primary"` 880 } 881 882 func NewNextPreviousReturn() *NextPreviousReturn { 883 return &NextPreviousReturn{} 884 } 885 886 887 func (p *NextPreviousReturn) GetIterator() int32 { 888 return p.Iterator 889 } 890 var NextPreviousReturn_Primary_DEFAULT *Uint64 891 func (p *NextPreviousReturn) GetPrimary() *Uint64 { 892 if !p.IsSetPrimary() { 893 return NextPreviousReturn_Primary_DEFAULT 894 } 895 return p.Primary 896 } 897 func (p *NextPreviousReturn) IsSetPrimary() bool { 898 return p.Primary != nil 899 } 900 901 func (p *NextPreviousReturn) Read(ctx context.Context, iprot thrift.TProtocol) error { 902 if _, err := iprot.ReadStructBegin(ctx); err != nil { 903 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 904 } 905 906 907 for { 908 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 909 if err != nil { 910 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 911 } 912 if fieldTypeId == thrift.STOP { break; } 913 switch fieldId { 914 case 1: 915 if fieldTypeId == thrift.I32 { 916 if err := p.ReadField1(ctx, iprot); err != nil { 917 return err 918 } 919 } else { 920 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 921 return err 922 } 923 } 924 case 2: 925 if fieldTypeId == thrift.STRUCT { 926 if err := p.ReadField2(ctx, iprot); err != nil { 927 return err 928 } 929 } else { 930 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 931 return err 932 } 933 } 934 default: 935 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 936 return err 937 } 938 } 939 if err := iprot.ReadFieldEnd(ctx); err != nil { 940 return err 941 } 942 } 943 if err := iprot.ReadStructEnd(ctx); err != nil { 944 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 945 } 946 return nil 947 } 948 949 func (p *NextPreviousReturn) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 950 if v, err := iprot.ReadI32(ctx); err != nil { 951 return thrift.PrependError("error reading field 1: ", err) 952 } else { 953 p.Iterator = v 954 } 955 return nil 956 } 957 958 func (p *NextPreviousReturn) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 959 p.Primary = &Uint64{} 960 if err := p.Primary.Read(ctx, iprot); err != nil { 961 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 962 } 963 return nil 964 } 965 966 func (p *NextPreviousReturn) Write(ctx context.Context, oprot thrift.TProtocol) error { 967 if err := oprot.WriteStructBegin(ctx, "NextPreviousReturn"); err != nil { 968 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 969 if p != nil { 970 if err := p.writeField1(ctx, oprot); err != nil { return err } 971 if err := p.writeField2(ctx, oprot); err != nil { return err } 972 } 973 if err := oprot.WriteFieldStop(ctx); err != nil { 974 return thrift.PrependError("write field stop error: ", err) } 975 if err := oprot.WriteStructEnd(ctx); err != nil { 976 return thrift.PrependError("write struct stop error: ", err) } 977 return nil 978 } 979 980 func (p *NextPreviousReturn) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 981 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 982 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 983 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 984 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 985 if err := oprot.WriteFieldEnd(ctx); err != nil { 986 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 987 return err 988 } 989 990 func (p *NextPreviousReturn) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 991 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 2); err != nil { 992 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:primary: ", p), err) } 993 if err := p.Primary.Write(ctx, oprot); err != nil { 994 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 995 } 996 if err := oprot.WriteFieldEnd(ctx); err != nil { 997 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:primary: ", p), err) } 998 return err 999 } 1000 1001 func (p *NextPreviousReturn) Equals(other *NextPreviousReturn) bool { 1002 if p == other { 1003 return true 1004 } else if p == nil || other == nil { 1005 return false 1006 } 1007 if p.Iterator != other.Iterator { return false } 1008 if !p.Primary.Equals(other.Primary) { return false } 1009 return true 1010 } 1011 1012 func (p *NextPreviousReturn) String() string { 1013 if p == nil { 1014 return "<nil>" 1015 } 1016 return fmt.Sprintf("NextPreviousReturn(%+v)", *p) 1017 } 1018 1019 // Attributes: 1020 // - Iterator 1021 // - Primary 1022 type IteratorPrimaryReturn struct { 1023 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 1024 Primary *Uint64 `thrift:"primary,2" db:"primary" json:"primary"` 1025 } 1026 1027 func NewIteratorPrimaryReturn() *IteratorPrimaryReturn { 1028 return &IteratorPrimaryReturn{} 1029 } 1030 1031 1032 func (p *IteratorPrimaryReturn) GetIterator() int32 { 1033 return p.Iterator 1034 } 1035 var IteratorPrimaryReturn_Primary_DEFAULT *Uint64 1036 func (p *IteratorPrimaryReturn) GetPrimary() *Uint64 { 1037 if !p.IsSetPrimary() { 1038 return IteratorPrimaryReturn_Primary_DEFAULT 1039 } 1040 return p.Primary 1041 } 1042 func (p *IteratorPrimaryReturn) IsSetPrimary() bool { 1043 return p.Primary != nil 1044 } 1045 1046 func (p *IteratorPrimaryReturn) Read(ctx context.Context, iprot thrift.TProtocol) error { 1047 if _, err := iprot.ReadStructBegin(ctx); err != nil { 1048 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 1049 } 1050 1051 1052 for { 1053 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 1054 if err != nil { 1055 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 1056 } 1057 if fieldTypeId == thrift.STOP { break; } 1058 switch fieldId { 1059 case 1: 1060 if fieldTypeId == thrift.I32 { 1061 if err := p.ReadField1(ctx, iprot); err != nil { 1062 return err 1063 } 1064 } else { 1065 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1066 return err 1067 } 1068 } 1069 case 2: 1070 if fieldTypeId == thrift.STRUCT { 1071 if err := p.ReadField2(ctx, iprot); err != nil { 1072 return err 1073 } 1074 } else { 1075 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1076 return err 1077 } 1078 } 1079 default: 1080 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1081 return err 1082 } 1083 } 1084 if err := iprot.ReadFieldEnd(ctx); err != nil { 1085 return err 1086 } 1087 } 1088 if err := iprot.ReadStructEnd(ctx); err != nil { 1089 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 1090 } 1091 return nil 1092 } 1093 1094 func (p *IteratorPrimaryReturn) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 1095 if v, err := iprot.ReadI32(ctx); err != nil { 1096 return thrift.PrependError("error reading field 1: ", err) 1097 } else { 1098 p.Iterator = v 1099 } 1100 return nil 1101 } 1102 1103 func (p *IteratorPrimaryReturn) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 1104 p.Primary = &Uint64{} 1105 if err := p.Primary.Read(ctx, iprot); err != nil { 1106 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 1107 } 1108 return nil 1109 } 1110 1111 func (p *IteratorPrimaryReturn) Write(ctx context.Context, oprot thrift.TProtocol) error { 1112 if err := oprot.WriteStructBegin(ctx, "IteratorPrimaryReturn"); err != nil { 1113 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 1114 if p != nil { 1115 if err := p.writeField1(ctx, oprot); err != nil { return err } 1116 if err := p.writeField2(ctx, oprot); err != nil { return err } 1117 } 1118 if err := oprot.WriteFieldStop(ctx); err != nil { 1119 return thrift.PrependError("write field stop error: ", err) } 1120 if err := oprot.WriteStructEnd(ctx); err != nil { 1121 return thrift.PrependError("write struct stop error: ", err) } 1122 return nil 1123 } 1124 1125 func (p *IteratorPrimaryReturn) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 1126 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 1127 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 1128 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 1129 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 1130 if err := oprot.WriteFieldEnd(ctx); err != nil { 1131 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 1132 return err 1133 } 1134 1135 func (p *IteratorPrimaryReturn) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 1136 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 2); err != nil { 1137 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:primary: ", p), err) } 1138 if err := p.Primary.Write(ctx, oprot); err != nil { 1139 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 1140 } 1141 if err := oprot.WriteFieldEnd(ctx); err != nil { 1142 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:primary: ", p), err) } 1143 return err 1144 } 1145 1146 func (p *IteratorPrimaryReturn) Equals(other *IteratorPrimaryReturn) bool { 1147 if p == other { 1148 return true 1149 } else if p == nil || other == nil { 1150 return false 1151 } 1152 if p.Iterator != other.Iterator { return false } 1153 if !p.Primary.Equals(other.Primary) { return false } 1154 return true 1155 } 1156 1157 func (p *IteratorPrimaryReturn) String() string { 1158 if p == nil { 1159 return "<nil>" 1160 } 1161 return fmt.Sprintf("IteratorPrimaryReturn(%+v)", *p) 1162 } 1163 1164 // Attributes: 1165 // - Iterator 1166 // - Secondary 1167 type FindPrimaryReturn struct { 1168 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 1169 Secondary []byte `thrift:"secondary,2" db:"secondary" json:"secondary"` 1170 } 1171 1172 func NewFindPrimaryReturn() *FindPrimaryReturn { 1173 return &FindPrimaryReturn{} 1174 } 1175 1176 1177 func (p *FindPrimaryReturn) GetIterator() int32 { 1178 return p.Iterator 1179 } 1180 1181 func (p *FindPrimaryReturn) GetSecondary() []byte { 1182 return p.Secondary 1183 } 1184 func (p *FindPrimaryReturn) Read(ctx context.Context, iprot thrift.TProtocol) error { 1185 if _, err := iprot.ReadStructBegin(ctx); err != nil { 1186 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 1187 } 1188 1189 1190 for { 1191 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 1192 if err != nil { 1193 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 1194 } 1195 if fieldTypeId == thrift.STOP { break; } 1196 switch fieldId { 1197 case 1: 1198 if fieldTypeId == thrift.I32 { 1199 if err := p.ReadField1(ctx, iprot); err != nil { 1200 return err 1201 } 1202 } else { 1203 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1204 return err 1205 } 1206 } 1207 case 2: 1208 if fieldTypeId == thrift.STRING { 1209 if err := p.ReadField2(ctx, iprot); err != nil { 1210 return err 1211 } 1212 } else { 1213 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1214 return err 1215 } 1216 } 1217 default: 1218 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1219 return err 1220 } 1221 } 1222 if err := iprot.ReadFieldEnd(ctx); err != nil { 1223 return err 1224 } 1225 } 1226 if err := iprot.ReadStructEnd(ctx); err != nil { 1227 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 1228 } 1229 return nil 1230 } 1231 1232 func (p *FindPrimaryReturn) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 1233 if v, err := iprot.ReadI32(ctx); err != nil { 1234 return thrift.PrependError("error reading field 1: ", err) 1235 } else { 1236 p.Iterator = v 1237 } 1238 return nil 1239 } 1240 1241 func (p *FindPrimaryReturn) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 1242 if v, err := iprot.ReadBinary(ctx); err != nil { 1243 return thrift.PrependError("error reading field 2: ", err) 1244 } else { 1245 p.Secondary = v 1246 } 1247 return nil 1248 } 1249 1250 func (p *FindPrimaryReturn) Write(ctx context.Context, oprot thrift.TProtocol) error { 1251 if err := oprot.WriteStructBegin(ctx, "FindPrimaryReturn"); err != nil { 1252 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 1253 if p != nil { 1254 if err := p.writeField1(ctx, oprot); err != nil { return err } 1255 if err := p.writeField2(ctx, oprot); err != nil { return err } 1256 } 1257 if err := oprot.WriteFieldStop(ctx); err != nil { 1258 return thrift.PrependError("write field stop error: ", err) } 1259 if err := oprot.WriteStructEnd(ctx); err != nil { 1260 return thrift.PrependError("write struct stop error: ", err) } 1261 return nil 1262 } 1263 1264 func (p *FindPrimaryReturn) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 1265 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 1266 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 1267 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 1268 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 1269 if err := oprot.WriteFieldEnd(ctx); err != nil { 1270 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 1271 return err 1272 } 1273 1274 func (p *FindPrimaryReturn) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 1275 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 2); err != nil { 1276 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:secondary: ", p), err) } 1277 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 1278 return thrift.PrependError(fmt.Sprintf("%T.secondary (2) field write error: ", p), err) } 1279 if err := oprot.WriteFieldEnd(ctx); err != nil { 1280 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:secondary: ", p), err) } 1281 return err 1282 } 1283 1284 func (p *FindPrimaryReturn) Equals(other *FindPrimaryReturn) bool { 1285 if p == other { 1286 return true 1287 } else if p == nil || other == nil { 1288 return false 1289 } 1290 if p.Iterator != other.Iterator { return false } 1291 if bytes.Compare(p.Secondary, other.Secondary) != 0 { return false } 1292 return true 1293 } 1294 1295 func (p *FindPrimaryReturn) String() string { 1296 if p == nil { 1297 return "<nil>" 1298 } 1299 return fmt.Sprintf("FindPrimaryReturn(%+v)", *p) 1300 } 1301 1302 // Attributes: 1303 // - Iterator 1304 // - Primary 1305 type FindSecondaryReturn struct { 1306 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 1307 Primary *Uint64 `thrift:"primary,2" db:"primary" json:"primary"` 1308 } 1309 1310 func NewFindSecondaryReturn() *FindSecondaryReturn { 1311 return &FindSecondaryReturn{} 1312 } 1313 1314 1315 func (p *FindSecondaryReturn) GetIterator() int32 { 1316 return p.Iterator 1317 } 1318 var FindSecondaryReturn_Primary_DEFAULT *Uint64 1319 func (p *FindSecondaryReturn) GetPrimary() *Uint64 { 1320 if !p.IsSetPrimary() { 1321 return FindSecondaryReturn_Primary_DEFAULT 1322 } 1323 return p.Primary 1324 } 1325 func (p *FindSecondaryReturn) IsSetPrimary() bool { 1326 return p.Primary != nil 1327 } 1328 1329 func (p *FindSecondaryReturn) Read(ctx context.Context, iprot thrift.TProtocol) error { 1330 if _, err := iprot.ReadStructBegin(ctx); err != nil { 1331 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 1332 } 1333 1334 1335 for { 1336 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 1337 if err != nil { 1338 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 1339 } 1340 if fieldTypeId == thrift.STOP { break; } 1341 switch fieldId { 1342 case 1: 1343 if fieldTypeId == thrift.I32 { 1344 if err := p.ReadField1(ctx, iprot); err != nil { 1345 return err 1346 } 1347 } else { 1348 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1349 return err 1350 } 1351 } 1352 case 2: 1353 if fieldTypeId == thrift.STRUCT { 1354 if err := p.ReadField2(ctx, iprot); err != nil { 1355 return err 1356 } 1357 } else { 1358 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1359 return err 1360 } 1361 } 1362 default: 1363 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1364 return err 1365 } 1366 } 1367 if err := iprot.ReadFieldEnd(ctx); err != nil { 1368 return err 1369 } 1370 } 1371 if err := iprot.ReadStructEnd(ctx); err != nil { 1372 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 1373 } 1374 return nil 1375 } 1376 1377 func (p *FindSecondaryReturn) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 1378 if v, err := iprot.ReadI32(ctx); err != nil { 1379 return thrift.PrependError("error reading field 1: ", err) 1380 } else { 1381 p.Iterator = v 1382 } 1383 return nil 1384 } 1385 1386 func (p *FindSecondaryReturn) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 1387 p.Primary = &Uint64{} 1388 if err := p.Primary.Read(ctx, iprot); err != nil { 1389 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 1390 } 1391 return nil 1392 } 1393 1394 func (p *FindSecondaryReturn) Write(ctx context.Context, oprot thrift.TProtocol) error { 1395 if err := oprot.WriteStructBegin(ctx, "FindSecondaryReturn"); err != nil { 1396 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 1397 if p != nil { 1398 if err := p.writeField1(ctx, oprot); err != nil { return err } 1399 if err := p.writeField2(ctx, oprot); err != nil { return err } 1400 } 1401 if err := oprot.WriteFieldStop(ctx); err != nil { 1402 return thrift.PrependError("write field stop error: ", err) } 1403 if err := oprot.WriteStructEnd(ctx); err != nil { 1404 return thrift.PrependError("write struct stop error: ", err) } 1405 return nil 1406 } 1407 1408 func (p *FindSecondaryReturn) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 1409 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 1410 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 1411 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 1412 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 1413 if err := oprot.WriteFieldEnd(ctx); err != nil { 1414 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 1415 return err 1416 } 1417 1418 func (p *FindSecondaryReturn) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 1419 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 2); err != nil { 1420 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:primary: ", p), err) } 1421 if err := p.Primary.Write(ctx, oprot); err != nil { 1422 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 1423 } 1424 if err := oprot.WriteFieldEnd(ctx); err != nil { 1425 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:primary: ", p), err) } 1426 return err 1427 } 1428 1429 func (p *FindSecondaryReturn) Equals(other *FindSecondaryReturn) bool { 1430 if p == other { 1431 return true 1432 } else if p == nil || other == nil { 1433 return false 1434 } 1435 if p.Iterator != other.Iterator { return false } 1436 if !p.Primary.Equals(other.Primary) { return false } 1437 return true 1438 } 1439 1440 func (p *FindSecondaryReturn) String() string { 1441 if p == nil { 1442 return "<nil>" 1443 } 1444 return fmt.Sprintf("FindSecondaryReturn(%+v)", *p) 1445 } 1446 1447 // Attributes: 1448 // - Iterator 1449 // - Secondary 1450 // - Primary 1451 type LowerBoundUpperBoundReturn struct { 1452 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 1453 Secondary []byte `thrift:"secondary,2" db:"secondary" json:"secondary"` 1454 Primary *Uint64 `thrift:"primary,3" db:"primary" json:"primary"` 1455 } 1456 1457 func NewLowerBoundUpperBoundReturn() *LowerBoundUpperBoundReturn { 1458 return &LowerBoundUpperBoundReturn{} 1459 } 1460 1461 1462 func (p *LowerBoundUpperBoundReturn) GetIterator() int32 { 1463 return p.Iterator 1464 } 1465 1466 func (p *LowerBoundUpperBoundReturn) GetSecondary() []byte { 1467 return p.Secondary 1468 } 1469 var LowerBoundUpperBoundReturn_Primary_DEFAULT *Uint64 1470 func (p *LowerBoundUpperBoundReturn) GetPrimary() *Uint64 { 1471 if !p.IsSetPrimary() { 1472 return LowerBoundUpperBoundReturn_Primary_DEFAULT 1473 } 1474 return p.Primary 1475 } 1476 func (p *LowerBoundUpperBoundReturn) IsSetPrimary() bool { 1477 return p.Primary != nil 1478 } 1479 1480 func (p *LowerBoundUpperBoundReturn) Read(ctx context.Context, iprot thrift.TProtocol) error { 1481 if _, err := iprot.ReadStructBegin(ctx); err != nil { 1482 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 1483 } 1484 1485 1486 for { 1487 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 1488 if err != nil { 1489 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 1490 } 1491 if fieldTypeId == thrift.STOP { break; } 1492 switch fieldId { 1493 case 1: 1494 if fieldTypeId == thrift.I32 { 1495 if err := p.ReadField1(ctx, iprot); err != nil { 1496 return err 1497 } 1498 } else { 1499 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1500 return err 1501 } 1502 } 1503 case 2: 1504 if fieldTypeId == thrift.STRING { 1505 if err := p.ReadField2(ctx, iprot); err != nil { 1506 return err 1507 } 1508 } else { 1509 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1510 return err 1511 } 1512 } 1513 case 3: 1514 if fieldTypeId == thrift.STRUCT { 1515 if err := p.ReadField3(ctx, iprot); err != nil { 1516 return err 1517 } 1518 } else { 1519 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1520 return err 1521 } 1522 } 1523 default: 1524 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1525 return err 1526 } 1527 } 1528 if err := iprot.ReadFieldEnd(ctx); err != nil { 1529 return err 1530 } 1531 } 1532 if err := iprot.ReadStructEnd(ctx); err != nil { 1533 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 1534 } 1535 return nil 1536 } 1537 1538 func (p *LowerBoundUpperBoundReturn) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 1539 if v, err := iprot.ReadI32(ctx); err != nil { 1540 return thrift.PrependError("error reading field 1: ", err) 1541 } else { 1542 p.Iterator = v 1543 } 1544 return nil 1545 } 1546 1547 func (p *LowerBoundUpperBoundReturn) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 1548 if v, err := iprot.ReadBinary(ctx); err != nil { 1549 return thrift.PrependError("error reading field 2: ", err) 1550 } else { 1551 p.Secondary = v 1552 } 1553 return nil 1554 } 1555 1556 func (p *LowerBoundUpperBoundReturn) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 1557 p.Primary = &Uint64{} 1558 if err := p.Primary.Read(ctx, iprot); err != nil { 1559 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 1560 } 1561 return nil 1562 } 1563 1564 func (p *LowerBoundUpperBoundReturn) Write(ctx context.Context, oprot thrift.TProtocol) error { 1565 if err := oprot.WriteStructBegin(ctx, "LowerBoundUpperBoundReturn"); err != nil { 1566 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 1567 if p != nil { 1568 if err := p.writeField1(ctx, oprot); err != nil { return err } 1569 if err := p.writeField2(ctx, oprot); err != nil { return err } 1570 if err := p.writeField3(ctx, oprot); err != nil { return err } 1571 } 1572 if err := oprot.WriteFieldStop(ctx); err != nil { 1573 return thrift.PrependError("write field stop error: ", err) } 1574 if err := oprot.WriteStructEnd(ctx); err != nil { 1575 return thrift.PrependError("write struct stop error: ", err) } 1576 return nil 1577 } 1578 1579 func (p *LowerBoundUpperBoundReturn) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 1580 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 1581 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 1582 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 1583 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 1584 if err := oprot.WriteFieldEnd(ctx); err != nil { 1585 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 1586 return err 1587 } 1588 1589 func (p *LowerBoundUpperBoundReturn) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 1590 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 2); err != nil { 1591 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:secondary: ", p), err) } 1592 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 1593 return thrift.PrependError(fmt.Sprintf("%T.secondary (2) field write error: ", p), err) } 1594 if err := oprot.WriteFieldEnd(ctx); err != nil { 1595 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:secondary: ", p), err) } 1596 return err 1597 } 1598 1599 func (p *LowerBoundUpperBoundReturn) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 1600 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 3); err != nil { 1601 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:primary: ", p), err) } 1602 if err := p.Primary.Write(ctx, oprot); err != nil { 1603 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 1604 } 1605 if err := oprot.WriteFieldEnd(ctx); err != nil { 1606 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:primary: ", p), err) } 1607 return err 1608 } 1609 1610 func (p *LowerBoundUpperBoundReturn) Equals(other *LowerBoundUpperBoundReturn) bool { 1611 if p == other { 1612 return true 1613 } else if p == nil || other == nil { 1614 return false 1615 } 1616 if p.Iterator != other.Iterator { return false } 1617 if bytes.Compare(p.Secondary, other.Secondary) != 0 { return false } 1618 if !p.Primary.Equals(other.Primary) { return false } 1619 return true 1620 } 1621 1622 func (p *LowerBoundUpperBoundReturn) String() string { 1623 if p == nil { 1624 return "<nil>" 1625 } 1626 return fmt.Sprintf("LowerBoundUpperBoundReturn(%+v)", *p) 1627 } 1628 1629 // Attributes: 1630 // - RAMBytes 1631 // - NetWeight 1632 // - CPUWeight 1633 type GetResourceLimitsReturn struct { 1634 RAMBytes int64 `thrift:"ram_bytes,1" db:"ram_bytes" json:"ram_bytes"` 1635 NetWeight int64 `thrift:"net_weight,2" db:"net_weight" json:"net_weight"` 1636 CPUWeight int64 `thrift:"cpu_weight,3" db:"cpu_weight" json:"cpu_weight"` 1637 } 1638 1639 func NewGetResourceLimitsReturn() *GetResourceLimitsReturn { 1640 return &GetResourceLimitsReturn{} 1641 } 1642 1643 1644 func (p *GetResourceLimitsReturn) GetRAMBytes() int64 { 1645 return p.RAMBytes 1646 } 1647 1648 func (p *GetResourceLimitsReturn) GetNetWeight() int64 { 1649 return p.NetWeight 1650 } 1651 1652 func (p *GetResourceLimitsReturn) GetCPUWeight() int64 { 1653 return p.CPUWeight 1654 } 1655 func (p *GetResourceLimitsReturn) Read(ctx context.Context, iprot thrift.TProtocol) error { 1656 if _, err := iprot.ReadStructBegin(ctx); err != nil { 1657 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 1658 } 1659 1660 1661 for { 1662 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 1663 if err != nil { 1664 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 1665 } 1666 if fieldTypeId == thrift.STOP { break; } 1667 switch fieldId { 1668 case 1: 1669 if fieldTypeId == thrift.I64 { 1670 if err := p.ReadField1(ctx, iprot); err != nil { 1671 return err 1672 } 1673 } else { 1674 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1675 return err 1676 } 1677 } 1678 case 2: 1679 if fieldTypeId == thrift.I64 { 1680 if err := p.ReadField2(ctx, iprot); err != nil { 1681 return err 1682 } 1683 } else { 1684 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1685 return err 1686 } 1687 } 1688 case 3: 1689 if fieldTypeId == thrift.I64 { 1690 if err := p.ReadField3(ctx, iprot); err != nil { 1691 return err 1692 } 1693 } else { 1694 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1695 return err 1696 } 1697 } 1698 default: 1699 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 1700 return err 1701 } 1702 } 1703 if err := iprot.ReadFieldEnd(ctx); err != nil { 1704 return err 1705 } 1706 } 1707 if err := iprot.ReadStructEnd(ctx); err != nil { 1708 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 1709 } 1710 return nil 1711 } 1712 1713 func (p *GetResourceLimitsReturn) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 1714 if v, err := iprot.ReadI64(ctx); err != nil { 1715 return thrift.PrependError("error reading field 1: ", err) 1716 } else { 1717 p.RAMBytes = v 1718 } 1719 return nil 1720 } 1721 1722 func (p *GetResourceLimitsReturn) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 1723 if v, err := iprot.ReadI64(ctx); err != nil { 1724 return thrift.PrependError("error reading field 2: ", err) 1725 } else { 1726 p.NetWeight = v 1727 } 1728 return nil 1729 } 1730 1731 func (p *GetResourceLimitsReturn) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 1732 if v, err := iprot.ReadI64(ctx); err != nil { 1733 return thrift.PrependError("error reading field 3: ", err) 1734 } else { 1735 p.CPUWeight = v 1736 } 1737 return nil 1738 } 1739 1740 func (p *GetResourceLimitsReturn) Write(ctx context.Context, oprot thrift.TProtocol) error { 1741 if err := oprot.WriteStructBegin(ctx, "GetResourceLimitsReturn"); err != nil { 1742 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 1743 if p != nil { 1744 if err := p.writeField1(ctx, oprot); err != nil { return err } 1745 if err := p.writeField2(ctx, oprot); err != nil { return err } 1746 if err := p.writeField3(ctx, oprot); err != nil { return err } 1747 } 1748 if err := oprot.WriteFieldStop(ctx); err != nil { 1749 return thrift.PrependError("write field stop error: ", err) } 1750 if err := oprot.WriteStructEnd(ctx); err != nil { 1751 return thrift.PrependError("write struct stop error: ", err) } 1752 return nil 1753 } 1754 1755 func (p *GetResourceLimitsReturn) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 1756 if err := oprot.WriteFieldBegin(ctx, "ram_bytes", thrift.I64, 1); err != nil { 1757 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ram_bytes: ", p), err) } 1758 if err := oprot.WriteI64(ctx, int64(p.RAMBytes)); err != nil { 1759 return thrift.PrependError(fmt.Sprintf("%T.ram_bytes (1) field write error: ", p), err) } 1760 if err := oprot.WriteFieldEnd(ctx); err != nil { 1761 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ram_bytes: ", p), err) } 1762 return err 1763 } 1764 1765 func (p *GetResourceLimitsReturn) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 1766 if err := oprot.WriteFieldBegin(ctx, "net_weight", thrift.I64, 2); err != nil { 1767 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:net_weight: ", p), err) } 1768 if err := oprot.WriteI64(ctx, int64(p.NetWeight)); err != nil { 1769 return thrift.PrependError(fmt.Sprintf("%T.net_weight (2) field write error: ", p), err) } 1770 if err := oprot.WriteFieldEnd(ctx); err != nil { 1771 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:net_weight: ", p), err) } 1772 return err 1773 } 1774 1775 func (p *GetResourceLimitsReturn) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 1776 if err := oprot.WriteFieldBegin(ctx, "cpu_weight", thrift.I64, 3); err != nil { 1777 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:cpu_weight: ", p), err) } 1778 if err := oprot.WriteI64(ctx, int64(p.CPUWeight)); err != nil { 1779 return thrift.PrependError(fmt.Sprintf("%T.cpu_weight (3) field write error: ", p), err) } 1780 if err := oprot.WriteFieldEnd(ctx); err != nil { 1781 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:cpu_weight: ", p), err) } 1782 return err 1783 } 1784 1785 func (p *GetResourceLimitsReturn) Equals(other *GetResourceLimitsReturn) bool { 1786 if p == other { 1787 return true 1788 } else if p == nil || other == nil { 1789 return false 1790 } 1791 if p.RAMBytes != other.RAMBytes { return false } 1792 if p.NetWeight != other.NetWeight { return false } 1793 if p.CPUWeight != other.CPUWeight { return false } 1794 return true 1795 } 1796 1797 func (p *GetResourceLimitsReturn) String() string { 1798 if p == nil { 1799 return "<nil>" 1800 } 1801 return fmt.Sprintf("GetResourceLimitsReturn(%+v)", *p) 1802 } 1803 1804 type IPCChainTester interface { 1805 InitVMAPI(ctx context.Context) (_err error) 1806 InitApplyRequest(ctx context.Context) (_err error) 1807 // Parameters: 1808 // - ID 1809 // - Contract 1810 // - Dylib 1811 SetNativeContract(ctx context.Context, id int32, contract string, dylib string) (_r bool, _err error) 1812 // Parameters: 1813 // - Enable 1814 EnableDebugging(ctx context.Context, enable bool) (_err error) 1815 // Parameters: 1816 // - ID 1817 // - Contract 1818 // - Enable 1819 EnableDebugContract(ctx context.Context, id int32, contract string, enable bool) (_err error) 1820 // Parameters: 1821 // - ID 1822 // - Contract 1823 IsDebugContractEnabled(ctx context.Context, id int32, contract string) (_r bool, _err error) 1824 // Parameters: 1825 // - Abi 1826 PackAbi(ctx context.Context, abi string) (_r []byte, _err error) 1827 // Parameters: 1828 // - ID 1829 // - Contract 1830 // - Action 1831 // - ActionArgs_ 1832 PackActionArgs_(ctx context.Context, id int32, contract string, action string, action_args string) (_r []byte, _err error) 1833 // Parameters: 1834 // - ID 1835 // - Contract 1836 // - Action 1837 // - RawArgs_ 1838 UnpackActionArgs_(ctx context.Context, id int32, contract string, action string, raw_args []byte) (_r []byte, _err error) 1839 // Parameters: 1840 // - Initialize 1841 NewChain_(ctx context.Context, initialize bool) (_r int32, _err error) 1842 // Parameters: 1843 // - ID 1844 FreeChain(ctx context.Context, id int32) (_r int32, _err error) 1845 // Parameters: 1846 // - ID 1847 GetInfo(ctx context.Context, id int32) (_r string, _err error) 1848 // Parameters: 1849 // - KeyType 1850 CreateKey(ctx context.Context, key_type string) (_r string, _err error) 1851 // Parameters: 1852 // - ID 1853 // - Account 1854 GetAccount(ctx context.Context, id int32, account string) (_r string, _err error) 1855 // Parameters: 1856 // - ID 1857 // - Creator 1858 // - Account 1859 // - OwnerKey 1860 // - ActiveKey 1861 // - RAMBytes 1862 // - StakeNet 1863 // - StakeCPU 1864 CreateAccount(ctx context.Context, id int32, creator string, account string, owner_key string, active_key string, ram_bytes int64, stake_net int64, stake_cpu int64) (_r string, _err error) 1865 // Parameters: 1866 // - ID 1867 // - PubKey 1868 // - PrivKey 1869 ImportKey(ctx context.Context, id int32, pub_key string, priv_key string) (_r bool, _err error) 1870 // Parameters: 1871 // - ID 1872 // - Transaction 1873 // - AvailableKeys 1874 GetRequiredKeys(ctx context.Context, id int32, transaction string, available_keys []string) (_r string, _err error) 1875 // Parameters: 1876 // - ID 1877 // - NextBlockSkipSeconds 1878 ProduceBlock(ctx context.Context, id int32, next_block_skip_seconds int64) (_err error) 1879 // Parameters: 1880 // - ID 1881 // - Account 1882 // - Action 1883 // - Arguments 1884 // - Permissions 1885 PushAction(ctx context.Context, id int32, account string, action string, arguments *ActionArguments, permissions string) (_r []byte, _err error) 1886 // Parameters: 1887 // - ID 1888 // - Actions 1889 PushActions(ctx context.Context, id int32, actions []*Action) (_r []byte, _err error) 1890 // Parameters: 1891 // - ID 1892 // - Account 1893 // - Wasm 1894 // - Abi 1895 DeployContract(ctx context.Context, id int32, account string, wasm string, abi string) (_r []byte, _err error) 1896 // Parameters: 1897 // - ID 1898 // - JSON 1899 // - Code 1900 // - Scope 1901 // - Table 1902 // - LowerBound 1903 // - UpperBound 1904 // - Limit 1905 // - KeyType 1906 // - IndexPosition 1907 // - EncodeType 1908 // - Reverse 1909 // - ShowPayer 1910 GetTableRows(ctx context.Context, id int32, json bool, code string, scope string, table string, lower_bound string, upper_bound string, limit int64, key_type string, index_position string, encode_type string, reverse bool, show_payer bool) (_r string, _err error) 1911 } 1912 1913 type IPCChainTesterClient struct { 1914 c thrift.TClient 1915 meta thrift.ResponseMeta 1916 } 1917 1918 func NewIPCChainTesterClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *IPCChainTesterClient { 1919 return &IPCChainTesterClient{ 1920 c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), 1921 } 1922 } 1923 1924 func NewIPCChainTesterClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *IPCChainTesterClient { 1925 return &IPCChainTesterClient{ 1926 c: thrift.NewTStandardClient(iprot, oprot), 1927 } 1928 } 1929 1930 func NewIPCChainTesterClient(c thrift.TClient) *IPCChainTesterClient { 1931 return &IPCChainTesterClient{ 1932 c: c, 1933 } 1934 } 1935 1936 func (p *IPCChainTesterClient) Client_() thrift.TClient { 1937 return p.c 1938 } 1939 1940 func (p *IPCChainTesterClient) LastResponseMeta_() thrift.ResponseMeta { 1941 return p.meta 1942 } 1943 1944 func (p *IPCChainTesterClient) SetLastResponseMeta_(meta thrift.ResponseMeta) { 1945 p.meta = meta 1946 } 1947 1948 func (p *IPCChainTesterClient) InitVMAPI(ctx context.Context) (_err error) { 1949 var _args0 IPCChainTesterInitVMAPIArgs 1950 p.SetLastResponseMeta_(thrift.ResponseMeta{}) 1951 if _, err := p.Client_().Call(ctx, "init_vm_api", &_args0, nil); err != nil { 1952 return err 1953 } 1954 return nil 1955 } 1956 1957 func (p *IPCChainTesterClient) InitApplyRequest(ctx context.Context) (_err error) { 1958 var _args1 IPCChainTesterInitApplyRequestArgs 1959 p.SetLastResponseMeta_(thrift.ResponseMeta{}) 1960 if _, err := p.Client_().Call(ctx, "init_apply_request", &_args1, nil); err != nil { 1961 return err 1962 } 1963 return nil 1964 } 1965 1966 // Parameters: 1967 // - ID 1968 // - Contract 1969 // - Dylib 1970 func (p *IPCChainTesterClient) SetNativeContract(ctx context.Context, id int32, contract string, dylib string) (_r bool, _err error) { 1971 var _args2 IPCChainTesterSetNativeContractArgs 1972 _args2.ID = id 1973 _args2.Contract = contract 1974 _args2.Dylib = dylib 1975 var _result4 IPCChainTesterSetNativeContractResult 1976 var _meta3 thrift.ResponseMeta 1977 _meta3, _err = p.Client_().Call(ctx, "set_native_contract", &_args2, &_result4) 1978 p.SetLastResponseMeta_(_meta3) 1979 if _err != nil { 1980 return 1981 } 1982 return _result4.GetSuccess(), nil 1983 } 1984 1985 // Parameters: 1986 // - Enable 1987 func (p *IPCChainTesterClient) EnableDebugging(ctx context.Context, enable bool) (_err error) { 1988 var _args5 IPCChainTesterEnableDebuggingArgs 1989 _args5.Enable = enable 1990 var _result7 IPCChainTesterEnableDebuggingResult 1991 var _meta6 thrift.ResponseMeta 1992 _meta6, _err = p.Client_().Call(ctx, "enable_debugging", &_args5, &_result7) 1993 p.SetLastResponseMeta_(_meta6) 1994 if _err != nil { 1995 return 1996 } 1997 return nil 1998 } 1999 2000 // Parameters: 2001 // - ID 2002 // - Contract 2003 // - Enable 2004 func (p *IPCChainTesterClient) EnableDebugContract(ctx context.Context, id int32, contract string, enable bool) (_err error) { 2005 var _args8 IPCChainTesterEnableDebugContractArgs 2006 _args8.ID = id 2007 _args8.Contract = contract 2008 _args8.Enable = enable 2009 var _result10 IPCChainTesterEnableDebugContractResult 2010 var _meta9 thrift.ResponseMeta 2011 _meta9, _err = p.Client_().Call(ctx, "enable_debug_contract", &_args8, &_result10) 2012 p.SetLastResponseMeta_(_meta9) 2013 if _err != nil { 2014 return 2015 } 2016 return nil 2017 } 2018 2019 // Parameters: 2020 // - ID 2021 // - Contract 2022 func (p *IPCChainTesterClient) IsDebugContractEnabled(ctx context.Context, id int32, contract string) (_r bool, _err error) { 2023 var _args11 IPCChainTesterIsDebugContractEnabledArgs 2024 _args11.ID = id 2025 _args11.Contract = contract 2026 var _result13 IPCChainTesterIsDebugContractEnabledResult 2027 var _meta12 thrift.ResponseMeta 2028 _meta12, _err = p.Client_().Call(ctx, "is_debug_contract_enabled", &_args11, &_result13) 2029 p.SetLastResponseMeta_(_meta12) 2030 if _err != nil { 2031 return 2032 } 2033 return _result13.GetSuccess(), nil 2034 } 2035 2036 // Parameters: 2037 // - Abi 2038 func (p *IPCChainTesterClient) PackAbi(ctx context.Context, abi string) (_r []byte, _err error) { 2039 var _args14 IPCChainTesterPackAbiArgs 2040 _args14.Abi = abi 2041 var _result16 IPCChainTesterPackAbiResult 2042 var _meta15 thrift.ResponseMeta 2043 _meta15, _err = p.Client_().Call(ctx, "pack_abi", &_args14, &_result16) 2044 p.SetLastResponseMeta_(_meta15) 2045 if _err != nil { 2046 return 2047 } 2048 return _result16.GetSuccess(), nil 2049 } 2050 2051 // Parameters: 2052 // - ID 2053 // - Contract 2054 // - Action 2055 // - ActionArgs_ 2056 func (p *IPCChainTesterClient) PackActionArgs_(ctx context.Context, id int32, contract string, action string, action_args string) (_r []byte, _err error) { 2057 var _args17 IPCChainTesterPackActionArgsArgs 2058 _args17.ID = id 2059 _args17.Contract = contract 2060 _args17.Action = action 2061 _args17.ActionArgs_ = action_args 2062 var _result19 IPCChainTesterPackActionArgsResult 2063 var _meta18 thrift.ResponseMeta 2064 _meta18, _err = p.Client_().Call(ctx, "pack_action_args", &_args17, &_result19) 2065 p.SetLastResponseMeta_(_meta18) 2066 if _err != nil { 2067 return 2068 } 2069 return _result19.GetSuccess(), nil 2070 } 2071 2072 // Parameters: 2073 // - ID 2074 // - Contract 2075 // - Action 2076 // - RawArgs_ 2077 func (p *IPCChainTesterClient) UnpackActionArgs_(ctx context.Context, id int32, contract string, action string, raw_args []byte) (_r []byte, _err error) { 2078 var _args20 IPCChainTesterUnpackActionArgsArgs 2079 _args20.ID = id 2080 _args20.Contract = contract 2081 _args20.Action = action 2082 _args20.RawArgs_ = raw_args 2083 var _result22 IPCChainTesterUnpackActionArgsResult 2084 var _meta21 thrift.ResponseMeta 2085 _meta21, _err = p.Client_().Call(ctx, "unpack_action_args", &_args20, &_result22) 2086 p.SetLastResponseMeta_(_meta21) 2087 if _err != nil { 2088 return 2089 } 2090 return _result22.GetSuccess(), nil 2091 } 2092 2093 // Parameters: 2094 // - Initialize 2095 func (p *IPCChainTesterClient) NewChain_(ctx context.Context, initialize bool) (_r int32, _err error) { 2096 var _args23 IPCChainTesterNewChainArgs_ 2097 _args23.Initialize = initialize 2098 var _result25 IPCChainTesterNewChainResult_ 2099 var _meta24 thrift.ResponseMeta 2100 _meta24, _err = p.Client_().Call(ctx, "new_chain", &_args23, &_result25) 2101 p.SetLastResponseMeta_(_meta24) 2102 if _err != nil { 2103 return 2104 } 2105 return _result25.GetSuccess(), nil 2106 } 2107 2108 // Parameters: 2109 // - ID 2110 func (p *IPCChainTesterClient) FreeChain(ctx context.Context, id int32) (_r int32, _err error) { 2111 var _args26 IPCChainTesterFreeChainArgs 2112 _args26.ID = id 2113 var _result28 IPCChainTesterFreeChainResult 2114 var _meta27 thrift.ResponseMeta 2115 _meta27, _err = p.Client_().Call(ctx, "free_chain", &_args26, &_result28) 2116 p.SetLastResponseMeta_(_meta27) 2117 if _err != nil { 2118 return 2119 } 2120 return _result28.GetSuccess(), nil 2121 } 2122 2123 // Parameters: 2124 // - ID 2125 func (p *IPCChainTesterClient) GetInfo(ctx context.Context, id int32) (_r string, _err error) { 2126 var _args29 IPCChainTesterGetInfoArgs 2127 _args29.ID = id 2128 var _result31 IPCChainTesterGetInfoResult 2129 var _meta30 thrift.ResponseMeta 2130 _meta30, _err = p.Client_().Call(ctx, "get_info", &_args29, &_result31) 2131 p.SetLastResponseMeta_(_meta30) 2132 if _err != nil { 2133 return 2134 } 2135 return _result31.GetSuccess(), nil 2136 } 2137 2138 // Parameters: 2139 // - KeyType 2140 func (p *IPCChainTesterClient) CreateKey(ctx context.Context, key_type string) (_r string, _err error) { 2141 var _args32 IPCChainTesterCreateKeyArgs 2142 _args32.KeyType = key_type 2143 var _result34 IPCChainTesterCreateKeyResult 2144 var _meta33 thrift.ResponseMeta 2145 _meta33, _err = p.Client_().Call(ctx, "create_key", &_args32, &_result34) 2146 p.SetLastResponseMeta_(_meta33) 2147 if _err != nil { 2148 return 2149 } 2150 return _result34.GetSuccess(), nil 2151 } 2152 2153 // Parameters: 2154 // - ID 2155 // - Account 2156 func (p *IPCChainTesterClient) GetAccount(ctx context.Context, id int32, account string) (_r string, _err error) { 2157 var _args35 IPCChainTesterGetAccountArgs 2158 _args35.ID = id 2159 _args35.Account = account 2160 var _result37 IPCChainTesterGetAccountResult 2161 var _meta36 thrift.ResponseMeta 2162 _meta36, _err = p.Client_().Call(ctx, "get_account", &_args35, &_result37) 2163 p.SetLastResponseMeta_(_meta36) 2164 if _err != nil { 2165 return 2166 } 2167 return _result37.GetSuccess(), nil 2168 } 2169 2170 // Parameters: 2171 // - ID 2172 // - Creator 2173 // - Account 2174 // - OwnerKey 2175 // - ActiveKey 2176 // - RAMBytes 2177 // - StakeNet 2178 // - StakeCPU 2179 func (p *IPCChainTesterClient) CreateAccount(ctx context.Context, id int32, creator string, account string, owner_key string, active_key string, ram_bytes int64, stake_net int64, stake_cpu int64) (_r string, _err error) { 2180 var _args38 IPCChainTesterCreateAccountArgs 2181 _args38.ID = id 2182 _args38.Creator = creator 2183 _args38.Account = account 2184 _args38.OwnerKey = owner_key 2185 _args38.ActiveKey = active_key 2186 _args38.RAMBytes = ram_bytes 2187 _args38.StakeNet = stake_net 2188 _args38.StakeCPU = stake_cpu 2189 var _result40 IPCChainTesterCreateAccountResult 2190 var _meta39 thrift.ResponseMeta 2191 _meta39, _err = p.Client_().Call(ctx, "create_account", &_args38, &_result40) 2192 p.SetLastResponseMeta_(_meta39) 2193 if _err != nil { 2194 return 2195 } 2196 return _result40.GetSuccess(), nil 2197 } 2198 2199 // Parameters: 2200 // - ID 2201 // - PubKey 2202 // - PrivKey 2203 func (p *IPCChainTesterClient) ImportKey(ctx context.Context, id int32, pub_key string, priv_key string) (_r bool, _err error) { 2204 var _args41 IPCChainTesterImportKeyArgs 2205 _args41.ID = id 2206 _args41.PubKey = pub_key 2207 _args41.PrivKey = priv_key 2208 var _result43 IPCChainTesterImportKeyResult 2209 var _meta42 thrift.ResponseMeta 2210 _meta42, _err = p.Client_().Call(ctx, "import_key", &_args41, &_result43) 2211 p.SetLastResponseMeta_(_meta42) 2212 if _err != nil { 2213 return 2214 } 2215 return _result43.GetSuccess(), nil 2216 } 2217 2218 // Parameters: 2219 // - ID 2220 // - Transaction 2221 // - AvailableKeys 2222 func (p *IPCChainTesterClient) GetRequiredKeys(ctx context.Context, id int32, transaction string, available_keys []string) (_r string, _err error) { 2223 var _args44 IPCChainTesterGetRequiredKeysArgs 2224 _args44.ID = id 2225 _args44.Transaction = transaction 2226 _args44.AvailableKeys = available_keys 2227 var _result46 IPCChainTesterGetRequiredKeysResult 2228 var _meta45 thrift.ResponseMeta 2229 _meta45, _err = p.Client_().Call(ctx, "get_required_keys", &_args44, &_result46) 2230 p.SetLastResponseMeta_(_meta45) 2231 if _err != nil { 2232 return 2233 } 2234 return _result46.GetSuccess(), nil 2235 } 2236 2237 // Parameters: 2238 // - ID 2239 // - NextBlockSkipSeconds 2240 func (p *IPCChainTesterClient) ProduceBlock(ctx context.Context, id int32, next_block_skip_seconds int64) (_err error) { 2241 var _args47 IPCChainTesterProduceBlockArgs 2242 _args47.ID = id 2243 _args47.NextBlockSkipSeconds = next_block_skip_seconds 2244 var _result49 IPCChainTesterProduceBlockResult 2245 var _meta48 thrift.ResponseMeta 2246 _meta48, _err = p.Client_().Call(ctx, "produce_block", &_args47, &_result49) 2247 p.SetLastResponseMeta_(_meta48) 2248 if _err != nil { 2249 return 2250 } 2251 return nil 2252 } 2253 2254 // Parameters: 2255 // - ID 2256 // - Account 2257 // - Action 2258 // - Arguments 2259 // - Permissions 2260 func (p *IPCChainTesterClient) PushAction(ctx context.Context, id int32, account string, action string, arguments *ActionArguments, permissions string) (_r []byte, _err error) { 2261 var _args50 IPCChainTesterPushActionArgs 2262 _args50.ID = id 2263 _args50.Account = account 2264 _args50.Action = action 2265 _args50.Arguments = arguments 2266 _args50.Permissions = permissions 2267 var _result52 IPCChainTesterPushActionResult 2268 var _meta51 thrift.ResponseMeta 2269 _meta51, _err = p.Client_().Call(ctx, "push_action", &_args50, &_result52) 2270 p.SetLastResponseMeta_(_meta51) 2271 if _err != nil { 2272 return 2273 } 2274 return _result52.GetSuccess(), nil 2275 } 2276 2277 // Parameters: 2278 // - ID 2279 // - Actions 2280 func (p *IPCChainTesterClient) PushActions(ctx context.Context, id int32, actions []*Action) (_r []byte, _err error) { 2281 var _args53 IPCChainTesterPushActionsArgs 2282 _args53.ID = id 2283 _args53.Actions = actions 2284 var _result55 IPCChainTesterPushActionsResult 2285 var _meta54 thrift.ResponseMeta 2286 _meta54, _err = p.Client_().Call(ctx, "push_actions", &_args53, &_result55) 2287 p.SetLastResponseMeta_(_meta54) 2288 if _err != nil { 2289 return 2290 } 2291 return _result55.GetSuccess(), nil 2292 } 2293 2294 // Parameters: 2295 // - ID 2296 // - Account 2297 // - Wasm 2298 // - Abi 2299 func (p *IPCChainTesterClient) DeployContract(ctx context.Context, id int32, account string, wasm string, abi string) (_r []byte, _err error) { 2300 var _args56 IPCChainTesterDeployContractArgs 2301 _args56.ID = id 2302 _args56.Account = account 2303 _args56.Wasm = wasm 2304 _args56.Abi = abi 2305 var _result58 IPCChainTesterDeployContractResult 2306 var _meta57 thrift.ResponseMeta 2307 _meta57, _err = p.Client_().Call(ctx, "deploy_contract", &_args56, &_result58) 2308 p.SetLastResponseMeta_(_meta57) 2309 if _err != nil { 2310 return 2311 } 2312 return _result58.GetSuccess(), nil 2313 } 2314 2315 // Parameters: 2316 // - ID 2317 // - JSON 2318 // - Code 2319 // - Scope 2320 // - Table 2321 // - LowerBound 2322 // - UpperBound 2323 // - Limit 2324 // - KeyType 2325 // - IndexPosition 2326 // - EncodeType 2327 // - Reverse 2328 // - ShowPayer 2329 func (p *IPCChainTesterClient) GetTableRows(ctx context.Context, id int32, json bool, code string, scope string, table string, lower_bound string, upper_bound string, limit int64, key_type string, index_position string, encode_type string, reverse bool, show_payer bool) (_r string, _err error) { 2330 var _args59 IPCChainTesterGetTableRowsArgs 2331 _args59.ID = id 2332 _args59.JSON = json 2333 _args59.Code = code 2334 _args59.Scope = scope 2335 _args59.Table = table 2336 _args59.LowerBound = lower_bound 2337 _args59.UpperBound = upper_bound 2338 _args59.Limit = limit 2339 _args59.KeyType = key_type 2340 _args59.IndexPosition = index_position 2341 _args59.EncodeType = encode_type 2342 _args59.Reverse = reverse 2343 _args59.ShowPayer = show_payer 2344 var _result61 IPCChainTesterGetTableRowsResult 2345 var _meta60 thrift.ResponseMeta 2346 _meta60, _err = p.Client_().Call(ctx, "get_table_rows", &_args59, &_result61) 2347 p.SetLastResponseMeta_(_meta60) 2348 if _err != nil { 2349 return 2350 } 2351 return _result61.GetSuccess(), nil 2352 } 2353 2354 type IPCChainTesterProcessor struct { 2355 processorMap map[string]thrift.TProcessorFunction 2356 handler IPCChainTester 2357 } 2358 2359 func (p *IPCChainTesterProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { 2360 p.processorMap[key] = processor 2361 } 2362 2363 func (p *IPCChainTesterProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { 2364 processor, ok = p.processorMap[key] 2365 return processor, ok 2366 } 2367 2368 func (p *IPCChainTesterProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { 2369 return p.processorMap 2370 } 2371 2372 func NewIPCChainTesterProcessor(handler IPCChainTester) *IPCChainTesterProcessor { 2373 2374 self62 := &IPCChainTesterProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} 2375 self62.processorMap["init_vm_api"] = &iPCChainTesterProcessorInitVMAPI{handler:handler} 2376 self62.processorMap["init_apply_request"] = &iPCChainTesterProcessorInitApplyRequest{handler:handler} 2377 self62.processorMap["set_native_contract"] = &iPCChainTesterProcessorSetNativeContract{handler:handler} 2378 self62.processorMap["enable_debugging"] = &iPCChainTesterProcessorEnableDebugging{handler:handler} 2379 self62.processorMap["enable_debug_contract"] = &iPCChainTesterProcessorEnableDebugContract{handler:handler} 2380 self62.processorMap["is_debug_contract_enabled"] = &iPCChainTesterProcessorIsDebugContractEnabled{handler:handler} 2381 self62.processorMap["pack_abi"] = &iPCChainTesterProcessorPackAbi{handler:handler} 2382 self62.processorMap["pack_action_args"] = &iPCChainTesterProcessorPackActionArgs_{handler:handler} 2383 self62.processorMap["unpack_action_args"] = &iPCChainTesterProcessorUnpackActionArgs_{handler:handler} 2384 self62.processorMap["new_chain"] = &iPCChainTesterProcessorNewChain_{handler:handler} 2385 self62.processorMap["free_chain"] = &iPCChainTesterProcessorFreeChain{handler:handler} 2386 self62.processorMap["get_info"] = &iPCChainTesterProcessorGetInfo{handler:handler} 2387 self62.processorMap["create_key"] = &iPCChainTesterProcessorCreateKey{handler:handler} 2388 self62.processorMap["get_account"] = &iPCChainTesterProcessorGetAccount{handler:handler} 2389 self62.processorMap["create_account"] = &iPCChainTesterProcessorCreateAccount{handler:handler} 2390 self62.processorMap["import_key"] = &iPCChainTesterProcessorImportKey{handler:handler} 2391 self62.processorMap["get_required_keys"] = &iPCChainTesterProcessorGetRequiredKeys{handler:handler} 2392 self62.processorMap["produce_block"] = &iPCChainTesterProcessorProduceBlock{handler:handler} 2393 self62.processorMap["push_action"] = &iPCChainTesterProcessorPushAction{handler:handler} 2394 self62.processorMap["push_actions"] = &iPCChainTesterProcessorPushActions{handler:handler} 2395 self62.processorMap["deploy_contract"] = &iPCChainTesterProcessorDeployContract{handler:handler} 2396 self62.processorMap["get_table_rows"] = &iPCChainTesterProcessorGetTableRows{handler:handler} 2397 return self62 2398 } 2399 2400 func (p *IPCChainTesterProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 2401 name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) 2402 if err2 != nil { return false, thrift.WrapTException(err2) } 2403 if processor, ok := p.GetProcessorFunction(name); ok { 2404 return processor.Process(ctx, seqId, iprot, oprot) 2405 } 2406 iprot.Skip(ctx, thrift.STRUCT) 2407 iprot.ReadMessageEnd(ctx) 2408 x63 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) 2409 oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) 2410 x63.Write(ctx, oprot) 2411 oprot.WriteMessageEnd(ctx) 2412 oprot.Flush(ctx) 2413 return false, x63 2414 2415 } 2416 2417 type iPCChainTesterProcessorInitVMAPI struct { 2418 handler IPCChainTester 2419 } 2420 2421 func (p *iPCChainTesterProcessorInitVMAPI) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 2422 args := IPCChainTesterInitVMAPIArgs{} 2423 var err2 error 2424 if err2 = args.Read(ctx, iprot); err2 != nil { 2425 iprot.ReadMessageEnd(ctx) 2426 return false, thrift.WrapTException(err2) 2427 } 2428 iprot.ReadMessageEnd(ctx) 2429 2430 tickerCancel := func() {} 2431 _ = tickerCancel 2432 2433 if err2 = p.handler.InitVMAPI(ctx); err2 != nil { 2434 tickerCancel() 2435 return true, thrift.WrapTException(err2) 2436 } 2437 tickerCancel() 2438 return true, nil 2439 } 2440 2441 type iPCChainTesterProcessorInitApplyRequest struct { 2442 handler IPCChainTester 2443 } 2444 2445 func (p *iPCChainTesterProcessorInitApplyRequest) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 2446 args := IPCChainTesterInitApplyRequestArgs{} 2447 var err2 error 2448 if err2 = args.Read(ctx, iprot); err2 != nil { 2449 iprot.ReadMessageEnd(ctx) 2450 return false, thrift.WrapTException(err2) 2451 } 2452 iprot.ReadMessageEnd(ctx) 2453 2454 tickerCancel := func() {} 2455 _ = tickerCancel 2456 2457 if err2 = p.handler.InitApplyRequest(ctx); err2 != nil { 2458 tickerCancel() 2459 return true, thrift.WrapTException(err2) 2460 } 2461 tickerCancel() 2462 return true, nil 2463 } 2464 2465 type iPCChainTesterProcessorSetNativeContract struct { 2466 handler IPCChainTester 2467 } 2468 2469 func (p *iPCChainTesterProcessorSetNativeContract) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 2470 args := IPCChainTesterSetNativeContractArgs{} 2471 var err2 error 2472 if err2 = args.Read(ctx, iprot); err2 != nil { 2473 iprot.ReadMessageEnd(ctx) 2474 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 2475 oprot.WriteMessageBegin(ctx, "set_native_contract", thrift.EXCEPTION, seqId) 2476 x.Write(ctx, oprot) 2477 oprot.WriteMessageEnd(ctx) 2478 oprot.Flush(ctx) 2479 return false, thrift.WrapTException(err2) 2480 } 2481 iprot.ReadMessageEnd(ctx) 2482 2483 tickerCancel := func() {} 2484 // Start a goroutine to do server side connectivity check. 2485 if thrift.ServerConnectivityCheckInterval > 0 { 2486 var cancel context.CancelFunc 2487 ctx, cancel = context.WithCancel(ctx) 2488 defer cancel() 2489 var tickerCtx context.Context 2490 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 2491 defer tickerCancel() 2492 go func(ctx context.Context, cancel context.CancelFunc) { 2493 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 2494 defer ticker.Stop() 2495 for { 2496 select { 2497 case <-ctx.Done(): 2498 return 2499 case <-ticker.C: 2500 if !iprot.Transport().IsOpen() { 2501 cancel() 2502 return 2503 } 2504 } 2505 } 2506 }(tickerCtx, cancel) 2507 } 2508 2509 result := IPCChainTesterSetNativeContractResult{} 2510 var retval bool 2511 if retval, err2 = p.handler.SetNativeContract(ctx, args.ID, args.Contract, args.Dylib); err2 != nil { 2512 tickerCancel() 2513 if err2 == thrift.ErrAbandonRequest { 2514 return false, thrift.WrapTException(err2) 2515 } 2516 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing set_native_contract: " + err2.Error()) 2517 oprot.WriteMessageBegin(ctx, "set_native_contract", thrift.EXCEPTION, seqId) 2518 x.Write(ctx, oprot) 2519 oprot.WriteMessageEnd(ctx) 2520 oprot.Flush(ctx) 2521 return true, thrift.WrapTException(err2) 2522 } else { 2523 result.Success = &retval 2524 } 2525 tickerCancel() 2526 if err2 = oprot.WriteMessageBegin(ctx, "set_native_contract", thrift.REPLY, seqId); err2 != nil { 2527 err = thrift.WrapTException(err2) 2528 } 2529 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 2530 err = thrift.WrapTException(err2) 2531 } 2532 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 2533 err = thrift.WrapTException(err2) 2534 } 2535 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 2536 err = thrift.WrapTException(err2) 2537 } 2538 if err != nil { 2539 return 2540 } 2541 return true, err 2542 } 2543 2544 type iPCChainTesterProcessorEnableDebugging struct { 2545 handler IPCChainTester 2546 } 2547 2548 func (p *iPCChainTesterProcessorEnableDebugging) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 2549 args := IPCChainTesterEnableDebuggingArgs{} 2550 var err2 error 2551 if err2 = args.Read(ctx, iprot); err2 != nil { 2552 iprot.ReadMessageEnd(ctx) 2553 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 2554 oprot.WriteMessageBegin(ctx, "enable_debugging", thrift.EXCEPTION, seqId) 2555 x.Write(ctx, oprot) 2556 oprot.WriteMessageEnd(ctx) 2557 oprot.Flush(ctx) 2558 return false, thrift.WrapTException(err2) 2559 } 2560 iprot.ReadMessageEnd(ctx) 2561 2562 tickerCancel := func() {} 2563 // Start a goroutine to do server side connectivity check. 2564 if thrift.ServerConnectivityCheckInterval > 0 { 2565 var cancel context.CancelFunc 2566 ctx, cancel = context.WithCancel(ctx) 2567 defer cancel() 2568 var tickerCtx context.Context 2569 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 2570 defer tickerCancel() 2571 go func(ctx context.Context, cancel context.CancelFunc) { 2572 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 2573 defer ticker.Stop() 2574 for { 2575 select { 2576 case <-ctx.Done(): 2577 return 2578 case <-ticker.C: 2579 if !iprot.Transport().IsOpen() { 2580 cancel() 2581 return 2582 } 2583 } 2584 } 2585 }(tickerCtx, cancel) 2586 } 2587 2588 result := IPCChainTesterEnableDebuggingResult{} 2589 if err2 = p.handler.EnableDebugging(ctx, args.Enable); err2 != nil { 2590 tickerCancel() 2591 if err2 == thrift.ErrAbandonRequest { 2592 return false, thrift.WrapTException(err2) 2593 } 2594 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing enable_debugging: " + err2.Error()) 2595 oprot.WriteMessageBegin(ctx, "enable_debugging", thrift.EXCEPTION, seqId) 2596 x.Write(ctx, oprot) 2597 oprot.WriteMessageEnd(ctx) 2598 oprot.Flush(ctx) 2599 return true, thrift.WrapTException(err2) 2600 } 2601 tickerCancel() 2602 if err2 = oprot.WriteMessageBegin(ctx, "enable_debugging", thrift.REPLY, seqId); err2 != nil { 2603 err = thrift.WrapTException(err2) 2604 } 2605 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 2606 err = thrift.WrapTException(err2) 2607 } 2608 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 2609 err = thrift.WrapTException(err2) 2610 } 2611 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 2612 err = thrift.WrapTException(err2) 2613 } 2614 if err != nil { 2615 return 2616 } 2617 return true, err 2618 } 2619 2620 type iPCChainTesterProcessorEnableDebugContract struct { 2621 handler IPCChainTester 2622 } 2623 2624 func (p *iPCChainTesterProcessorEnableDebugContract) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 2625 args := IPCChainTesterEnableDebugContractArgs{} 2626 var err2 error 2627 if err2 = args.Read(ctx, iprot); err2 != nil { 2628 iprot.ReadMessageEnd(ctx) 2629 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 2630 oprot.WriteMessageBegin(ctx, "enable_debug_contract", thrift.EXCEPTION, seqId) 2631 x.Write(ctx, oprot) 2632 oprot.WriteMessageEnd(ctx) 2633 oprot.Flush(ctx) 2634 return false, thrift.WrapTException(err2) 2635 } 2636 iprot.ReadMessageEnd(ctx) 2637 2638 tickerCancel := func() {} 2639 // Start a goroutine to do server side connectivity check. 2640 if thrift.ServerConnectivityCheckInterval > 0 { 2641 var cancel context.CancelFunc 2642 ctx, cancel = context.WithCancel(ctx) 2643 defer cancel() 2644 var tickerCtx context.Context 2645 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 2646 defer tickerCancel() 2647 go func(ctx context.Context, cancel context.CancelFunc) { 2648 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 2649 defer ticker.Stop() 2650 for { 2651 select { 2652 case <-ctx.Done(): 2653 return 2654 case <-ticker.C: 2655 if !iprot.Transport().IsOpen() { 2656 cancel() 2657 return 2658 } 2659 } 2660 } 2661 }(tickerCtx, cancel) 2662 } 2663 2664 result := IPCChainTesterEnableDebugContractResult{} 2665 if err2 = p.handler.EnableDebugContract(ctx, args.ID, args.Contract, args.Enable); err2 != nil { 2666 tickerCancel() 2667 if err2 == thrift.ErrAbandonRequest { 2668 return false, thrift.WrapTException(err2) 2669 } 2670 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing enable_debug_contract: " + err2.Error()) 2671 oprot.WriteMessageBegin(ctx, "enable_debug_contract", thrift.EXCEPTION, seqId) 2672 x.Write(ctx, oprot) 2673 oprot.WriteMessageEnd(ctx) 2674 oprot.Flush(ctx) 2675 return true, thrift.WrapTException(err2) 2676 } 2677 tickerCancel() 2678 if err2 = oprot.WriteMessageBegin(ctx, "enable_debug_contract", thrift.REPLY, seqId); err2 != nil { 2679 err = thrift.WrapTException(err2) 2680 } 2681 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 2682 err = thrift.WrapTException(err2) 2683 } 2684 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 2685 err = thrift.WrapTException(err2) 2686 } 2687 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 2688 err = thrift.WrapTException(err2) 2689 } 2690 if err != nil { 2691 return 2692 } 2693 return true, err 2694 } 2695 2696 type iPCChainTesterProcessorIsDebugContractEnabled struct { 2697 handler IPCChainTester 2698 } 2699 2700 func (p *iPCChainTesterProcessorIsDebugContractEnabled) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 2701 args := IPCChainTesterIsDebugContractEnabledArgs{} 2702 var err2 error 2703 if err2 = args.Read(ctx, iprot); err2 != nil { 2704 iprot.ReadMessageEnd(ctx) 2705 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 2706 oprot.WriteMessageBegin(ctx, "is_debug_contract_enabled", thrift.EXCEPTION, seqId) 2707 x.Write(ctx, oprot) 2708 oprot.WriteMessageEnd(ctx) 2709 oprot.Flush(ctx) 2710 return false, thrift.WrapTException(err2) 2711 } 2712 iprot.ReadMessageEnd(ctx) 2713 2714 tickerCancel := func() {} 2715 // Start a goroutine to do server side connectivity check. 2716 if thrift.ServerConnectivityCheckInterval > 0 { 2717 var cancel context.CancelFunc 2718 ctx, cancel = context.WithCancel(ctx) 2719 defer cancel() 2720 var tickerCtx context.Context 2721 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 2722 defer tickerCancel() 2723 go func(ctx context.Context, cancel context.CancelFunc) { 2724 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 2725 defer ticker.Stop() 2726 for { 2727 select { 2728 case <-ctx.Done(): 2729 return 2730 case <-ticker.C: 2731 if !iprot.Transport().IsOpen() { 2732 cancel() 2733 return 2734 } 2735 } 2736 } 2737 }(tickerCtx, cancel) 2738 } 2739 2740 result := IPCChainTesterIsDebugContractEnabledResult{} 2741 var retval bool 2742 if retval, err2 = p.handler.IsDebugContractEnabled(ctx, args.ID, args.Contract); err2 != nil { 2743 tickerCancel() 2744 if err2 == thrift.ErrAbandonRequest { 2745 return false, thrift.WrapTException(err2) 2746 } 2747 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing is_debug_contract_enabled: " + err2.Error()) 2748 oprot.WriteMessageBegin(ctx, "is_debug_contract_enabled", thrift.EXCEPTION, seqId) 2749 x.Write(ctx, oprot) 2750 oprot.WriteMessageEnd(ctx) 2751 oprot.Flush(ctx) 2752 return true, thrift.WrapTException(err2) 2753 } else { 2754 result.Success = &retval 2755 } 2756 tickerCancel() 2757 if err2 = oprot.WriteMessageBegin(ctx, "is_debug_contract_enabled", thrift.REPLY, seqId); err2 != nil { 2758 err = thrift.WrapTException(err2) 2759 } 2760 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 2761 err = thrift.WrapTException(err2) 2762 } 2763 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 2764 err = thrift.WrapTException(err2) 2765 } 2766 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 2767 err = thrift.WrapTException(err2) 2768 } 2769 if err != nil { 2770 return 2771 } 2772 return true, err 2773 } 2774 2775 type iPCChainTesterProcessorPackAbi struct { 2776 handler IPCChainTester 2777 } 2778 2779 func (p *iPCChainTesterProcessorPackAbi) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 2780 args := IPCChainTesterPackAbiArgs{} 2781 var err2 error 2782 if err2 = args.Read(ctx, iprot); err2 != nil { 2783 iprot.ReadMessageEnd(ctx) 2784 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 2785 oprot.WriteMessageBegin(ctx, "pack_abi", thrift.EXCEPTION, seqId) 2786 x.Write(ctx, oprot) 2787 oprot.WriteMessageEnd(ctx) 2788 oprot.Flush(ctx) 2789 return false, thrift.WrapTException(err2) 2790 } 2791 iprot.ReadMessageEnd(ctx) 2792 2793 tickerCancel := func() {} 2794 // Start a goroutine to do server side connectivity check. 2795 if thrift.ServerConnectivityCheckInterval > 0 { 2796 var cancel context.CancelFunc 2797 ctx, cancel = context.WithCancel(ctx) 2798 defer cancel() 2799 var tickerCtx context.Context 2800 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 2801 defer tickerCancel() 2802 go func(ctx context.Context, cancel context.CancelFunc) { 2803 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 2804 defer ticker.Stop() 2805 for { 2806 select { 2807 case <-ctx.Done(): 2808 return 2809 case <-ticker.C: 2810 if !iprot.Transport().IsOpen() { 2811 cancel() 2812 return 2813 } 2814 } 2815 } 2816 }(tickerCtx, cancel) 2817 } 2818 2819 result := IPCChainTesterPackAbiResult{} 2820 var retval []byte 2821 if retval, err2 = p.handler.PackAbi(ctx, args.Abi); err2 != nil { 2822 tickerCancel() 2823 if err2 == thrift.ErrAbandonRequest { 2824 return false, thrift.WrapTException(err2) 2825 } 2826 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pack_abi: " + err2.Error()) 2827 oprot.WriteMessageBegin(ctx, "pack_abi", thrift.EXCEPTION, seqId) 2828 x.Write(ctx, oprot) 2829 oprot.WriteMessageEnd(ctx) 2830 oprot.Flush(ctx) 2831 return true, thrift.WrapTException(err2) 2832 } else { 2833 result.Success = retval 2834 } 2835 tickerCancel() 2836 if err2 = oprot.WriteMessageBegin(ctx, "pack_abi", thrift.REPLY, seqId); err2 != nil { 2837 err = thrift.WrapTException(err2) 2838 } 2839 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 2840 err = thrift.WrapTException(err2) 2841 } 2842 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 2843 err = thrift.WrapTException(err2) 2844 } 2845 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 2846 err = thrift.WrapTException(err2) 2847 } 2848 if err != nil { 2849 return 2850 } 2851 return true, err 2852 } 2853 2854 type iPCChainTesterProcessorPackActionArgs_ struct { 2855 handler IPCChainTester 2856 } 2857 2858 func (p *iPCChainTesterProcessorPackActionArgs_) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 2859 args := IPCChainTesterPackActionArgsArgs{} 2860 var err2 error 2861 if err2 = args.Read(ctx, iprot); err2 != nil { 2862 iprot.ReadMessageEnd(ctx) 2863 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 2864 oprot.WriteMessageBegin(ctx, "pack_action_args", thrift.EXCEPTION, seqId) 2865 x.Write(ctx, oprot) 2866 oprot.WriteMessageEnd(ctx) 2867 oprot.Flush(ctx) 2868 return false, thrift.WrapTException(err2) 2869 } 2870 iprot.ReadMessageEnd(ctx) 2871 2872 tickerCancel := func() {} 2873 // Start a goroutine to do server side connectivity check. 2874 if thrift.ServerConnectivityCheckInterval > 0 { 2875 var cancel context.CancelFunc 2876 ctx, cancel = context.WithCancel(ctx) 2877 defer cancel() 2878 var tickerCtx context.Context 2879 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 2880 defer tickerCancel() 2881 go func(ctx context.Context, cancel context.CancelFunc) { 2882 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 2883 defer ticker.Stop() 2884 for { 2885 select { 2886 case <-ctx.Done(): 2887 return 2888 case <-ticker.C: 2889 if !iprot.Transport().IsOpen() { 2890 cancel() 2891 return 2892 } 2893 } 2894 } 2895 }(tickerCtx, cancel) 2896 } 2897 2898 result := IPCChainTesterPackActionArgsResult{} 2899 var retval []byte 2900 if retval, err2 = p.handler.PackActionArgs_(ctx, args.ID, args.Contract, args.Action, args.ActionArgs_); err2 != nil { 2901 tickerCancel() 2902 if err2 == thrift.ErrAbandonRequest { 2903 return false, thrift.WrapTException(err2) 2904 } 2905 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing pack_action_args: " + err2.Error()) 2906 oprot.WriteMessageBegin(ctx, "pack_action_args", thrift.EXCEPTION, seqId) 2907 x.Write(ctx, oprot) 2908 oprot.WriteMessageEnd(ctx) 2909 oprot.Flush(ctx) 2910 return true, thrift.WrapTException(err2) 2911 } else { 2912 result.Success = retval 2913 } 2914 tickerCancel() 2915 if err2 = oprot.WriteMessageBegin(ctx, "pack_action_args", thrift.REPLY, seqId); err2 != nil { 2916 err = thrift.WrapTException(err2) 2917 } 2918 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 2919 err = thrift.WrapTException(err2) 2920 } 2921 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 2922 err = thrift.WrapTException(err2) 2923 } 2924 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 2925 err = thrift.WrapTException(err2) 2926 } 2927 if err != nil { 2928 return 2929 } 2930 return true, err 2931 } 2932 2933 type iPCChainTesterProcessorUnpackActionArgs_ struct { 2934 handler IPCChainTester 2935 } 2936 2937 func (p *iPCChainTesterProcessorUnpackActionArgs_) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 2938 args := IPCChainTesterUnpackActionArgsArgs{} 2939 var err2 error 2940 if err2 = args.Read(ctx, iprot); err2 != nil { 2941 iprot.ReadMessageEnd(ctx) 2942 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 2943 oprot.WriteMessageBegin(ctx, "unpack_action_args", thrift.EXCEPTION, seqId) 2944 x.Write(ctx, oprot) 2945 oprot.WriteMessageEnd(ctx) 2946 oprot.Flush(ctx) 2947 return false, thrift.WrapTException(err2) 2948 } 2949 iprot.ReadMessageEnd(ctx) 2950 2951 tickerCancel := func() {} 2952 // Start a goroutine to do server side connectivity check. 2953 if thrift.ServerConnectivityCheckInterval > 0 { 2954 var cancel context.CancelFunc 2955 ctx, cancel = context.WithCancel(ctx) 2956 defer cancel() 2957 var tickerCtx context.Context 2958 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 2959 defer tickerCancel() 2960 go func(ctx context.Context, cancel context.CancelFunc) { 2961 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 2962 defer ticker.Stop() 2963 for { 2964 select { 2965 case <-ctx.Done(): 2966 return 2967 case <-ticker.C: 2968 if !iprot.Transport().IsOpen() { 2969 cancel() 2970 return 2971 } 2972 } 2973 } 2974 }(tickerCtx, cancel) 2975 } 2976 2977 result := IPCChainTesterUnpackActionArgsResult{} 2978 var retval []byte 2979 if retval, err2 = p.handler.UnpackActionArgs_(ctx, args.ID, args.Contract, args.Action, args.RawArgs_); err2 != nil { 2980 tickerCancel() 2981 if err2 == thrift.ErrAbandonRequest { 2982 return false, thrift.WrapTException(err2) 2983 } 2984 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing unpack_action_args: " + err2.Error()) 2985 oprot.WriteMessageBegin(ctx, "unpack_action_args", thrift.EXCEPTION, seqId) 2986 x.Write(ctx, oprot) 2987 oprot.WriteMessageEnd(ctx) 2988 oprot.Flush(ctx) 2989 return true, thrift.WrapTException(err2) 2990 } else { 2991 result.Success = retval 2992 } 2993 tickerCancel() 2994 if err2 = oprot.WriteMessageBegin(ctx, "unpack_action_args", thrift.REPLY, seqId); err2 != nil { 2995 err = thrift.WrapTException(err2) 2996 } 2997 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 2998 err = thrift.WrapTException(err2) 2999 } 3000 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3001 err = thrift.WrapTException(err2) 3002 } 3003 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3004 err = thrift.WrapTException(err2) 3005 } 3006 if err != nil { 3007 return 3008 } 3009 return true, err 3010 } 3011 3012 type iPCChainTesterProcessorNewChain_ struct { 3013 handler IPCChainTester 3014 } 3015 3016 func (p *iPCChainTesterProcessorNewChain_) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3017 args := IPCChainTesterNewChainArgs_{} 3018 var err2 error 3019 if err2 = args.Read(ctx, iprot); err2 != nil { 3020 iprot.ReadMessageEnd(ctx) 3021 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3022 oprot.WriteMessageBegin(ctx, "new_chain", thrift.EXCEPTION, seqId) 3023 x.Write(ctx, oprot) 3024 oprot.WriteMessageEnd(ctx) 3025 oprot.Flush(ctx) 3026 return false, thrift.WrapTException(err2) 3027 } 3028 iprot.ReadMessageEnd(ctx) 3029 3030 tickerCancel := func() {} 3031 // Start a goroutine to do server side connectivity check. 3032 if thrift.ServerConnectivityCheckInterval > 0 { 3033 var cancel context.CancelFunc 3034 ctx, cancel = context.WithCancel(ctx) 3035 defer cancel() 3036 var tickerCtx context.Context 3037 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3038 defer tickerCancel() 3039 go func(ctx context.Context, cancel context.CancelFunc) { 3040 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3041 defer ticker.Stop() 3042 for { 3043 select { 3044 case <-ctx.Done(): 3045 return 3046 case <-ticker.C: 3047 if !iprot.Transport().IsOpen() { 3048 cancel() 3049 return 3050 } 3051 } 3052 } 3053 }(tickerCtx, cancel) 3054 } 3055 3056 result := IPCChainTesterNewChainResult_{} 3057 var retval int32 3058 if retval, err2 = p.handler.NewChain_(ctx, args.Initialize); err2 != nil { 3059 tickerCancel() 3060 if err2 == thrift.ErrAbandonRequest { 3061 return false, thrift.WrapTException(err2) 3062 } 3063 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing new_chain: " + err2.Error()) 3064 oprot.WriteMessageBegin(ctx, "new_chain", thrift.EXCEPTION, seqId) 3065 x.Write(ctx, oprot) 3066 oprot.WriteMessageEnd(ctx) 3067 oprot.Flush(ctx) 3068 return true, thrift.WrapTException(err2) 3069 } else { 3070 result.Success = &retval 3071 } 3072 tickerCancel() 3073 if err2 = oprot.WriteMessageBegin(ctx, "new_chain", thrift.REPLY, seqId); err2 != nil { 3074 err = thrift.WrapTException(err2) 3075 } 3076 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 3077 err = thrift.WrapTException(err2) 3078 } 3079 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3080 err = thrift.WrapTException(err2) 3081 } 3082 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3083 err = thrift.WrapTException(err2) 3084 } 3085 if err != nil { 3086 return 3087 } 3088 return true, err 3089 } 3090 3091 type iPCChainTesterProcessorFreeChain struct { 3092 handler IPCChainTester 3093 } 3094 3095 func (p *iPCChainTesterProcessorFreeChain) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3096 args := IPCChainTesterFreeChainArgs{} 3097 var err2 error 3098 if err2 = args.Read(ctx, iprot); err2 != nil { 3099 iprot.ReadMessageEnd(ctx) 3100 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3101 oprot.WriteMessageBegin(ctx, "free_chain", thrift.EXCEPTION, seqId) 3102 x.Write(ctx, oprot) 3103 oprot.WriteMessageEnd(ctx) 3104 oprot.Flush(ctx) 3105 return false, thrift.WrapTException(err2) 3106 } 3107 iprot.ReadMessageEnd(ctx) 3108 3109 tickerCancel := func() {} 3110 // Start a goroutine to do server side connectivity check. 3111 if thrift.ServerConnectivityCheckInterval > 0 { 3112 var cancel context.CancelFunc 3113 ctx, cancel = context.WithCancel(ctx) 3114 defer cancel() 3115 var tickerCtx context.Context 3116 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3117 defer tickerCancel() 3118 go func(ctx context.Context, cancel context.CancelFunc) { 3119 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3120 defer ticker.Stop() 3121 for { 3122 select { 3123 case <-ctx.Done(): 3124 return 3125 case <-ticker.C: 3126 if !iprot.Transport().IsOpen() { 3127 cancel() 3128 return 3129 } 3130 } 3131 } 3132 }(tickerCtx, cancel) 3133 } 3134 3135 result := IPCChainTesterFreeChainResult{} 3136 var retval int32 3137 if retval, err2 = p.handler.FreeChain(ctx, args.ID); err2 != nil { 3138 tickerCancel() 3139 if err2 == thrift.ErrAbandonRequest { 3140 return false, thrift.WrapTException(err2) 3141 } 3142 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing free_chain: " + err2.Error()) 3143 oprot.WriteMessageBegin(ctx, "free_chain", thrift.EXCEPTION, seqId) 3144 x.Write(ctx, oprot) 3145 oprot.WriteMessageEnd(ctx) 3146 oprot.Flush(ctx) 3147 return true, thrift.WrapTException(err2) 3148 } else { 3149 result.Success = &retval 3150 } 3151 tickerCancel() 3152 if err2 = oprot.WriteMessageBegin(ctx, "free_chain", thrift.REPLY, seqId); err2 != nil { 3153 err = thrift.WrapTException(err2) 3154 } 3155 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 3156 err = thrift.WrapTException(err2) 3157 } 3158 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3159 err = thrift.WrapTException(err2) 3160 } 3161 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3162 err = thrift.WrapTException(err2) 3163 } 3164 if err != nil { 3165 return 3166 } 3167 return true, err 3168 } 3169 3170 type iPCChainTesterProcessorGetInfo struct { 3171 handler IPCChainTester 3172 } 3173 3174 func (p *iPCChainTesterProcessorGetInfo) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3175 args := IPCChainTesterGetInfoArgs{} 3176 var err2 error 3177 if err2 = args.Read(ctx, iprot); err2 != nil { 3178 iprot.ReadMessageEnd(ctx) 3179 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3180 oprot.WriteMessageBegin(ctx, "get_info", thrift.EXCEPTION, seqId) 3181 x.Write(ctx, oprot) 3182 oprot.WriteMessageEnd(ctx) 3183 oprot.Flush(ctx) 3184 return false, thrift.WrapTException(err2) 3185 } 3186 iprot.ReadMessageEnd(ctx) 3187 3188 tickerCancel := func() {} 3189 // Start a goroutine to do server side connectivity check. 3190 if thrift.ServerConnectivityCheckInterval > 0 { 3191 var cancel context.CancelFunc 3192 ctx, cancel = context.WithCancel(ctx) 3193 defer cancel() 3194 var tickerCtx context.Context 3195 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3196 defer tickerCancel() 3197 go func(ctx context.Context, cancel context.CancelFunc) { 3198 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3199 defer ticker.Stop() 3200 for { 3201 select { 3202 case <-ctx.Done(): 3203 return 3204 case <-ticker.C: 3205 if !iprot.Transport().IsOpen() { 3206 cancel() 3207 return 3208 } 3209 } 3210 } 3211 }(tickerCtx, cancel) 3212 } 3213 3214 result := IPCChainTesterGetInfoResult{} 3215 var retval string 3216 if retval, err2 = p.handler.GetInfo(ctx, args.ID); err2 != nil { 3217 tickerCancel() 3218 if err2 == thrift.ErrAbandonRequest { 3219 return false, thrift.WrapTException(err2) 3220 } 3221 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_info: " + err2.Error()) 3222 oprot.WriteMessageBegin(ctx, "get_info", thrift.EXCEPTION, seqId) 3223 x.Write(ctx, oprot) 3224 oprot.WriteMessageEnd(ctx) 3225 oprot.Flush(ctx) 3226 return true, thrift.WrapTException(err2) 3227 } else { 3228 result.Success = &retval 3229 } 3230 tickerCancel() 3231 if err2 = oprot.WriteMessageBegin(ctx, "get_info", thrift.REPLY, seqId); err2 != nil { 3232 err = thrift.WrapTException(err2) 3233 } 3234 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 3235 err = thrift.WrapTException(err2) 3236 } 3237 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3238 err = thrift.WrapTException(err2) 3239 } 3240 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3241 err = thrift.WrapTException(err2) 3242 } 3243 if err != nil { 3244 return 3245 } 3246 return true, err 3247 } 3248 3249 type iPCChainTesterProcessorCreateKey struct { 3250 handler IPCChainTester 3251 } 3252 3253 func (p *iPCChainTesterProcessorCreateKey) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3254 args := IPCChainTesterCreateKeyArgs{} 3255 var err2 error 3256 if err2 = args.Read(ctx, iprot); err2 != nil { 3257 iprot.ReadMessageEnd(ctx) 3258 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3259 oprot.WriteMessageBegin(ctx, "create_key", thrift.EXCEPTION, seqId) 3260 x.Write(ctx, oprot) 3261 oprot.WriteMessageEnd(ctx) 3262 oprot.Flush(ctx) 3263 return false, thrift.WrapTException(err2) 3264 } 3265 iprot.ReadMessageEnd(ctx) 3266 3267 tickerCancel := func() {} 3268 // Start a goroutine to do server side connectivity check. 3269 if thrift.ServerConnectivityCheckInterval > 0 { 3270 var cancel context.CancelFunc 3271 ctx, cancel = context.WithCancel(ctx) 3272 defer cancel() 3273 var tickerCtx context.Context 3274 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3275 defer tickerCancel() 3276 go func(ctx context.Context, cancel context.CancelFunc) { 3277 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3278 defer ticker.Stop() 3279 for { 3280 select { 3281 case <-ctx.Done(): 3282 return 3283 case <-ticker.C: 3284 if !iprot.Transport().IsOpen() { 3285 cancel() 3286 return 3287 } 3288 } 3289 } 3290 }(tickerCtx, cancel) 3291 } 3292 3293 result := IPCChainTesterCreateKeyResult{} 3294 var retval string 3295 if retval, err2 = p.handler.CreateKey(ctx, args.KeyType); err2 != nil { 3296 tickerCancel() 3297 if err2 == thrift.ErrAbandonRequest { 3298 return false, thrift.WrapTException(err2) 3299 } 3300 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing create_key: " + err2.Error()) 3301 oprot.WriteMessageBegin(ctx, "create_key", thrift.EXCEPTION, seqId) 3302 x.Write(ctx, oprot) 3303 oprot.WriteMessageEnd(ctx) 3304 oprot.Flush(ctx) 3305 return true, thrift.WrapTException(err2) 3306 } else { 3307 result.Success = &retval 3308 } 3309 tickerCancel() 3310 if err2 = oprot.WriteMessageBegin(ctx, "create_key", thrift.REPLY, seqId); err2 != nil { 3311 err = thrift.WrapTException(err2) 3312 } 3313 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 3314 err = thrift.WrapTException(err2) 3315 } 3316 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3317 err = thrift.WrapTException(err2) 3318 } 3319 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3320 err = thrift.WrapTException(err2) 3321 } 3322 if err != nil { 3323 return 3324 } 3325 return true, err 3326 } 3327 3328 type iPCChainTesterProcessorGetAccount struct { 3329 handler IPCChainTester 3330 } 3331 3332 func (p *iPCChainTesterProcessorGetAccount) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3333 args := IPCChainTesterGetAccountArgs{} 3334 var err2 error 3335 if err2 = args.Read(ctx, iprot); err2 != nil { 3336 iprot.ReadMessageEnd(ctx) 3337 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3338 oprot.WriteMessageBegin(ctx, "get_account", thrift.EXCEPTION, seqId) 3339 x.Write(ctx, oprot) 3340 oprot.WriteMessageEnd(ctx) 3341 oprot.Flush(ctx) 3342 return false, thrift.WrapTException(err2) 3343 } 3344 iprot.ReadMessageEnd(ctx) 3345 3346 tickerCancel := func() {} 3347 // Start a goroutine to do server side connectivity check. 3348 if thrift.ServerConnectivityCheckInterval > 0 { 3349 var cancel context.CancelFunc 3350 ctx, cancel = context.WithCancel(ctx) 3351 defer cancel() 3352 var tickerCtx context.Context 3353 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3354 defer tickerCancel() 3355 go func(ctx context.Context, cancel context.CancelFunc) { 3356 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3357 defer ticker.Stop() 3358 for { 3359 select { 3360 case <-ctx.Done(): 3361 return 3362 case <-ticker.C: 3363 if !iprot.Transport().IsOpen() { 3364 cancel() 3365 return 3366 } 3367 } 3368 } 3369 }(tickerCtx, cancel) 3370 } 3371 3372 result := IPCChainTesterGetAccountResult{} 3373 var retval string 3374 if retval, err2 = p.handler.GetAccount(ctx, args.ID, args.Account); err2 != nil { 3375 tickerCancel() 3376 if err2 == thrift.ErrAbandonRequest { 3377 return false, thrift.WrapTException(err2) 3378 } 3379 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_account: " + err2.Error()) 3380 oprot.WriteMessageBegin(ctx, "get_account", thrift.EXCEPTION, seqId) 3381 x.Write(ctx, oprot) 3382 oprot.WriteMessageEnd(ctx) 3383 oprot.Flush(ctx) 3384 return true, thrift.WrapTException(err2) 3385 } else { 3386 result.Success = &retval 3387 } 3388 tickerCancel() 3389 if err2 = oprot.WriteMessageBegin(ctx, "get_account", thrift.REPLY, seqId); err2 != nil { 3390 err = thrift.WrapTException(err2) 3391 } 3392 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 3393 err = thrift.WrapTException(err2) 3394 } 3395 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3396 err = thrift.WrapTException(err2) 3397 } 3398 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3399 err = thrift.WrapTException(err2) 3400 } 3401 if err != nil { 3402 return 3403 } 3404 return true, err 3405 } 3406 3407 type iPCChainTesterProcessorCreateAccount struct { 3408 handler IPCChainTester 3409 } 3410 3411 func (p *iPCChainTesterProcessorCreateAccount) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3412 args := IPCChainTesterCreateAccountArgs{} 3413 var err2 error 3414 if err2 = args.Read(ctx, iprot); err2 != nil { 3415 iprot.ReadMessageEnd(ctx) 3416 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3417 oprot.WriteMessageBegin(ctx, "create_account", thrift.EXCEPTION, seqId) 3418 x.Write(ctx, oprot) 3419 oprot.WriteMessageEnd(ctx) 3420 oprot.Flush(ctx) 3421 return false, thrift.WrapTException(err2) 3422 } 3423 iprot.ReadMessageEnd(ctx) 3424 3425 tickerCancel := func() {} 3426 // Start a goroutine to do server side connectivity check. 3427 if thrift.ServerConnectivityCheckInterval > 0 { 3428 var cancel context.CancelFunc 3429 ctx, cancel = context.WithCancel(ctx) 3430 defer cancel() 3431 var tickerCtx context.Context 3432 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3433 defer tickerCancel() 3434 go func(ctx context.Context, cancel context.CancelFunc) { 3435 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3436 defer ticker.Stop() 3437 for { 3438 select { 3439 case <-ctx.Done(): 3440 return 3441 case <-ticker.C: 3442 if !iprot.Transport().IsOpen() { 3443 cancel() 3444 return 3445 } 3446 } 3447 } 3448 }(tickerCtx, cancel) 3449 } 3450 3451 result := IPCChainTesterCreateAccountResult{} 3452 var retval string 3453 if retval, err2 = p.handler.CreateAccount(ctx, args.ID, args.Creator, args.Account, args.OwnerKey, args.ActiveKey, args.RAMBytes, args.StakeNet, args.StakeCPU); err2 != nil { 3454 tickerCancel() 3455 if err2 == thrift.ErrAbandonRequest { 3456 return false, thrift.WrapTException(err2) 3457 } 3458 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing create_account: " + err2.Error()) 3459 oprot.WriteMessageBegin(ctx, "create_account", thrift.EXCEPTION, seqId) 3460 x.Write(ctx, oprot) 3461 oprot.WriteMessageEnd(ctx) 3462 oprot.Flush(ctx) 3463 return true, thrift.WrapTException(err2) 3464 } else { 3465 result.Success = &retval 3466 } 3467 tickerCancel() 3468 if err2 = oprot.WriteMessageBegin(ctx, "create_account", thrift.REPLY, seqId); err2 != nil { 3469 err = thrift.WrapTException(err2) 3470 } 3471 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 3472 err = thrift.WrapTException(err2) 3473 } 3474 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3475 err = thrift.WrapTException(err2) 3476 } 3477 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3478 err = thrift.WrapTException(err2) 3479 } 3480 if err != nil { 3481 return 3482 } 3483 return true, err 3484 } 3485 3486 type iPCChainTesterProcessorImportKey struct { 3487 handler IPCChainTester 3488 } 3489 3490 func (p *iPCChainTesterProcessorImportKey) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3491 args := IPCChainTesterImportKeyArgs{} 3492 var err2 error 3493 if err2 = args.Read(ctx, iprot); err2 != nil { 3494 iprot.ReadMessageEnd(ctx) 3495 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3496 oprot.WriteMessageBegin(ctx, "import_key", thrift.EXCEPTION, seqId) 3497 x.Write(ctx, oprot) 3498 oprot.WriteMessageEnd(ctx) 3499 oprot.Flush(ctx) 3500 return false, thrift.WrapTException(err2) 3501 } 3502 iprot.ReadMessageEnd(ctx) 3503 3504 tickerCancel := func() {} 3505 // Start a goroutine to do server side connectivity check. 3506 if thrift.ServerConnectivityCheckInterval > 0 { 3507 var cancel context.CancelFunc 3508 ctx, cancel = context.WithCancel(ctx) 3509 defer cancel() 3510 var tickerCtx context.Context 3511 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3512 defer tickerCancel() 3513 go func(ctx context.Context, cancel context.CancelFunc) { 3514 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3515 defer ticker.Stop() 3516 for { 3517 select { 3518 case <-ctx.Done(): 3519 return 3520 case <-ticker.C: 3521 if !iprot.Transport().IsOpen() { 3522 cancel() 3523 return 3524 } 3525 } 3526 } 3527 }(tickerCtx, cancel) 3528 } 3529 3530 result := IPCChainTesterImportKeyResult{} 3531 var retval bool 3532 if retval, err2 = p.handler.ImportKey(ctx, args.ID, args.PubKey, args.PrivKey); err2 != nil { 3533 tickerCancel() 3534 if err2 == thrift.ErrAbandonRequest { 3535 return false, thrift.WrapTException(err2) 3536 } 3537 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing import_key: " + err2.Error()) 3538 oprot.WriteMessageBegin(ctx, "import_key", thrift.EXCEPTION, seqId) 3539 x.Write(ctx, oprot) 3540 oprot.WriteMessageEnd(ctx) 3541 oprot.Flush(ctx) 3542 return true, thrift.WrapTException(err2) 3543 } else { 3544 result.Success = &retval 3545 } 3546 tickerCancel() 3547 if err2 = oprot.WriteMessageBegin(ctx, "import_key", thrift.REPLY, seqId); err2 != nil { 3548 err = thrift.WrapTException(err2) 3549 } 3550 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 3551 err = thrift.WrapTException(err2) 3552 } 3553 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3554 err = thrift.WrapTException(err2) 3555 } 3556 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3557 err = thrift.WrapTException(err2) 3558 } 3559 if err != nil { 3560 return 3561 } 3562 return true, err 3563 } 3564 3565 type iPCChainTesterProcessorGetRequiredKeys struct { 3566 handler IPCChainTester 3567 } 3568 3569 func (p *iPCChainTesterProcessorGetRequiredKeys) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3570 args := IPCChainTesterGetRequiredKeysArgs{} 3571 var err2 error 3572 if err2 = args.Read(ctx, iprot); err2 != nil { 3573 iprot.ReadMessageEnd(ctx) 3574 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3575 oprot.WriteMessageBegin(ctx, "get_required_keys", thrift.EXCEPTION, seqId) 3576 x.Write(ctx, oprot) 3577 oprot.WriteMessageEnd(ctx) 3578 oprot.Flush(ctx) 3579 return false, thrift.WrapTException(err2) 3580 } 3581 iprot.ReadMessageEnd(ctx) 3582 3583 tickerCancel := func() {} 3584 // Start a goroutine to do server side connectivity check. 3585 if thrift.ServerConnectivityCheckInterval > 0 { 3586 var cancel context.CancelFunc 3587 ctx, cancel = context.WithCancel(ctx) 3588 defer cancel() 3589 var tickerCtx context.Context 3590 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3591 defer tickerCancel() 3592 go func(ctx context.Context, cancel context.CancelFunc) { 3593 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3594 defer ticker.Stop() 3595 for { 3596 select { 3597 case <-ctx.Done(): 3598 return 3599 case <-ticker.C: 3600 if !iprot.Transport().IsOpen() { 3601 cancel() 3602 return 3603 } 3604 } 3605 } 3606 }(tickerCtx, cancel) 3607 } 3608 3609 result := IPCChainTesterGetRequiredKeysResult{} 3610 var retval string 3611 if retval, err2 = p.handler.GetRequiredKeys(ctx, args.ID, args.Transaction, args.AvailableKeys); err2 != nil { 3612 tickerCancel() 3613 if err2 == thrift.ErrAbandonRequest { 3614 return false, thrift.WrapTException(err2) 3615 } 3616 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_required_keys: " + err2.Error()) 3617 oprot.WriteMessageBegin(ctx, "get_required_keys", thrift.EXCEPTION, seqId) 3618 x.Write(ctx, oprot) 3619 oprot.WriteMessageEnd(ctx) 3620 oprot.Flush(ctx) 3621 return true, thrift.WrapTException(err2) 3622 } else { 3623 result.Success = &retval 3624 } 3625 tickerCancel() 3626 if err2 = oprot.WriteMessageBegin(ctx, "get_required_keys", thrift.REPLY, seqId); err2 != nil { 3627 err = thrift.WrapTException(err2) 3628 } 3629 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 3630 err = thrift.WrapTException(err2) 3631 } 3632 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3633 err = thrift.WrapTException(err2) 3634 } 3635 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3636 err = thrift.WrapTException(err2) 3637 } 3638 if err != nil { 3639 return 3640 } 3641 return true, err 3642 } 3643 3644 type iPCChainTesterProcessorProduceBlock struct { 3645 handler IPCChainTester 3646 } 3647 3648 func (p *iPCChainTesterProcessorProduceBlock) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3649 args := IPCChainTesterProduceBlockArgs{} 3650 var err2 error 3651 if err2 = args.Read(ctx, iprot); err2 != nil { 3652 iprot.ReadMessageEnd(ctx) 3653 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3654 oprot.WriteMessageBegin(ctx, "produce_block", thrift.EXCEPTION, seqId) 3655 x.Write(ctx, oprot) 3656 oprot.WriteMessageEnd(ctx) 3657 oprot.Flush(ctx) 3658 return false, thrift.WrapTException(err2) 3659 } 3660 iprot.ReadMessageEnd(ctx) 3661 3662 tickerCancel := func() {} 3663 // Start a goroutine to do server side connectivity check. 3664 if thrift.ServerConnectivityCheckInterval > 0 { 3665 var cancel context.CancelFunc 3666 ctx, cancel = context.WithCancel(ctx) 3667 defer cancel() 3668 var tickerCtx context.Context 3669 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3670 defer tickerCancel() 3671 go func(ctx context.Context, cancel context.CancelFunc) { 3672 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3673 defer ticker.Stop() 3674 for { 3675 select { 3676 case <-ctx.Done(): 3677 return 3678 case <-ticker.C: 3679 if !iprot.Transport().IsOpen() { 3680 cancel() 3681 return 3682 } 3683 } 3684 } 3685 }(tickerCtx, cancel) 3686 } 3687 3688 result := IPCChainTesterProduceBlockResult{} 3689 if err2 = p.handler.ProduceBlock(ctx, args.ID, args.NextBlockSkipSeconds); err2 != nil { 3690 tickerCancel() 3691 if err2 == thrift.ErrAbandonRequest { 3692 return false, thrift.WrapTException(err2) 3693 } 3694 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing produce_block: " + err2.Error()) 3695 oprot.WriteMessageBegin(ctx, "produce_block", thrift.EXCEPTION, seqId) 3696 x.Write(ctx, oprot) 3697 oprot.WriteMessageEnd(ctx) 3698 oprot.Flush(ctx) 3699 return true, thrift.WrapTException(err2) 3700 } 3701 tickerCancel() 3702 if err2 = oprot.WriteMessageBegin(ctx, "produce_block", thrift.REPLY, seqId); err2 != nil { 3703 err = thrift.WrapTException(err2) 3704 } 3705 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 3706 err = thrift.WrapTException(err2) 3707 } 3708 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3709 err = thrift.WrapTException(err2) 3710 } 3711 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3712 err = thrift.WrapTException(err2) 3713 } 3714 if err != nil { 3715 return 3716 } 3717 return true, err 3718 } 3719 3720 type iPCChainTesterProcessorPushAction struct { 3721 handler IPCChainTester 3722 } 3723 3724 func (p *iPCChainTesterProcessorPushAction) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3725 args := IPCChainTesterPushActionArgs{} 3726 var err2 error 3727 if err2 = args.Read(ctx, iprot); err2 != nil { 3728 iprot.ReadMessageEnd(ctx) 3729 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3730 oprot.WriteMessageBegin(ctx, "push_action", thrift.EXCEPTION, seqId) 3731 x.Write(ctx, oprot) 3732 oprot.WriteMessageEnd(ctx) 3733 oprot.Flush(ctx) 3734 return false, thrift.WrapTException(err2) 3735 } 3736 iprot.ReadMessageEnd(ctx) 3737 3738 tickerCancel := func() {} 3739 // Start a goroutine to do server side connectivity check. 3740 if thrift.ServerConnectivityCheckInterval > 0 { 3741 var cancel context.CancelFunc 3742 ctx, cancel = context.WithCancel(ctx) 3743 defer cancel() 3744 var tickerCtx context.Context 3745 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3746 defer tickerCancel() 3747 go func(ctx context.Context, cancel context.CancelFunc) { 3748 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3749 defer ticker.Stop() 3750 for { 3751 select { 3752 case <-ctx.Done(): 3753 return 3754 case <-ticker.C: 3755 if !iprot.Transport().IsOpen() { 3756 cancel() 3757 return 3758 } 3759 } 3760 } 3761 }(tickerCtx, cancel) 3762 } 3763 3764 result := IPCChainTesterPushActionResult{} 3765 var retval []byte 3766 if retval, err2 = p.handler.PushAction(ctx, args.ID, args.Account, args.Action, args.Arguments, args.Permissions); err2 != nil { 3767 tickerCancel() 3768 if err2 == thrift.ErrAbandonRequest { 3769 return false, thrift.WrapTException(err2) 3770 } 3771 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing push_action: " + err2.Error()) 3772 oprot.WriteMessageBegin(ctx, "push_action", thrift.EXCEPTION, seqId) 3773 x.Write(ctx, oprot) 3774 oprot.WriteMessageEnd(ctx) 3775 oprot.Flush(ctx) 3776 return true, thrift.WrapTException(err2) 3777 } else { 3778 result.Success = retval 3779 } 3780 tickerCancel() 3781 if err2 = oprot.WriteMessageBegin(ctx, "push_action", thrift.REPLY, seqId); err2 != nil { 3782 err = thrift.WrapTException(err2) 3783 } 3784 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 3785 err = thrift.WrapTException(err2) 3786 } 3787 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3788 err = thrift.WrapTException(err2) 3789 } 3790 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3791 err = thrift.WrapTException(err2) 3792 } 3793 if err != nil { 3794 return 3795 } 3796 return true, err 3797 } 3798 3799 type iPCChainTesterProcessorPushActions struct { 3800 handler IPCChainTester 3801 } 3802 3803 func (p *iPCChainTesterProcessorPushActions) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3804 args := IPCChainTesterPushActionsArgs{} 3805 var err2 error 3806 if err2 = args.Read(ctx, iprot); err2 != nil { 3807 iprot.ReadMessageEnd(ctx) 3808 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3809 oprot.WriteMessageBegin(ctx, "push_actions", thrift.EXCEPTION, seqId) 3810 x.Write(ctx, oprot) 3811 oprot.WriteMessageEnd(ctx) 3812 oprot.Flush(ctx) 3813 return false, thrift.WrapTException(err2) 3814 } 3815 iprot.ReadMessageEnd(ctx) 3816 3817 tickerCancel := func() {} 3818 // Start a goroutine to do server side connectivity check. 3819 if thrift.ServerConnectivityCheckInterval > 0 { 3820 var cancel context.CancelFunc 3821 ctx, cancel = context.WithCancel(ctx) 3822 defer cancel() 3823 var tickerCtx context.Context 3824 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3825 defer tickerCancel() 3826 go func(ctx context.Context, cancel context.CancelFunc) { 3827 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3828 defer ticker.Stop() 3829 for { 3830 select { 3831 case <-ctx.Done(): 3832 return 3833 case <-ticker.C: 3834 if !iprot.Transport().IsOpen() { 3835 cancel() 3836 return 3837 } 3838 } 3839 } 3840 }(tickerCtx, cancel) 3841 } 3842 3843 result := IPCChainTesterPushActionsResult{} 3844 var retval []byte 3845 if retval, err2 = p.handler.PushActions(ctx, args.ID, args.Actions); err2 != nil { 3846 tickerCancel() 3847 if err2 == thrift.ErrAbandonRequest { 3848 return false, thrift.WrapTException(err2) 3849 } 3850 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing push_actions: " + err2.Error()) 3851 oprot.WriteMessageBegin(ctx, "push_actions", thrift.EXCEPTION, seqId) 3852 x.Write(ctx, oprot) 3853 oprot.WriteMessageEnd(ctx) 3854 oprot.Flush(ctx) 3855 return true, thrift.WrapTException(err2) 3856 } else { 3857 result.Success = retval 3858 } 3859 tickerCancel() 3860 if err2 = oprot.WriteMessageBegin(ctx, "push_actions", thrift.REPLY, seqId); err2 != nil { 3861 err = thrift.WrapTException(err2) 3862 } 3863 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 3864 err = thrift.WrapTException(err2) 3865 } 3866 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3867 err = thrift.WrapTException(err2) 3868 } 3869 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3870 err = thrift.WrapTException(err2) 3871 } 3872 if err != nil { 3873 return 3874 } 3875 return true, err 3876 } 3877 3878 type iPCChainTesterProcessorDeployContract struct { 3879 handler IPCChainTester 3880 } 3881 3882 func (p *iPCChainTesterProcessorDeployContract) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3883 args := IPCChainTesterDeployContractArgs{} 3884 var err2 error 3885 if err2 = args.Read(ctx, iprot); err2 != nil { 3886 iprot.ReadMessageEnd(ctx) 3887 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3888 oprot.WriteMessageBegin(ctx, "deploy_contract", thrift.EXCEPTION, seqId) 3889 x.Write(ctx, oprot) 3890 oprot.WriteMessageEnd(ctx) 3891 oprot.Flush(ctx) 3892 return false, thrift.WrapTException(err2) 3893 } 3894 iprot.ReadMessageEnd(ctx) 3895 3896 tickerCancel := func() {} 3897 // Start a goroutine to do server side connectivity check. 3898 if thrift.ServerConnectivityCheckInterval > 0 { 3899 var cancel context.CancelFunc 3900 ctx, cancel = context.WithCancel(ctx) 3901 defer cancel() 3902 var tickerCtx context.Context 3903 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3904 defer tickerCancel() 3905 go func(ctx context.Context, cancel context.CancelFunc) { 3906 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3907 defer ticker.Stop() 3908 for { 3909 select { 3910 case <-ctx.Done(): 3911 return 3912 case <-ticker.C: 3913 if !iprot.Transport().IsOpen() { 3914 cancel() 3915 return 3916 } 3917 } 3918 } 3919 }(tickerCtx, cancel) 3920 } 3921 3922 result := IPCChainTesterDeployContractResult{} 3923 var retval []byte 3924 if retval, err2 = p.handler.DeployContract(ctx, args.ID, args.Account, args.Wasm, args.Abi); err2 != nil { 3925 tickerCancel() 3926 if err2 == thrift.ErrAbandonRequest { 3927 return false, thrift.WrapTException(err2) 3928 } 3929 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deploy_contract: " + err2.Error()) 3930 oprot.WriteMessageBegin(ctx, "deploy_contract", thrift.EXCEPTION, seqId) 3931 x.Write(ctx, oprot) 3932 oprot.WriteMessageEnd(ctx) 3933 oprot.Flush(ctx) 3934 return true, thrift.WrapTException(err2) 3935 } else { 3936 result.Success = retval 3937 } 3938 tickerCancel() 3939 if err2 = oprot.WriteMessageBegin(ctx, "deploy_contract", thrift.REPLY, seqId); err2 != nil { 3940 err = thrift.WrapTException(err2) 3941 } 3942 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 3943 err = thrift.WrapTException(err2) 3944 } 3945 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 3946 err = thrift.WrapTException(err2) 3947 } 3948 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 3949 err = thrift.WrapTException(err2) 3950 } 3951 if err != nil { 3952 return 3953 } 3954 return true, err 3955 } 3956 3957 type iPCChainTesterProcessorGetTableRows struct { 3958 handler IPCChainTester 3959 } 3960 3961 func (p *iPCChainTesterProcessorGetTableRows) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 3962 args := IPCChainTesterGetTableRowsArgs{} 3963 var err2 error 3964 if err2 = args.Read(ctx, iprot); err2 != nil { 3965 iprot.ReadMessageEnd(ctx) 3966 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 3967 oprot.WriteMessageBegin(ctx, "get_table_rows", thrift.EXCEPTION, seqId) 3968 x.Write(ctx, oprot) 3969 oprot.WriteMessageEnd(ctx) 3970 oprot.Flush(ctx) 3971 return false, thrift.WrapTException(err2) 3972 } 3973 iprot.ReadMessageEnd(ctx) 3974 3975 tickerCancel := func() {} 3976 // Start a goroutine to do server side connectivity check. 3977 if thrift.ServerConnectivityCheckInterval > 0 { 3978 var cancel context.CancelFunc 3979 ctx, cancel = context.WithCancel(ctx) 3980 defer cancel() 3981 var tickerCtx context.Context 3982 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 3983 defer tickerCancel() 3984 go func(ctx context.Context, cancel context.CancelFunc) { 3985 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 3986 defer ticker.Stop() 3987 for { 3988 select { 3989 case <-ctx.Done(): 3990 return 3991 case <-ticker.C: 3992 if !iprot.Transport().IsOpen() { 3993 cancel() 3994 return 3995 } 3996 } 3997 } 3998 }(tickerCtx, cancel) 3999 } 4000 4001 result := IPCChainTesterGetTableRowsResult{} 4002 var retval string 4003 if retval, err2 = p.handler.GetTableRows(ctx, args.ID, args.JSON, args.Code, args.Scope, args.Table, args.LowerBound, args.UpperBound, args.Limit, args.KeyType, args.IndexPosition, args.EncodeType, args.Reverse, args.ShowPayer); err2 != nil { 4004 tickerCancel() 4005 if err2 == thrift.ErrAbandonRequest { 4006 return false, thrift.WrapTException(err2) 4007 } 4008 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_table_rows: " + err2.Error()) 4009 oprot.WriteMessageBegin(ctx, "get_table_rows", thrift.EXCEPTION, seqId) 4010 x.Write(ctx, oprot) 4011 oprot.WriteMessageEnd(ctx) 4012 oprot.Flush(ctx) 4013 return true, thrift.WrapTException(err2) 4014 } else { 4015 result.Success = &retval 4016 } 4017 tickerCancel() 4018 if err2 = oprot.WriteMessageBegin(ctx, "get_table_rows", thrift.REPLY, seqId); err2 != nil { 4019 err = thrift.WrapTException(err2) 4020 } 4021 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 4022 err = thrift.WrapTException(err2) 4023 } 4024 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 4025 err = thrift.WrapTException(err2) 4026 } 4027 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 4028 err = thrift.WrapTException(err2) 4029 } 4030 if err != nil { 4031 return 4032 } 4033 return true, err 4034 } 4035 4036 4037 // HELPER FUNCTIONS AND STRUCTURES 4038 4039 type IPCChainTesterInitVMAPIArgs struct { 4040 } 4041 4042 func NewIPCChainTesterInitVMAPIArgs() *IPCChainTesterInitVMAPIArgs { 4043 return &IPCChainTesterInitVMAPIArgs{} 4044 } 4045 4046 func (p *IPCChainTesterInitVMAPIArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 4047 if _, err := iprot.ReadStructBegin(ctx); err != nil { 4048 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 4049 } 4050 4051 4052 for { 4053 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 4054 if err != nil { 4055 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 4056 } 4057 if fieldTypeId == thrift.STOP { break; } 4058 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4059 return err 4060 } 4061 if err := iprot.ReadFieldEnd(ctx); err != nil { 4062 return err 4063 } 4064 } 4065 if err := iprot.ReadStructEnd(ctx); err != nil { 4066 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 4067 } 4068 return nil 4069 } 4070 4071 func (p *IPCChainTesterInitVMAPIArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 4072 if err := oprot.WriteStructBegin(ctx, "init_vm_api_args"); err != nil { 4073 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 4074 if p != nil { 4075 } 4076 if err := oprot.WriteFieldStop(ctx); err != nil { 4077 return thrift.PrependError("write field stop error: ", err) } 4078 if err := oprot.WriteStructEnd(ctx); err != nil { 4079 return thrift.PrependError("write struct stop error: ", err) } 4080 return nil 4081 } 4082 4083 func (p *IPCChainTesterInitVMAPIArgs) String() string { 4084 if p == nil { 4085 return "<nil>" 4086 } 4087 return fmt.Sprintf("IPCChainTesterInitVMAPIArgs(%+v)", *p) 4088 } 4089 4090 type IPCChainTesterInitApplyRequestArgs struct { 4091 } 4092 4093 func NewIPCChainTesterInitApplyRequestArgs() *IPCChainTesterInitApplyRequestArgs { 4094 return &IPCChainTesterInitApplyRequestArgs{} 4095 } 4096 4097 func (p *IPCChainTesterInitApplyRequestArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 4098 if _, err := iprot.ReadStructBegin(ctx); err != nil { 4099 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 4100 } 4101 4102 4103 for { 4104 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 4105 if err != nil { 4106 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 4107 } 4108 if fieldTypeId == thrift.STOP { break; } 4109 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4110 return err 4111 } 4112 if err := iprot.ReadFieldEnd(ctx); err != nil { 4113 return err 4114 } 4115 } 4116 if err := iprot.ReadStructEnd(ctx); err != nil { 4117 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 4118 } 4119 return nil 4120 } 4121 4122 func (p *IPCChainTesterInitApplyRequestArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 4123 if err := oprot.WriteStructBegin(ctx, "init_apply_request_args"); err != nil { 4124 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 4125 if p != nil { 4126 } 4127 if err := oprot.WriteFieldStop(ctx); err != nil { 4128 return thrift.PrependError("write field stop error: ", err) } 4129 if err := oprot.WriteStructEnd(ctx); err != nil { 4130 return thrift.PrependError("write struct stop error: ", err) } 4131 return nil 4132 } 4133 4134 func (p *IPCChainTesterInitApplyRequestArgs) String() string { 4135 if p == nil { 4136 return "<nil>" 4137 } 4138 return fmt.Sprintf("IPCChainTesterInitApplyRequestArgs(%+v)", *p) 4139 } 4140 4141 // Attributes: 4142 // - ID 4143 // - Contract 4144 // - Dylib 4145 type IPCChainTesterSetNativeContractArgs struct { 4146 ID int32 `thrift:"id,1" db:"id" json:"id"` 4147 Contract string `thrift:"contract,2" db:"contract" json:"contract"` 4148 Dylib string `thrift:"dylib,3" db:"dylib" json:"dylib"` 4149 } 4150 4151 func NewIPCChainTesterSetNativeContractArgs() *IPCChainTesterSetNativeContractArgs { 4152 return &IPCChainTesterSetNativeContractArgs{} 4153 } 4154 4155 4156 func (p *IPCChainTesterSetNativeContractArgs) GetID() int32 { 4157 return p.ID 4158 } 4159 4160 func (p *IPCChainTesterSetNativeContractArgs) GetContract() string { 4161 return p.Contract 4162 } 4163 4164 func (p *IPCChainTesterSetNativeContractArgs) GetDylib() string { 4165 return p.Dylib 4166 } 4167 func (p *IPCChainTesterSetNativeContractArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 4168 if _, err := iprot.ReadStructBegin(ctx); err != nil { 4169 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 4170 } 4171 4172 4173 for { 4174 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 4175 if err != nil { 4176 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 4177 } 4178 if fieldTypeId == thrift.STOP { break; } 4179 switch fieldId { 4180 case 1: 4181 if fieldTypeId == thrift.I32 { 4182 if err := p.ReadField1(ctx, iprot); err != nil { 4183 return err 4184 } 4185 } else { 4186 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4187 return err 4188 } 4189 } 4190 case 2: 4191 if fieldTypeId == thrift.STRING { 4192 if err := p.ReadField2(ctx, iprot); err != nil { 4193 return err 4194 } 4195 } else { 4196 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4197 return err 4198 } 4199 } 4200 case 3: 4201 if fieldTypeId == thrift.STRING { 4202 if err := p.ReadField3(ctx, iprot); err != nil { 4203 return err 4204 } 4205 } else { 4206 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4207 return err 4208 } 4209 } 4210 default: 4211 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4212 return err 4213 } 4214 } 4215 if err := iprot.ReadFieldEnd(ctx); err != nil { 4216 return err 4217 } 4218 } 4219 if err := iprot.ReadStructEnd(ctx); err != nil { 4220 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 4221 } 4222 return nil 4223 } 4224 4225 func (p *IPCChainTesterSetNativeContractArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 4226 if v, err := iprot.ReadI32(ctx); err != nil { 4227 return thrift.PrependError("error reading field 1: ", err) 4228 } else { 4229 p.ID = v 4230 } 4231 return nil 4232 } 4233 4234 func (p *IPCChainTesterSetNativeContractArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 4235 if v, err := iprot.ReadString(ctx); err != nil { 4236 return thrift.PrependError("error reading field 2: ", err) 4237 } else { 4238 p.Contract = v 4239 } 4240 return nil 4241 } 4242 4243 func (p *IPCChainTesterSetNativeContractArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 4244 if v, err := iprot.ReadString(ctx); err != nil { 4245 return thrift.PrependError("error reading field 3: ", err) 4246 } else { 4247 p.Dylib = v 4248 } 4249 return nil 4250 } 4251 4252 func (p *IPCChainTesterSetNativeContractArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 4253 if err := oprot.WriteStructBegin(ctx, "set_native_contract_args"); err != nil { 4254 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 4255 if p != nil { 4256 if err := p.writeField1(ctx, oprot); err != nil { return err } 4257 if err := p.writeField2(ctx, oprot); err != nil { return err } 4258 if err := p.writeField3(ctx, oprot); err != nil { return err } 4259 } 4260 if err := oprot.WriteFieldStop(ctx); err != nil { 4261 return thrift.PrependError("write field stop error: ", err) } 4262 if err := oprot.WriteStructEnd(ctx); err != nil { 4263 return thrift.PrependError("write struct stop error: ", err) } 4264 return nil 4265 } 4266 4267 func (p *IPCChainTesterSetNativeContractArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 4268 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 4269 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 4270 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 4271 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 4272 if err := oprot.WriteFieldEnd(ctx); err != nil { 4273 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 4274 return err 4275 } 4276 4277 func (p *IPCChainTesterSetNativeContractArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 4278 if err := oprot.WriteFieldBegin(ctx, "contract", thrift.STRING, 2); err != nil { 4279 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:contract: ", p), err) } 4280 if err := oprot.WriteString(ctx, string(p.Contract)); err != nil { 4281 return thrift.PrependError(fmt.Sprintf("%T.contract (2) field write error: ", p), err) } 4282 if err := oprot.WriteFieldEnd(ctx); err != nil { 4283 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:contract: ", p), err) } 4284 return err 4285 } 4286 4287 func (p *IPCChainTesterSetNativeContractArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 4288 if err := oprot.WriteFieldBegin(ctx, "dylib", thrift.STRING, 3); err != nil { 4289 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:dylib: ", p), err) } 4290 if err := oprot.WriteString(ctx, string(p.Dylib)); err != nil { 4291 return thrift.PrependError(fmt.Sprintf("%T.dylib (3) field write error: ", p), err) } 4292 if err := oprot.WriteFieldEnd(ctx); err != nil { 4293 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:dylib: ", p), err) } 4294 return err 4295 } 4296 4297 func (p *IPCChainTesterSetNativeContractArgs) String() string { 4298 if p == nil { 4299 return "<nil>" 4300 } 4301 return fmt.Sprintf("IPCChainTesterSetNativeContractArgs(%+v)", *p) 4302 } 4303 4304 // Attributes: 4305 // - Success 4306 type IPCChainTesterSetNativeContractResult struct { 4307 Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` 4308 } 4309 4310 func NewIPCChainTesterSetNativeContractResult() *IPCChainTesterSetNativeContractResult { 4311 return &IPCChainTesterSetNativeContractResult{} 4312 } 4313 4314 var IPCChainTesterSetNativeContractResult_Success_DEFAULT bool 4315 func (p *IPCChainTesterSetNativeContractResult) GetSuccess() bool { 4316 if !p.IsSetSuccess() { 4317 return IPCChainTesterSetNativeContractResult_Success_DEFAULT 4318 } 4319 return *p.Success 4320 } 4321 func (p *IPCChainTesterSetNativeContractResult) IsSetSuccess() bool { 4322 return p.Success != nil 4323 } 4324 4325 func (p *IPCChainTesterSetNativeContractResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 4326 if _, err := iprot.ReadStructBegin(ctx); err != nil { 4327 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 4328 } 4329 4330 4331 for { 4332 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 4333 if err != nil { 4334 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 4335 } 4336 if fieldTypeId == thrift.STOP { break; } 4337 switch fieldId { 4338 case 0: 4339 if fieldTypeId == thrift.BOOL { 4340 if err := p.ReadField0(ctx, iprot); err != nil { 4341 return err 4342 } 4343 } else { 4344 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4345 return err 4346 } 4347 } 4348 default: 4349 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4350 return err 4351 } 4352 } 4353 if err := iprot.ReadFieldEnd(ctx); err != nil { 4354 return err 4355 } 4356 } 4357 if err := iprot.ReadStructEnd(ctx); err != nil { 4358 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 4359 } 4360 return nil 4361 } 4362 4363 func (p *IPCChainTesterSetNativeContractResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 4364 if v, err := iprot.ReadBool(ctx); err != nil { 4365 return thrift.PrependError("error reading field 0: ", err) 4366 } else { 4367 p.Success = &v 4368 } 4369 return nil 4370 } 4371 4372 func (p *IPCChainTesterSetNativeContractResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 4373 if err := oprot.WriteStructBegin(ctx, "set_native_contract_result"); err != nil { 4374 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 4375 if p != nil { 4376 if err := p.writeField0(ctx, oprot); err != nil { return err } 4377 } 4378 if err := oprot.WriteFieldStop(ctx); err != nil { 4379 return thrift.PrependError("write field stop error: ", err) } 4380 if err := oprot.WriteStructEnd(ctx); err != nil { 4381 return thrift.PrependError("write struct stop error: ", err) } 4382 return nil 4383 } 4384 4385 func (p *IPCChainTesterSetNativeContractResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 4386 if p.IsSetSuccess() { 4387 if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { 4388 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 4389 if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { 4390 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 4391 if err := oprot.WriteFieldEnd(ctx); err != nil { 4392 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 4393 } 4394 return err 4395 } 4396 4397 func (p *IPCChainTesterSetNativeContractResult) String() string { 4398 if p == nil { 4399 return "<nil>" 4400 } 4401 return fmt.Sprintf("IPCChainTesterSetNativeContractResult(%+v)", *p) 4402 } 4403 4404 // Attributes: 4405 // - Enable 4406 type IPCChainTesterEnableDebuggingArgs struct { 4407 Enable bool `thrift:"enable,1" db:"enable" json:"enable"` 4408 } 4409 4410 func NewIPCChainTesterEnableDebuggingArgs() *IPCChainTesterEnableDebuggingArgs { 4411 return &IPCChainTesterEnableDebuggingArgs{} 4412 } 4413 4414 4415 func (p *IPCChainTesterEnableDebuggingArgs) GetEnable() bool { 4416 return p.Enable 4417 } 4418 func (p *IPCChainTesterEnableDebuggingArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 4419 if _, err := iprot.ReadStructBegin(ctx); err != nil { 4420 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 4421 } 4422 4423 4424 for { 4425 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 4426 if err != nil { 4427 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 4428 } 4429 if fieldTypeId == thrift.STOP { break; } 4430 switch fieldId { 4431 case 1: 4432 if fieldTypeId == thrift.BOOL { 4433 if err := p.ReadField1(ctx, iprot); err != nil { 4434 return err 4435 } 4436 } else { 4437 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4438 return err 4439 } 4440 } 4441 default: 4442 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4443 return err 4444 } 4445 } 4446 if err := iprot.ReadFieldEnd(ctx); err != nil { 4447 return err 4448 } 4449 } 4450 if err := iprot.ReadStructEnd(ctx); err != nil { 4451 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 4452 } 4453 return nil 4454 } 4455 4456 func (p *IPCChainTesterEnableDebuggingArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 4457 if v, err := iprot.ReadBool(ctx); err != nil { 4458 return thrift.PrependError("error reading field 1: ", err) 4459 } else { 4460 p.Enable = v 4461 } 4462 return nil 4463 } 4464 4465 func (p *IPCChainTesterEnableDebuggingArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 4466 if err := oprot.WriteStructBegin(ctx, "enable_debugging_args"); err != nil { 4467 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 4468 if p != nil { 4469 if err := p.writeField1(ctx, oprot); err != nil { return err } 4470 } 4471 if err := oprot.WriteFieldStop(ctx); err != nil { 4472 return thrift.PrependError("write field stop error: ", err) } 4473 if err := oprot.WriteStructEnd(ctx); err != nil { 4474 return thrift.PrependError("write struct stop error: ", err) } 4475 return nil 4476 } 4477 4478 func (p *IPCChainTesterEnableDebuggingArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 4479 if err := oprot.WriteFieldBegin(ctx, "enable", thrift.BOOL, 1); err != nil { 4480 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:enable: ", p), err) } 4481 if err := oprot.WriteBool(ctx, bool(p.Enable)); err != nil { 4482 return thrift.PrependError(fmt.Sprintf("%T.enable (1) field write error: ", p), err) } 4483 if err := oprot.WriteFieldEnd(ctx); err != nil { 4484 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:enable: ", p), err) } 4485 return err 4486 } 4487 4488 func (p *IPCChainTesterEnableDebuggingArgs) String() string { 4489 if p == nil { 4490 return "<nil>" 4491 } 4492 return fmt.Sprintf("IPCChainTesterEnableDebuggingArgs(%+v)", *p) 4493 } 4494 4495 type IPCChainTesterEnableDebuggingResult struct { 4496 } 4497 4498 func NewIPCChainTesterEnableDebuggingResult() *IPCChainTesterEnableDebuggingResult { 4499 return &IPCChainTesterEnableDebuggingResult{} 4500 } 4501 4502 func (p *IPCChainTesterEnableDebuggingResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 4503 if _, err := iprot.ReadStructBegin(ctx); err != nil { 4504 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 4505 } 4506 4507 4508 for { 4509 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 4510 if err != nil { 4511 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 4512 } 4513 if fieldTypeId == thrift.STOP { break; } 4514 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4515 return err 4516 } 4517 if err := iprot.ReadFieldEnd(ctx); err != nil { 4518 return err 4519 } 4520 } 4521 if err := iprot.ReadStructEnd(ctx); err != nil { 4522 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 4523 } 4524 return nil 4525 } 4526 4527 func (p *IPCChainTesterEnableDebuggingResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 4528 if err := oprot.WriteStructBegin(ctx, "enable_debugging_result"); err != nil { 4529 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 4530 if p != nil { 4531 } 4532 if err := oprot.WriteFieldStop(ctx); err != nil { 4533 return thrift.PrependError("write field stop error: ", err) } 4534 if err := oprot.WriteStructEnd(ctx); err != nil { 4535 return thrift.PrependError("write struct stop error: ", err) } 4536 return nil 4537 } 4538 4539 func (p *IPCChainTesterEnableDebuggingResult) String() string { 4540 if p == nil { 4541 return "<nil>" 4542 } 4543 return fmt.Sprintf("IPCChainTesterEnableDebuggingResult(%+v)", *p) 4544 } 4545 4546 // Attributes: 4547 // - ID 4548 // - Contract 4549 // - Enable 4550 type IPCChainTesterEnableDebugContractArgs struct { 4551 ID int32 `thrift:"id,1" db:"id" json:"id"` 4552 Contract string `thrift:"contract,2" db:"contract" json:"contract"` 4553 Enable bool `thrift:"enable,3" db:"enable" json:"enable"` 4554 } 4555 4556 func NewIPCChainTesterEnableDebugContractArgs() *IPCChainTesterEnableDebugContractArgs { 4557 return &IPCChainTesterEnableDebugContractArgs{} 4558 } 4559 4560 4561 func (p *IPCChainTesterEnableDebugContractArgs) GetID() int32 { 4562 return p.ID 4563 } 4564 4565 func (p *IPCChainTesterEnableDebugContractArgs) GetContract() string { 4566 return p.Contract 4567 } 4568 4569 func (p *IPCChainTesterEnableDebugContractArgs) GetEnable() bool { 4570 return p.Enable 4571 } 4572 func (p *IPCChainTesterEnableDebugContractArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 4573 if _, err := iprot.ReadStructBegin(ctx); err != nil { 4574 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 4575 } 4576 4577 4578 for { 4579 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 4580 if err != nil { 4581 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 4582 } 4583 if fieldTypeId == thrift.STOP { break; } 4584 switch fieldId { 4585 case 1: 4586 if fieldTypeId == thrift.I32 { 4587 if err := p.ReadField1(ctx, iprot); err != nil { 4588 return err 4589 } 4590 } else { 4591 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4592 return err 4593 } 4594 } 4595 case 2: 4596 if fieldTypeId == thrift.STRING { 4597 if err := p.ReadField2(ctx, iprot); err != nil { 4598 return err 4599 } 4600 } else { 4601 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4602 return err 4603 } 4604 } 4605 case 3: 4606 if fieldTypeId == thrift.BOOL { 4607 if err := p.ReadField3(ctx, iprot); err != nil { 4608 return err 4609 } 4610 } else { 4611 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4612 return err 4613 } 4614 } 4615 default: 4616 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4617 return err 4618 } 4619 } 4620 if err := iprot.ReadFieldEnd(ctx); err != nil { 4621 return err 4622 } 4623 } 4624 if err := iprot.ReadStructEnd(ctx); err != nil { 4625 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 4626 } 4627 return nil 4628 } 4629 4630 func (p *IPCChainTesterEnableDebugContractArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 4631 if v, err := iprot.ReadI32(ctx); err != nil { 4632 return thrift.PrependError("error reading field 1: ", err) 4633 } else { 4634 p.ID = v 4635 } 4636 return nil 4637 } 4638 4639 func (p *IPCChainTesterEnableDebugContractArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 4640 if v, err := iprot.ReadString(ctx); err != nil { 4641 return thrift.PrependError("error reading field 2: ", err) 4642 } else { 4643 p.Contract = v 4644 } 4645 return nil 4646 } 4647 4648 func (p *IPCChainTesterEnableDebugContractArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 4649 if v, err := iprot.ReadBool(ctx); err != nil { 4650 return thrift.PrependError("error reading field 3: ", err) 4651 } else { 4652 p.Enable = v 4653 } 4654 return nil 4655 } 4656 4657 func (p *IPCChainTesterEnableDebugContractArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 4658 if err := oprot.WriteStructBegin(ctx, "enable_debug_contract_args"); err != nil { 4659 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 4660 if p != nil { 4661 if err := p.writeField1(ctx, oprot); err != nil { return err } 4662 if err := p.writeField2(ctx, oprot); err != nil { return err } 4663 if err := p.writeField3(ctx, oprot); err != nil { return err } 4664 } 4665 if err := oprot.WriteFieldStop(ctx); err != nil { 4666 return thrift.PrependError("write field stop error: ", err) } 4667 if err := oprot.WriteStructEnd(ctx); err != nil { 4668 return thrift.PrependError("write struct stop error: ", err) } 4669 return nil 4670 } 4671 4672 func (p *IPCChainTesterEnableDebugContractArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 4673 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 4674 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 4675 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 4676 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 4677 if err := oprot.WriteFieldEnd(ctx); err != nil { 4678 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 4679 return err 4680 } 4681 4682 func (p *IPCChainTesterEnableDebugContractArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 4683 if err := oprot.WriteFieldBegin(ctx, "contract", thrift.STRING, 2); err != nil { 4684 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:contract: ", p), err) } 4685 if err := oprot.WriteString(ctx, string(p.Contract)); err != nil { 4686 return thrift.PrependError(fmt.Sprintf("%T.contract (2) field write error: ", p), err) } 4687 if err := oprot.WriteFieldEnd(ctx); err != nil { 4688 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:contract: ", p), err) } 4689 return err 4690 } 4691 4692 func (p *IPCChainTesterEnableDebugContractArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 4693 if err := oprot.WriteFieldBegin(ctx, "enable", thrift.BOOL, 3); err != nil { 4694 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:enable: ", p), err) } 4695 if err := oprot.WriteBool(ctx, bool(p.Enable)); err != nil { 4696 return thrift.PrependError(fmt.Sprintf("%T.enable (3) field write error: ", p), err) } 4697 if err := oprot.WriteFieldEnd(ctx); err != nil { 4698 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:enable: ", p), err) } 4699 return err 4700 } 4701 4702 func (p *IPCChainTesterEnableDebugContractArgs) String() string { 4703 if p == nil { 4704 return "<nil>" 4705 } 4706 return fmt.Sprintf("IPCChainTesterEnableDebugContractArgs(%+v)", *p) 4707 } 4708 4709 type IPCChainTesterEnableDebugContractResult struct { 4710 } 4711 4712 func NewIPCChainTesterEnableDebugContractResult() *IPCChainTesterEnableDebugContractResult { 4713 return &IPCChainTesterEnableDebugContractResult{} 4714 } 4715 4716 func (p *IPCChainTesterEnableDebugContractResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 4717 if _, err := iprot.ReadStructBegin(ctx); err != nil { 4718 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 4719 } 4720 4721 4722 for { 4723 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 4724 if err != nil { 4725 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 4726 } 4727 if fieldTypeId == thrift.STOP { break; } 4728 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4729 return err 4730 } 4731 if err := iprot.ReadFieldEnd(ctx); err != nil { 4732 return err 4733 } 4734 } 4735 if err := iprot.ReadStructEnd(ctx); err != nil { 4736 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 4737 } 4738 return nil 4739 } 4740 4741 func (p *IPCChainTesterEnableDebugContractResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 4742 if err := oprot.WriteStructBegin(ctx, "enable_debug_contract_result"); err != nil { 4743 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 4744 if p != nil { 4745 } 4746 if err := oprot.WriteFieldStop(ctx); err != nil { 4747 return thrift.PrependError("write field stop error: ", err) } 4748 if err := oprot.WriteStructEnd(ctx); err != nil { 4749 return thrift.PrependError("write struct stop error: ", err) } 4750 return nil 4751 } 4752 4753 func (p *IPCChainTesterEnableDebugContractResult) String() string { 4754 if p == nil { 4755 return "<nil>" 4756 } 4757 return fmt.Sprintf("IPCChainTesterEnableDebugContractResult(%+v)", *p) 4758 } 4759 4760 // Attributes: 4761 // - ID 4762 // - Contract 4763 type IPCChainTesterIsDebugContractEnabledArgs struct { 4764 ID int32 `thrift:"id,1" db:"id" json:"id"` 4765 Contract string `thrift:"contract,2" db:"contract" json:"contract"` 4766 } 4767 4768 func NewIPCChainTesterIsDebugContractEnabledArgs() *IPCChainTesterIsDebugContractEnabledArgs { 4769 return &IPCChainTesterIsDebugContractEnabledArgs{} 4770 } 4771 4772 4773 func (p *IPCChainTesterIsDebugContractEnabledArgs) GetID() int32 { 4774 return p.ID 4775 } 4776 4777 func (p *IPCChainTesterIsDebugContractEnabledArgs) GetContract() string { 4778 return p.Contract 4779 } 4780 func (p *IPCChainTesterIsDebugContractEnabledArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 4781 if _, err := iprot.ReadStructBegin(ctx); err != nil { 4782 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 4783 } 4784 4785 4786 for { 4787 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 4788 if err != nil { 4789 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 4790 } 4791 if fieldTypeId == thrift.STOP { break; } 4792 switch fieldId { 4793 case 1: 4794 if fieldTypeId == thrift.I32 { 4795 if err := p.ReadField1(ctx, iprot); err != nil { 4796 return err 4797 } 4798 } else { 4799 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4800 return err 4801 } 4802 } 4803 case 2: 4804 if fieldTypeId == thrift.STRING { 4805 if err := p.ReadField2(ctx, iprot); err != nil { 4806 return err 4807 } 4808 } else { 4809 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4810 return err 4811 } 4812 } 4813 default: 4814 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4815 return err 4816 } 4817 } 4818 if err := iprot.ReadFieldEnd(ctx); err != nil { 4819 return err 4820 } 4821 } 4822 if err := iprot.ReadStructEnd(ctx); err != nil { 4823 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 4824 } 4825 return nil 4826 } 4827 4828 func (p *IPCChainTesterIsDebugContractEnabledArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 4829 if v, err := iprot.ReadI32(ctx); err != nil { 4830 return thrift.PrependError("error reading field 1: ", err) 4831 } else { 4832 p.ID = v 4833 } 4834 return nil 4835 } 4836 4837 func (p *IPCChainTesterIsDebugContractEnabledArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 4838 if v, err := iprot.ReadString(ctx); err != nil { 4839 return thrift.PrependError("error reading field 2: ", err) 4840 } else { 4841 p.Contract = v 4842 } 4843 return nil 4844 } 4845 4846 func (p *IPCChainTesterIsDebugContractEnabledArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 4847 if err := oprot.WriteStructBegin(ctx, "is_debug_contract_enabled_args"); err != nil { 4848 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 4849 if p != nil { 4850 if err := p.writeField1(ctx, oprot); err != nil { return err } 4851 if err := p.writeField2(ctx, oprot); err != nil { return err } 4852 } 4853 if err := oprot.WriteFieldStop(ctx); err != nil { 4854 return thrift.PrependError("write field stop error: ", err) } 4855 if err := oprot.WriteStructEnd(ctx); err != nil { 4856 return thrift.PrependError("write struct stop error: ", err) } 4857 return nil 4858 } 4859 4860 func (p *IPCChainTesterIsDebugContractEnabledArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 4861 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 4862 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 4863 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 4864 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 4865 if err := oprot.WriteFieldEnd(ctx); err != nil { 4866 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 4867 return err 4868 } 4869 4870 func (p *IPCChainTesterIsDebugContractEnabledArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 4871 if err := oprot.WriteFieldBegin(ctx, "contract", thrift.STRING, 2); err != nil { 4872 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:contract: ", p), err) } 4873 if err := oprot.WriteString(ctx, string(p.Contract)); err != nil { 4874 return thrift.PrependError(fmt.Sprintf("%T.contract (2) field write error: ", p), err) } 4875 if err := oprot.WriteFieldEnd(ctx); err != nil { 4876 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:contract: ", p), err) } 4877 return err 4878 } 4879 4880 func (p *IPCChainTesterIsDebugContractEnabledArgs) String() string { 4881 if p == nil { 4882 return "<nil>" 4883 } 4884 return fmt.Sprintf("IPCChainTesterIsDebugContractEnabledArgs(%+v)", *p) 4885 } 4886 4887 // Attributes: 4888 // - Success 4889 type IPCChainTesterIsDebugContractEnabledResult struct { 4890 Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` 4891 } 4892 4893 func NewIPCChainTesterIsDebugContractEnabledResult() *IPCChainTesterIsDebugContractEnabledResult { 4894 return &IPCChainTesterIsDebugContractEnabledResult{} 4895 } 4896 4897 var IPCChainTesterIsDebugContractEnabledResult_Success_DEFAULT bool 4898 func (p *IPCChainTesterIsDebugContractEnabledResult) GetSuccess() bool { 4899 if !p.IsSetSuccess() { 4900 return IPCChainTesterIsDebugContractEnabledResult_Success_DEFAULT 4901 } 4902 return *p.Success 4903 } 4904 func (p *IPCChainTesterIsDebugContractEnabledResult) IsSetSuccess() bool { 4905 return p.Success != nil 4906 } 4907 4908 func (p *IPCChainTesterIsDebugContractEnabledResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 4909 if _, err := iprot.ReadStructBegin(ctx); err != nil { 4910 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 4911 } 4912 4913 4914 for { 4915 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 4916 if err != nil { 4917 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 4918 } 4919 if fieldTypeId == thrift.STOP { break; } 4920 switch fieldId { 4921 case 0: 4922 if fieldTypeId == thrift.BOOL { 4923 if err := p.ReadField0(ctx, iprot); err != nil { 4924 return err 4925 } 4926 } else { 4927 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4928 return err 4929 } 4930 } 4931 default: 4932 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 4933 return err 4934 } 4935 } 4936 if err := iprot.ReadFieldEnd(ctx); err != nil { 4937 return err 4938 } 4939 } 4940 if err := iprot.ReadStructEnd(ctx); err != nil { 4941 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 4942 } 4943 return nil 4944 } 4945 4946 func (p *IPCChainTesterIsDebugContractEnabledResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 4947 if v, err := iprot.ReadBool(ctx); err != nil { 4948 return thrift.PrependError("error reading field 0: ", err) 4949 } else { 4950 p.Success = &v 4951 } 4952 return nil 4953 } 4954 4955 func (p *IPCChainTesterIsDebugContractEnabledResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 4956 if err := oprot.WriteStructBegin(ctx, "is_debug_contract_enabled_result"); err != nil { 4957 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 4958 if p != nil { 4959 if err := p.writeField0(ctx, oprot); err != nil { return err } 4960 } 4961 if err := oprot.WriteFieldStop(ctx); err != nil { 4962 return thrift.PrependError("write field stop error: ", err) } 4963 if err := oprot.WriteStructEnd(ctx); err != nil { 4964 return thrift.PrependError("write struct stop error: ", err) } 4965 return nil 4966 } 4967 4968 func (p *IPCChainTesterIsDebugContractEnabledResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 4969 if p.IsSetSuccess() { 4970 if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { 4971 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 4972 if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { 4973 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 4974 if err := oprot.WriteFieldEnd(ctx); err != nil { 4975 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 4976 } 4977 return err 4978 } 4979 4980 func (p *IPCChainTesterIsDebugContractEnabledResult) String() string { 4981 if p == nil { 4982 return "<nil>" 4983 } 4984 return fmt.Sprintf("IPCChainTesterIsDebugContractEnabledResult(%+v)", *p) 4985 } 4986 4987 // Attributes: 4988 // - Abi 4989 type IPCChainTesterPackAbiArgs struct { 4990 Abi string `thrift:"abi,1" db:"abi" json:"abi"` 4991 } 4992 4993 func NewIPCChainTesterPackAbiArgs() *IPCChainTesterPackAbiArgs { 4994 return &IPCChainTesterPackAbiArgs{} 4995 } 4996 4997 4998 func (p *IPCChainTesterPackAbiArgs) GetAbi() string { 4999 return p.Abi 5000 } 5001 func (p *IPCChainTesterPackAbiArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 5002 if _, err := iprot.ReadStructBegin(ctx); err != nil { 5003 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 5004 } 5005 5006 5007 for { 5008 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 5009 if err != nil { 5010 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 5011 } 5012 if fieldTypeId == thrift.STOP { break; } 5013 switch fieldId { 5014 case 1: 5015 if fieldTypeId == thrift.STRING { 5016 if err := p.ReadField1(ctx, iprot); err != nil { 5017 return err 5018 } 5019 } else { 5020 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5021 return err 5022 } 5023 } 5024 default: 5025 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5026 return err 5027 } 5028 } 5029 if err := iprot.ReadFieldEnd(ctx); err != nil { 5030 return err 5031 } 5032 } 5033 if err := iprot.ReadStructEnd(ctx); err != nil { 5034 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 5035 } 5036 return nil 5037 } 5038 5039 func (p *IPCChainTesterPackAbiArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 5040 if v, err := iprot.ReadString(ctx); err != nil { 5041 return thrift.PrependError("error reading field 1: ", err) 5042 } else { 5043 p.Abi = v 5044 } 5045 return nil 5046 } 5047 5048 func (p *IPCChainTesterPackAbiArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 5049 if err := oprot.WriteStructBegin(ctx, "pack_abi_args"); err != nil { 5050 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 5051 if p != nil { 5052 if err := p.writeField1(ctx, oprot); err != nil { return err } 5053 } 5054 if err := oprot.WriteFieldStop(ctx); err != nil { 5055 return thrift.PrependError("write field stop error: ", err) } 5056 if err := oprot.WriteStructEnd(ctx); err != nil { 5057 return thrift.PrependError("write struct stop error: ", err) } 5058 return nil 5059 } 5060 5061 func (p *IPCChainTesterPackAbiArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 5062 if err := oprot.WriteFieldBegin(ctx, "abi", thrift.STRING, 1); err != nil { 5063 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:abi: ", p), err) } 5064 if err := oprot.WriteString(ctx, string(p.Abi)); err != nil { 5065 return thrift.PrependError(fmt.Sprintf("%T.abi (1) field write error: ", p), err) } 5066 if err := oprot.WriteFieldEnd(ctx); err != nil { 5067 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:abi: ", p), err) } 5068 return err 5069 } 5070 5071 func (p *IPCChainTesterPackAbiArgs) String() string { 5072 if p == nil { 5073 return "<nil>" 5074 } 5075 return fmt.Sprintf("IPCChainTesterPackAbiArgs(%+v)", *p) 5076 } 5077 5078 // Attributes: 5079 // - Success 5080 type IPCChainTesterPackAbiResult struct { 5081 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 5082 } 5083 5084 func NewIPCChainTesterPackAbiResult() *IPCChainTesterPackAbiResult { 5085 return &IPCChainTesterPackAbiResult{} 5086 } 5087 5088 var IPCChainTesterPackAbiResult_Success_DEFAULT []byte 5089 5090 func (p *IPCChainTesterPackAbiResult) GetSuccess() []byte { 5091 return p.Success 5092 } 5093 func (p *IPCChainTesterPackAbiResult) IsSetSuccess() bool { 5094 return p.Success != nil 5095 } 5096 5097 func (p *IPCChainTesterPackAbiResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 5098 if _, err := iprot.ReadStructBegin(ctx); err != nil { 5099 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 5100 } 5101 5102 5103 for { 5104 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 5105 if err != nil { 5106 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 5107 } 5108 if fieldTypeId == thrift.STOP { break; } 5109 switch fieldId { 5110 case 0: 5111 if fieldTypeId == thrift.STRING { 5112 if err := p.ReadField0(ctx, iprot); err != nil { 5113 return err 5114 } 5115 } else { 5116 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5117 return err 5118 } 5119 } 5120 default: 5121 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5122 return err 5123 } 5124 } 5125 if err := iprot.ReadFieldEnd(ctx); err != nil { 5126 return err 5127 } 5128 } 5129 if err := iprot.ReadStructEnd(ctx); err != nil { 5130 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 5131 } 5132 return nil 5133 } 5134 5135 func (p *IPCChainTesterPackAbiResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 5136 if v, err := iprot.ReadBinary(ctx); err != nil { 5137 return thrift.PrependError("error reading field 0: ", err) 5138 } else { 5139 p.Success = v 5140 } 5141 return nil 5142 } 5143 5144 func (p *IPCChainTesterPackAbiResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 5145 if err := oprot.WriteStructBegin(ctx, "pack_abi_result"); err != nil { 5146 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 5147 if p != nil { 5148 if err := p.writeField0(ctx, oprot); err != nil { return err } 5149 } 5150 if err := oprot.WriteFieldStop(ctx); err != nil { 5151 return thrift.PrependError("write field stop error: ", err) } 5152 if err := oprot.WriteStructEnd(ctx); err != nil { 5153 return thrift.PrependError("write struct stop error: ", err) } 5154 return nil 5155 } 5156 5157 func (p *IPCChainTesterPackAbiResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 5158 if p.IsSetSuccess() { 5159 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 5160 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 5161 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 5162 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 5163 if err := oprot.WriteFieldEnd(ctx); err != nil { 5164 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 5165 } 5166 return err 5167 } 5168 5169 func (p *IPCChainTesterPackAbiResult) String() string { 5170 if p == nil { 5171 return "<nil>" 5172 } 5173 return fmt.Sprintf("IPCChainTesterPackAbiResult(%+v)", *p) 5174 } 5175 5176 // Attributes: 5177 // - ID 5178 // - Contract 5179 // - Action 5180 // - ActionArgs_ 5181 type IPCChainTesterPackActionArgsArgs struct { 5182 ID int32 `thrift:"id,1" db:"id" json:"id"` 5183 Contract string `thrift:"contract,2" db:"contract" json:"contract"` 5184 Action string `thrift:"action,3" db:"action" json:"action"` 5185 ActionArgs_ string `thrift:"action_args,4" db:"action_args" json:"action_args"` 5186 } 5187 5188 func NewIPCChainTesterPackActionArgsArgs() *IPCChainTesterPackActionArgsArgs { 5189 return &IPCChainTesterPackActionArgsArgs{} 5190 } 5191 5192 5193 func (p *IPCChainTesterPackActionArgsArgs) GetID() int32 { 5194 return p.ID 5195 } 5196 5197 func (p *IPCChainTesterPackActionArgsArgs) GetContract() string { 5198 return p.Contract 5199 } 5200 5201 func (p *IPCChainTesterPackActionArgsArgs) GetAction() string { 5202 return p.Action 5203 } 5204 5205 func (p *IPCChainTesterPackActionArgsArgs) GetActionArgs_() string { 5206 return p.ActionArgs_ 5207 } 5208 func (p *IPCChainTesterPackActionArgsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 5209 if _, err := iprot.ReadStructBegin(ctx); err != nil { 5210 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 5211 } 5212 5213 5214 for { 5215 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 5216 if err != nil { 5217 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 5218 } 5219 if fieldTypeId == thrift.STOP { break; } 5220 switch fieldId { 5221 case 1: 5222 if fieldTypeId == thrift.I32 { 5223 if err := p.ReadField1(ctx, iprot); err != nil { 5224 return err 5225 } 5226 } else { 5227 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5228 return err 5229 } 5230 } 5231 case 2: 5232 if fieldTypeId == thrift.STRING { 5233 if err := p.ReadField2(ctx, iprot); err != nil { 5234 return err 5235 } 5236 } else { 5237 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5238 return err 5239 } 5240 } 5241 case 3: 5242 if fieldTypeId == thrift.STRING { 5243 if err := p.ReadField3(ctx, iprot); err != nil { 5244 return err 5245 } 5246 } else { 5247 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5248 return err 5249 } 5250 } 5251 case 4: 5252 if fieldTypeId == thrift.STRING { 5253 if err := p.ReadField4(ctx, iprot); err != nil { 5254 return err 5255 } 5256 } else { 5257 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5258 return err 5259 } 5260 } 5261 default: 5262 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5263 return err 5264 } 5265 } 5266 if err := iprot.ReadFieldEnd(ctx); err != nil { 5267 return err 5268 } 5269 } 5270 if err := iprot.ReadStructEnd(ctx); err != nil { 5271 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 5272 } 5273 return nil 5274 } 5275 5276 func (p *IPCChainTesterPackActionArgsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 5277 if v, err := iprot.ReadI32(ctx); err != nil { 5278 return thrift.PrependError("error reading field 1: ", err) 5279 } else { 5280 p.ID = v 5281 } 5282 return nil 5283 } 5284 5285 func (p *IPCChainTesterPackActionArgsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 5286 if v, err := iprot.ReadString(ctx); err != nil { 5287 return thrift.PrependError("error reading field 2: ", err) 5288 } else { 5289 p.Contract = v 5290 } 5291 return nil 5292 } 5293 5294 func (p *IPCChainTesterPackActionArgsArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 5295 if v, err := iprot.ReadString(ctx); err != nil { 5296 return thrift.PrependError("error reading field 3: ", err) 5297 } else { 5298 p.Action = v 5299 } 5300 return nil 5301 } 5302 5303 func (p *IPCChainTesterPackActionArgsArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 5304 if v, err := iprot.ReadString(ctx); err != nil { 5305 return thrift.PrependError("error reading field 4: ", err) 5306 } else { 5307 p.ActionArgs_ = v 5308 } 5309 return nil 5310 } 5311 5312 func (p *IPCChainTesterPackActionArgsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 5313 if err := oprot.WriteStructBegin(ctx, "pack_action_args_args"); err != nil { 5314 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 5315 if p != nil { 5316 if err := p.writeField1(ctx, oprot); err != nil { return err } 5317 if err := p.writeField2(ctx, oprot); err != nil { return err } 5318 if err := p.writeField3(ctx, oprot); err != nil { return err } 5319 if err := p.writeField4(ctx, oprot); err != nil { return err } 5320 } 5321 if err := oprot.WriteFieldStop(ctx); err != nil { 5322 return thrift.PrependError("write field stop error: ", err) } 5323 if err := oprot.WriteStructEnd(ctx); err != nil { 5324 return thrift.PrependError("write struct stop error: ", err) } 5325 return nil 5326 } 5327 5328 func (p *IPCChainTesterPackActionArgsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 5329 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 5330 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 5331 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 5332 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 5333 if err := oprot.WriteFieldEnd(ctx); err != nil { 5334 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 5335 return err 5336 } 5337 5338 func (p *IPCChainTesterPackActionArgsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 5339 if err := oprot.WriteFieldBegin(ctx, "contract", thrift.STRING, 2); err != nil { 5340 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:contract: ", p), err) } 5341 if err := oprot.WriteString(ctx, string(p.Contract)); err != nil { 5342 return thrift.PrependError(fmt.Sprintf("%T.contract (2) field write error: ", p), err) } 5343 if err := oprot.WriteFieldEnd(ctx); err != nil { 5344 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:contract: ", p), err) } 5345 return err 5346 } 5347 5348 func (p *IPCChainTesterPackActionArgsArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 5349 if err := oprot.WriteFieldBegin(ctx, "action", thrift.STRING, 3); err != nil { 5350 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:action: ", p), err) } 5351 if err := oprot.WriteString(ctx, string(p.Action)); err != nil { 5352 return thrift.PrependError(fmt.Sprintf("%T.action (3) field write error: ", p), err) } 5353 if err := oprot.WriteFieldEnd(ctx); err != nil { 5354 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:action: ", p), err) } 5355 return err 5356 } 5357 5358 func (p *IPCChainTesterPackActionArgsArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 5359 if err := oprot.WriteFieldBegin(ctx, "action_args", thrift.STRING, 4); err != nil { 5360 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:action_args: ", p), err) } 5361 if err := oprot.WriteString(ctx, string(p.ActionArgs_)); err != nil { 5362 return thrift.PrependError(fmt.Sprintf("%T.action_args (4) field write error: ", p), err) } 5363 if err := oprot.WriteFieldEnd(ctx); err != nil { 5364 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:action_args: ", p), err) } 5365 return err 5366 } 5367 5368 func (p *IPCChainTesterPackActionArgsArgs) String() string { 5369 if p == nil { 5370 return "<nil>" 5371 } 5372 return fmt.Sprintf("IPCChainTesterPackActionArgsArgs(%+v)", *p) 5373 } 5374 5375 // Attributes: 5376 // - Success 5377 type IPCChainTesterPackActionArgsResult struct { 5378 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 5379 } 5380 5381 func NewIPCChainTesterPackActionArgsResult() *IPCChainTesterPackActionArgsResult { 5382 return &IPCChainTesterPackActionArgsResult{} 5383 } 5384 5385 var IPCChainTesterPackActionArgsResult_Success_DEFAULT []byte 5386 5387 func (p *IPCChainTesterPackActionArgsResult) GetSuccess() []byte { 5388 return p.Success 5389 } 5390 func (p *IPCChainTesterPackActionArgsResult) IsSetSuccess() bool { 5391 return p.Success != nil 5392 } 5393 5394 func (p *IPCChainTesterPackActionArgsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 5395 if _, err := iprot.ReadStructBegin(ctx); err != nil { 5396 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 5397 } 5398 5399 5400 for { 5401 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 5402 if err != nil { 5403 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 5404 } 5405 if fieldTypeId == thrift.STOP { break; } 5406 switch fieldId { 5407 case 0: 5408 if fieldTypeId == thrift.STRING { 5409 if err := p.ReadField0(ctx, iprot); err != nil { 5410 return err 5411 } 5412 } else { 5413 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5414 return err 5415 } 5416 } 5417 default: 5418 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5419 return err 5420 } 5421 } 5422 if err := iprot.ReadFieldEnd(ctx); err != nil { 5423 return err 5424 } 5425 } 5426 if err := iprot.ReadStructEnd(ctx); err != nil { 5427 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 5428 } 5429 return nil 5430 } 5431 5432 func (p *IPCChainTesterPackActionArgsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 5433 if v, err := iprot.ReadBinary(ctx); err != nil { 5434 return thrift.PrependError("error reading field 0: ", err) 5435 } else { 5436 p.Success = v 5437 } 5438 return nil 5439 } 5440 5441 func (p *IPCChainTesterPackActionArgsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 5442 if err := oprot.WriteStructBegin(ctx, "pack_action_args_result"); err != nil { 5443 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 5444 if p != nil { 5445 if err := p.writeField0(ctx, oprot); err != nil { return err } 5446 } 5447 if err := oprot.WriteFieldStop(ctx); err != nil { 5448 return thrift.PrependError("write field stop error: ", err) } 5449 if err := oprot.WriteStructEnd(ctx); err != nil { 5450 return thrift.PrependError("write struct stop error: ", err) } 5451 return nil 5452 } 5453 5454 func (p *IPCChainTesterPackActionArgsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 5455 if p.IsSetSuccess() { 5456 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 5457 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 5458 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 5459 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 5460 if err := oprot.WriteFieldEnd(ctx); err != nil { 5461 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 5462 } 5463 return err 5464 } 5465 5466 func (p *IPCChainTesterPackActionArgsResult) String() string { 5467 if p == nil { 5468 return "<nil>" 5469 } 5470 return fmt.Sprintf("IPCChainTesterPackActionArgsResult(%+v)", *p) 5471 } 5472 5473 // Attributes: 5474 // - ID 5475 // - Contract 5476 // - Action 5477 // - RawArgs_ 5478 type IPCChainTesterUnpackActionArgsArgs struct { 5479 ID int32 `thrift:"id,1" db:"id" json:"id"` 5480 Contract string `thrift:"contract,2" db:"contract" json:"contract"` 5481 Action string `thrift:"action,3" db:"action" json:"action"` 5482 RawArgs_ []byte `thrift:"raw_args,4" db:"raw_args" json:"raw_args"` 5483 } 5484 5485 func NewIPCChainTesterUnpackActionArgsArgs() *IPCChainTesterUnpackActionArgsArgs { 5486 return &IPCChainTesterUnpackActionArgsArgs{} 5487 } 5488 5489 5490 func (p *IPCChainTesterUnpackActionArgsArgs) GetID() int32 { 5491 return p.ID 5492 } 5493 5494 func (p *IPCChainTesterUnpackActionArgsArgs) GetContract() string { 5495 return p.Contract 5496 } 5497 5498 func (p *IPCChainTesterUnpackActionArgsArgs) GetAction() string { 5499 return p.Action 5500 } 5501 5502 func (p *IPCChainTesterUnpackActionArgsArgs) GetRawArgs_() []byte { 5503 return p.RawArgs_ 5504 } 5505 func (p *IPCChainTesterUnpackActionArgsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 5506 if _, err := iprot.ReadStructBegin(ctx); err != nil { 5507 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 5508 } 5509 5510 5511 for { 5512 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 5513 if err != nil { 5514 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 5515 } 5516 if fieldTypeId == thrift.STOP { break; } 5517 switch fieldId { 5518 case 1: 5519 if fieldTypeId == thrift.I32 { 5520 if err := p.ReadField1(ctx, iprot); err != nil { 5521 return err 5522 } 5523 } else { 5524 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5525 return err 5526 } 5527 } 5528 case 2: 5529 if fieldTypeId == thrift.STRING { 5530 if err := p.ReadField2(ctx, iprot); err != nil { 5531 return err 5532 } 5533 } else { 5534 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5535 return err 5536 } 5537 } 5538 case 3: 5539 if fieldTypeId == thrift.STRING { 5540 if err := p.ReadField3(ctx, iprot); err != nil { 5541 return err 5542 } 5543 } else { 5544 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5545 return err 5546 } 5547 } 5548 case 4: 5549 if fieldTypeId == thrift.STRING { 5550 if err := p.ReadField4(ctx, iprot); err != nil { 5551 return err 5552 } 5553 } else { 5554 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5555 return err 5556 } 5557 } 5558 default: 5559 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5560 return err 5561 } 5562 } 5563 if err := iprot.ReadFieldEnd(ctx); err != nil { 5564 return err 5565 } 5566 } 5567 if err := iprot.ReadStructEnd(ctx); err != nil { 5568 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 5569 } 5570 return nil 5571 } 5572 5573 func (p *IPCChainTesterUnpackActionArgsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 5574 if v, err := iprot.ReadI32(ctx); err != nil { 5575 return thrift.PrependError("error reading field 1: ", err) 5576 } else { 5577 p.ID = v 5578 } 5579 return nil 5580 } 5581 5582 func (p *IPCChainTesterUnpackActionArgsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 5583 if v, err := iprot.ReadString(ctx); err != nil { 5584 return thrift.PrependError("error reading field 2: ", err) 5585 } else { 5586 p.Contract = v 5587 } 5588 return nil 5589 } 5590 5591 func (p *IPCChainTesterUnpackActionArgsArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 5592 if v, err := iprot.ReadString(ctx); err != nil { 5593 return thrift.PrependError("error reading field 3: ", err) 5594 } else { 5595 p.Action = v 5596 } 5597 return nil 5598 } 5599 5600 func (p *IPCChainTesterUnpackActionArgsArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 5601 if v, err := iprot.ReadBinary(ctx); err != nil { 5602 return thrift.PrependError("error reading field 4: ", err) 5603 } else { 5604 p.RawArgs_ = v 5605 } 5606 return nil 5607 } 5608 5609 func (p *IPCChainTesterUnpackActionArgsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 5610 if err := oprot.WriteStructBegin(ctx, "unpack_action_args_args"); err != nil { 5611 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 5612 if p != nil { 5613 if err := p.writeField1(ctx, oprot); err != nil { return err } 5614 if err := p.writeField2(ctx, oprot); err != nil { return err } 5615 if err := p.writeField3(ctx, oprot); err != nil { return err } 5616 if err := p.writeField4(ctx, oprot); err != nil { return err } 5617 } 5618 if err := oprot.WriteFieldStop(ctx); err != nil { 5619 return thrift.PrependError("write field stop error: ", err) } 5620 if err := oprot.WriteStructEnd(ctx); err != nil { 5621 return thrift.PrependError("write struct stop error: ", err) } 5622 return nil 5623 } 5624 5625 func (p *IPCChainTesterUnpackActionArgsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 5626 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 5627 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 5628 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 5629 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 5630 if err := oprot.WriteFieldEnd(ctx); err != nil { 5631 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 5632 return err 5633 } 5634 5635 func (p *IPCChainTesterUnpackActionArgsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 5636 if err := oprot.WriteFieldBegin(ctx, "contract", thrift.STRING, 2); err != nil { 5637 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:contract: ", p), err) } 5638 if err := oprot.WriteString(ctx, string(p.Contract)); err != nil { 5639 return thrift.PrependError(fmt.Sprintf("%T.contract (2) field write error: ", p), err) } 5640 if err := oprot.WriteFieldEnd(ctx); err != nil { 5641 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:contract: ", p), err) } 5642 return err 5643 } 5644 5645 func (p *IPCChainTesterUnpackActionArgsArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 5646 if err := oprot.WriteFieldBegin(ctx, "action", thrift.STRING, 3); err != nil { 5647 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:action: ", p), err) } 5648 if err := oprot.WriteString(ctx, string(p.Action)); err != nil { 5649 return thrift.PrependError(fmt.Sprintf("%T.action (3) field write error: ", p), err) } 5650 if err := oprot.WriteFieldEnd(ctx); err != nil { 5651 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:action: ", p), err) } 5652 return err 5653 } 5654 5655 func (p *IPCChainTesterUnpackActionArgsArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 5656 if err := oprot.WriteFieldBegin(ctx, "raw_args", thrift.STRING, 4); err != nil { 5657 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:raw_args: ", p), err) } 5658 if err := oprot.WriteBinary(ctx, p.RawArgs_); err != nil { 5659 return thrift.PrependError(fmt.Sprintf("%T.raw_args (4) field write error: ", p), err) } 5660 if err := oprot.WriteFieldEnd(ctx); err != nil { 5661 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:raw_args: ", p), err) } 5662 return err 5663 } 5664 5665 func (p *IPCChainTesterUnpackActionArgsArgs) String() string { 5666 if p == nil { 5667 return "<nil>" 5668 } 5669 return fmt.Sprintf("IPCChainTesterUnpackActionArgsArgs(%+v)", *p) 5670 } 5671 5672 // Attributes: 5673 // - Success 5674 type IPCChainTesterUnpackActionArgsResult struct { 5675 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 5676 } 5677 5678 func NewIPCChainTesterUnpackActionArgsResult() *IPCChainTesterUnpackActionArgsResult { 5679 return &IPCChainTesterUnpackActionArgsResult{} 5680 } 5681 5682 var IPCChainTesterUnpackActionArgsResult_Success_DEFAULT []byte 5683 5684 func (p *IPCChainTesterUnpackActionArgsResult) GetSuccess() []byte { 5685 return p.Success 5686 } 5687 func (p *IPCChainTesterUnpackActionArgsResult) IsSetSuccess() bool { 5688 return p.Success != nil 5689 } 5690 5691 func (p *IPCChainTesterUnpackActionArgsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 5692 if _, err := iprot.ReadStructBegin(ctx); err != nil { 5693 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 5694 } 5695 5696 5697 for { 5698 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 5699 if err != nil { 5700 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 5701 } 5702 if fieldTypeId == thrift.STOP { break; } 5703 switch fieldId { 5704 case 0: 5705 if fieldTypeId == thrift.STRING { 5706 if err := p.ReadField0(ctx, iprot); err != nil { 5707 return err 5708 } 5709 } else { 5710 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5711 return err 5712 } 5713 } 5714 default: 5715 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5716 return err 5717 } 5718 } 5719 if err := iprot.ReadFieldEnd(ctx); err != nil { 5720 return err 5721 } 5722 } 5723 if err := iprot.ReadStructEnd(ctx); err != nil { 5724 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 5725 } 5726 return nil 5727 } 5728 5729 func (p *IPCChainTesterUnpackActionArgsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 5730 if v, err := iprot.ReadBinary(ctx); err != nil { 5731 return thrift.PrependError("error reading field 0: ", err) 5732 } else { 5733 p.Success = v 5734 } 5735 return nil 5736 } 5737 5738 func (p *IPCChainTesterUnpackActionArgsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 5739 if err := oprot.WriteStructBegin(ctx, "unpack_action_args_result"); err != nil { 5740 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 5741 if p != nil { 5742 if err := p.writeField0(ctx, oprot); err != nil { return err } 5743 } 5744 if err := oprot.WriteFieldStop(ctx); err != nil { 5745 return thrift.PrependError("write field stop error: ", err) } 5746 if err := oprot.WriteStructEnd(ctx); err != nil { 5747 return thrift.PrependError("write struct stop error: ", err) } 5748 return nil 5749 } 5750 5751 func (p *IPCChainTesterUnpackActionArgsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 5752 if p.IsSetSuccess() { 5753 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 5754 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 5755 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 5756 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 5757 if err := oprot.WriteFieldEnd(ctx); err != nil { 5758 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 5759 } 5760 return err 5761 } 5762 5763 func (p *IPCChainTesterUnpackActionArgsResult) String() string { 5764 if p == nil { 5765 return "<nil>" 5766 } 5767 return fmt.Sprintf("IPCChainTesterUnpackActionArgsResult(%+v)", *p) 5768 } 5769 5770 // Attributes: 5771 // - Initialize 5772 type IPCChainTesterNewChainArgs_ struct { 5773 Initialize bool `thrift:"initialize,1" db:"initialize" json:"initialize"` 5774 } 5775 5776 func NewIPCChainTesterNewChainArgs_() *IPCChainTesterNewChainArgs_ { 5777 return &IPCChainTesterNewChainArgs_{} 5778 } 5779 5780 5781 func (p *IPCChainTesterNewChainArgs_) GetInitialize() bool { 5782 return p.Initialize 5783 } 5784 func (p *IPCChainTesterNewChainArgs_) Read(ctx context.Context, iprot thrift.TProtocol) error { 5785 if _, err := iprot.ReadStructBegin(ctx); err != nil { 5786 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 5787 } 5788 5789 5790 for { 5791 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 5792 if err != nil { 5793 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 5794 } 5795 if fieldTypeId == thrift.STOP { break; } 5796 switch fieldId { 5797 case 1: 5798 if fieldTypeId == thrift.BOOL { 5799 if err := p.ReadField1(ctx, iprot); err != nil { 5800 return err 5801 } 5802 } else { 5803 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5804 return err 5805 } 5806 } 5807 default: 5808 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5809 return err 5810 } 5811 } 5812 if err := iprot.ReadFieldEnd(ctx); err != nil { 5813 return err 5814 } 5815 } 5816 if err := iprot.ReadStructEnd(ctx); err != nil { 5817 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 5818 } 5819 return nil 5820 } 5821 5822 func (p *IPCChainTesterNewChainArgs_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 5823 if v, err := iprot.ReadBool(ctx); err != nil { 5824 return thrift.PrependError("error reading field 1: ", err) 5825 } else { 5826 p.Initialize = v 5827 } 5828 return nil 5829 } 5830 5831 func (p *IPCChainTesterNewChainArgs_) Write(ctx context.Context, oprot thrift.TProtocol) error { 5832 if err := oprot.WriteStructBegin(ctx, "new_chain_args"); err != nil { 5833 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 5834 if p != nil { 5835 if err := p.writeField1(ctx, oprot); err != nil { return err } 5836 } 5837 if err := oprot.WriteFieldStop(ctx); err != nil { 5838 return thrift.PrependError("write field stop error: ", err) } 5839 if err := oprot.WriteStructEnd(ctx); err != nil { 5840 return thrift.PrependError("write struct stop error: ", err) } 5841 return nil 5842 } 5843 5844 func (p *IPCChainTesterNewChainArgs_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 5845 if err := oprot.WriteFieldBegin(ctx, "initialize", thrift.BOOL, 1); err != nil { 5846 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:initialize: ", p), err) } 5847 if err := oprot.WriteBool(ctx, bool(p.Initialize)); err != nil { 5848 return thrift.PrependError(fmt.Sprintf("%T.initialize (1) field write error: ", p), err) } 5849 if err := oprot.WriteFieldEnd(ctx); err != nil { 5850 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:initialize: ", p), err) } 5851 return err 5852 } 5853 5854 func (p *IPCChainTesterNewChainArgs_) String() string { 5855 if p == nil { 5856 return "<nil>" 5857 } 5858 return fmt.Sprintf("IPCChainTesterNewChainArgs_(%+v)", *p) 5859 } 5860 5861 // Attributes: 5862 // - Success 5863 type IPCChainTesterNewChainResult_ struct { 5864 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 5865 } 5866 5867 func NewIPCChainTesterNewChainResult_() *IPCChainTesterNewChainResult_ { 5868 return &IPCChainTesterNewChainResult_{} 5869 } 5870 5871 var IPCChainTesterNewChainResult__Success_DEFAULT int32 5872 func (p *IPCChainTesterNewChainResult_) GetSuccess() int32 { 5873 if !p.IsSetSuccess() { 5874 return IPCChainTesterNewChainResult__Success_DEFAULT 5875 } 5876 return *p.Success 5877 } 5878 func (p *IPCChainTesterNewChainResult_) IsSetSuccess() bool { 5879 return p.Success != nil 5880 } 5881 5882 func (p *IPCChainTesterNewChainResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { 5883 if _, err := iprot.ReadStructBegin(ctx); err != nil { 5884 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 5885 } 5886 5887 5888 for { 5889 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 5890 if err != nil { 5891 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 5892 } 5893 if fieldTypeId == thrift.STOP { break; } 5894 switch fieldId { 5895 case 0: 5896 if fieldTypeId == thrift.I32 { 5897 if err := p.ReadField0(ctx, iprot); err != nil { 5898 return err 5899 } 5900 } else { 5901 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5902 return err 5903 } 5904 } 5905 default: 5906 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5907 return err 5908 } 5909 } 5910 if err := iprot.ReadFieldEnd(ctx); err != nil { 5911 return err 5912 } 5913 } 5914 if err := iprot.ReadStructEnd(ctx); err != nil { 5915 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 5916 } 5917 return nil 5918 } 5919 5920 func (p *IPCChainTesterNewChainResult_) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 5921 if v, err := iprot.ReadI32(ctx); err != nil { 5922 return thrift.PrependError("error reading field 0: ", err) 5923 } else { 5924 p.Success = &v 5925 } 5926 return nil 5927 } 5928 5929 func (p *IPCChainTesterNewChainResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { 5930 if err := oprot.WriteStructBegin(ctx, "new_chain_result"); err != nil { 5931 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 5932 if p != nil { 5933 if err := p.writeField0(ctx, oprot); err != nil { return err } 5934 } 5935 if err := oprot.WriteFieldStop(ctx); err != nil { 5936 return thrift.PrependError("write field stop error: ", err) } 5937 if err := oprot.WriteStructEnd(ctx); err != nil { 5938 return thrift.PrependError("write struct stop error: ", err) } 5939 return nil 5940 } 5941 5942 func (p *IPCChainTesterNewChainResult_) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 5943 if p.IsSetSuccess() { 5944 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 5945 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 5946 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 5947 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 5948 if err := oprot.WriteFieldEnd(ctx); err != nil { 5949 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 5950 } 5951 return err 5952 } 5953 5954 func (p *IPCChainTesterNewChainResult_) String() string { 5955 if p == nil { 5956 return "<nil>" 5957 } 5958 return fmt.Sprintf("IPCChainTesterNewChainResult_(%+v)", *p) 5959 } 5960 5961 // Attributes: 5962 // - ID 5963 type IPCChainTesterFreeChainArgs struct { 5964 ID int32 `thrift:"id,1" db:"id" json:"id"` 5965 } 5966 5967 func NewIPCChainTesterFreeChainArgs() *IPCChainTesterFreeChainArgs { 5968 return &IPCChainTesterFreeChainArgs{} 5969 } 5970 5971 5972 func (p *IPCChainTesterFreeChainArgs) GetID() int32 { 5973 return p.ID 5974 } 5975 func (p *IPCChainTesterFreeChainArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 5976 if _, err := iprot.ReadStructBegin(ctx); err != nil { 5977 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 5978 } 5979 5980 5981 for { 5982 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 5983 if err != nil { 5984 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 5985 } 5986 if fieldTypeId == thrift.STOP { break; } 5987 switch fieldId { 5988 case 1: 5989 if fieldTypeId == thrift.I32 { 5990 if err := p.ReadField1(ctx, iprot); err != nil { 5991 return err 5992 } 5993 } else { 5994 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 5995 return err 5996 } 5997 } 5998 default: 5999 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6000 return err 6001 } 6002 } 6003 if err := iprot.ReadFieldEnd(ctx); err != nil { 6004 return err 6005 } 6006 } 6007 if err := iprot.ReadStructEnd(ctx); err != nil { 6008 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 6009 } 6010 return nil 6011 } 6012 6013 func (p *IPCChainTesterFreeChainArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 6014 if v, err := iprot.ReadI32(ctx); err != nil { 6015 return thrift.PrependError("error reading field 1: ", err) 6016 } else { 6017 p.ID = v 6018 } 6019 return nil 6020 } 6021 6022 func (p *IPCChainTesterFreeChainArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 6023 if err := oprot.WriteStructBegin(ctx, "free_chain_args"); err != nil { 6024 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 6025 if p != nil { 6026 if err := p.writeField1(ctx, oprot); err != nil { return err } 6027 } 6028 if err := oprot.WriteFieldStop(ctx); err != nil { 6029 return thrift.PrependError("write field stop error: ", err) } 6030 if err := oprot.WriteStructEnd(ctx); err != nil { 6031 return thrift.PrependError("write struct stop error: ", err) } 6032 return nil 6033 } 6034 6035 func (p *IPCChainTesterFreeChainArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 6036 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 6037 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 6038 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 6039 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 6040 if err := oprot.WriteFieldEnd(ctx); err != nil { 6041 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 6042 return err 6043 } 6044 6045 func (p *IPCChainTesterFreeChainArgs) String() string { 6046 if p == nil { 6047 return "<nil>" 6048 } 6049 return fmt.Sprintf("IPCChainTesterFreeChainArgs(%+v)", *p) 6050 } 6051 6052 // Attributes: 6053 // - Success 6054 type IPCChainTesterFreeChainResult struct { 6055 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 6056 } 6057 6058 func NewIPCChainTesterFreeChainResult() *IPCChainTesterFreeChainResult { 6059 return &IPCChainTesterFreeChainResult{} 6060 } 6061 6062 var IPCChainTesterFreeChainResult_Success_DEFAULT int32 6063 func (p *IPCChainTesterFreeChainResult) GetSuccess() int32 { 6064 if !p.IsSetSuccess() { 6065 return IPCChainTesterFreeChainResult_Success_DEFAULT 6066 } 6067 return *p.Success 6068 } 6069 func (p *IPCChainTesterFreeChainResult) IsSetSuccess() bool { 6070 return p.Success != nil 6071 } 6072 6073 func (p *IPCChainTesterFreeChainResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 6074 if _, err := iprot.ReadStructBegin(ctx); err != nil { 6075 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 6076 } 6077 6078 6079 for { 6080 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 6081 if err != nil { 6082 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 6083 } 6084 if fieldTypeId == thrift.STOP { break; } 6085 switch fieldId { 6086 case 0: 6087 if fieldTypeId == thrift.I32 { 6088 if err := p.ReadField0(ctx, iprot); err != nil { 6089 return err 6090 } 6091 } else { 6092 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6093 return err 6094 } 6095 } 6096 default: 6097 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6098 return err 6099 } 6100 } 6101 if err := iprot.ReadFieldEnd(ctx); err != nil { 6102 return err 6103 } 6104 } 6105 if err := iprot.ReadStructEnd(ctx); err != nil { 6106 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 6107 } 6108 return nil 6109 } 6110 6111 func (p *IPCChainTesterFreeChainResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 6112 if v, err := iprot.ReadI32(ctx); err != nil { 6113 return thrift.PrependError("error reading field 0: ", err) 6114 } else { 6115 p.Success = &v 6116 } 6117 return nil 6118 } 6119 6120 func (p *IPCChainTesterFreeChainResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 6121 if err := oprot.WriteStructBegin(ctx, "free_chain_result"); err != nil { 6122 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 6123 if p != nil { 6124 if err := p.writeField0(ctx, oprot); err != nil { return err } 6125 } 6126 if err := oprot.WriteFieldStop(ctx); err != nil { 6127 return thrift.PrependError("write field stop error: ", err) } 6128 if err := oprot.WriteStructEnd(ctx); err != nil { 6129 return thrift.PrependError("write struct stop error: ", err) } 6130 return nil 6131 } 6132 6133 func (p *IPCChainTesterFreeChainResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 6134 if p.IsSetSuccess() { 6135 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 6136 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 6137 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 6138 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 6139 if err := oprot.WriteFieldEnd(ctx); err != nil { 6140 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 6141 } 6142 return err 6143 } 6144 6145 func (p *IPCChainTesterFreeChainResult) String() string { 6146 if p == nil { 6147 return "<nil>" 6148 } 6149 return fmt.Sprintf("IPCChainTesterFreeChainResult(%+v)", *p) 6150 } 6151 6152 // Attributes: 6153 // - ID 6154 type IPCChainTesterGetInfoArgs struct { 6155 ID int32 `thrift:"id,1" db:"id" json:"id"` 6156 } 6157 6158 func NewIPCChainTesterGetInfoArgs() *IPCChainTesterGetInfoArgs { 6159 return &IPCChainTesterGetInfoArgs{} 6160 } 6161 6162 6163 func (p *IPCChainTesterGetInfoArgs) GetID() int32 { 6164 return p.ID 6165 } 6166 func (p *IPCChainTesterGetInfoArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 6167 if _, err := iprot.ReadStructBegin(ctx); err != nil { 6168 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 6169 } 6170 6171 6172 for { 6173 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 6174 if err != nil { 6175 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 6176 } 6177 if fieldTypeId == thrift.STOP { break; } 6178 switch fieldId { 6179 case 1: 6180 if fieldTypeId == thrift.I32 { 6181 if err := p.ReadField1(ctx, iprot); err != nil { 6182 return err 6183 } 6184 } else { 6185 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6186 return err 6187 } 6188 } 6189 default: 6190 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6191 return err 6192 } 6193 } 6194 if err := iprot.ReadFieldEnd(ctx); err != nil { 6195 return err 6196 } 6197 } 6198 if err := iprot.ReadStructEnd(ctx); err != nil { 6199 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 6200 } 6201 return nil 6202 } 6203 6204 func (p *IPCChainTesterGetInfoArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 6205 if v, err := iprot.ReadI32(ctx); err != nil { 6206 return thrift.PrependError("error reading field 1: ", err) 6207 } else { 6208 p.ID = v 6209 } 6210 return nil 6211 } 6212 6213 func (p *IPCChainTesterGetInfoArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 6214 if err := oprot.WriteStructBegin(ctx, "get_info_args"); err != nil { 6215 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 6216 if p != nil { 6217 if err := p.writeField1(ctx, oprot); err != nil { return err } 6218 } 6219 if err := oprot.WriteFieldStop(ctx); err != nil { 6220 return thrift.PrependError("write field stop error: ", err) } 6221 if err := oprot.WriteStructEnd(ctx); err != nil { 6222 return thrift.PrependError("write struct stop error: ", err) } 6223 return nil 6224 } 6225 6226 func (p *IPCChainTesterGetInfoArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 6227 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 6228 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 6229 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 6230 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 6231 if err := oprot.WriteFieldEnd(ctx); err != nil { 6232 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 6233 return err 6234 } 6235 6236 func (p *IPCChainTesterGetInfoArgs) String() string { 6237 if p == nil { 6238 return "<nil>" 6239 } 6240 return fmt.Sprintf("IPCChainTesterGetInfoArgs(%+v)", *p) 6241 } 6242 6243 // Attributes: 6244 // - Success 6245 type IPCChainTesterGetInfoResult struct { 6246 Success *string `thrift:"success,0" db:"success" json:"success,omitempty"` 6247 } 6248 6249 func NewIPCChainTesterGetInfoResult() *IPCChainTesterGetInfoResult { 6250 return &IPCChainTesterGetInfoResult{} 6251 } 6252 6253 var IPCChainTesterGetInfoResult_Success_DEFAULT string 6254 func (p *IPCChainTesterGetInfoResult) GetSuccess() string { 6255 if !p.IsSetSuccess() { 6256 return IPCChainTesterGetInfoResult_Success_DEFAULT 6257 } 6258 return *p.Success 6259 } 6260 func (p *IPCChainTesterGetInfoResult) IsSetSuccess() bool { 6261 return p.Success != nil 6262 } 6263 6264 func (p *IPCChainTesterGetInfoResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 6265 if _, err := iprot.ReadStructBegin(ctx); err != nil { 6266 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 6267 } 6268 6269 6270 for { 6271 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 6272 if err != nil { 6273 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 6274 } 6275 if fieldTypeId == thrift.STOP { break; } 6276 switch fieldId { 6277 case 0: 6278 if fieldTypeId == thrift.STRING { 6279 if err := p.ReadField0(ctx, iprot); err != nil { 6280 return err 6281 } 6282 } else { 6283 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6284 return err 6285 } 6286 } 6287 default: 6288 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6289 return err 6290 } 6291 } 6292 if err := iprot.ReadFieldEnd(ctx); err != nil { 6293 return err 6294 } 6295 } 6296 if err := iprot.ReadStructEnd(ctx); err != nil { 6297 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 6298 } 6299 return nil 6300 } 6301 6302 func (p *IPCChainTesterGetInfoResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 6303 if v, err := iprot.ReadString(ctx); err != nil { 6304 return thrift.PrependError("error reading field 0: ", err) 6305 } else { 6306 p.Success = &v 6307 } 6308 return nil 6309 } 6310 6311 func (p *IPCChainTesterGetInfoResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 6312 if err := oprot.WriteStructBegin(ctx, "get_info_result"); err != nil { 6313 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 6314 if p != nil { 6315 if err := p.writeField0(ctx, oprot); err != nil { return err } 6316 } 6317 if err := oprot.WriteFieldStop(ctx); err != nil { 6318 return thrift.PrependError("write field stop error: ", err) } 6319 if err := oprot.WriteStructEnd(ctx); err != nil { 6320 return thrift.PrependError("write struct stop error: ", err) } 6321 return nil 6322 } 6323 6324 func (p *IPCChainTesterGetInfoResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 6325 if p.IsSetSuccess() { 6326 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 6327 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 6328 if err := oprot.WriteString(ctx, string(*p.Success)); err != nil { 6329 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 6330 if err := oprot.WriteFieldEnd(ctx); err != nil { 6331 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 6332 } 6333 return err 6334 } 6335 6336 func (p *IPCChainTesterGetInfoResult) String() string { 6337 if p == nil { 6338 return "<nil>" 6339 } 6340 return fmt.Sprintf("IPCChainTesterGetInfoResult(%+v)", *p) 6341 } 6342 6343 // Attributes: 6344 // - KeyType 6345 type IPCChainTesterCreateKeyArgs struct { 6346 KeyType string `thrift:"key_type,1" db:"key_type" json:"key_type"` 6347 } 6348 6349 func NewIPCChainTesterCreateKeyArgs() *IPCChainTesterCreateKeyArgs { 6350 return &IPCChainTesterCreateKeyArgs{} 6351 } 6352 6353 6354 func (p *IPCChainTesterCreateKeyArgs) GetKeyType() string { 6355 return p.KeyType 6356 } 6357 func (p *IPCChainTesterCreateKeyArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 6358 if _, err := iprot.ReadStructBegin(ctx); err != nil { 6359 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 6360 } 6361 6362 6363 for { 6364 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 6365 if err != nil { 6366 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 6367 } 6368 if fieldTypeId == thrift.STOP { break; } 6369 switch fieldId { 6370 case 1: 6371 if fieldTypeId == thrift.STRING { 6372 if err := p.ReadField1(ctx, iprot); err != nil { 6373 return err 6374 } 6375 } else { 6376 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6377 return err 6378 } 6379 } 6380 default: 6381 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6382 return err 6383 } 6384 } 6385 if err := iprot.ReadFieldEnd(ctx); err != nil { 6386 return err 6387 } 6388 } 6389 if err := iprot.ReadStructEnd(ctx); err != nil { 6390 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 6391 } 6392 return nil 6393 } 6394 6395 func (p *IPCChainTesterCreateKeyArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 6396 if v, err := iprot.ReadString(ctx); err != nil { 6397 return thrift.PrependError("error reading field 1: ", err) 6398 } else { 6399 p.KeyType = v 6400 } 6401 return nil 6402 } 6403 6404 func (p *IPCChainTesterCreateKeyArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 6405 if err := oprot.WriteStructBegin(ctx, "create_key_args"); err != nil { 6406 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 6407 if p != nil { 6408 if err := p.writeField1(ctx, oprot); err != nil { return err } 6409 } 6410 if err := oprot.WriteFieldStop(ctx); err != nil { 6411 return thrift.PrependError("write field stop error: ", err) } 6412 if err := oprot.WriteStructEnd(ctx); err != nil { 6413 return thrift.PrependError("write struct stop error: ", err) } 6414 return nil 6415 } 6416 6417 func (p *IPCChainTesterCreateKeyArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 6418 if err := oprot.WriteFieldBegin(ctx, "key_type", thrift.STRING, 1); err != nil { 6419 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key_type: ", p), err) } 6420 if err := oprot.WriteString(ctx, string(p.KeyType)); err != nil { 6421 return thrift.PrependError(fmt.Sprintf("%T.key_type (1) field write error: ", p), err) } 6422 if err := oprot.WriteFieldEnd(ctx); err != nil { 6423 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key_type: ", p), err) } 6424 return err 6425 } 6426 6427 func (p *IPCChainTesterCreateKeyArgs) String() string { 6428 if p == nil { 6429 return "<nil>" 6430 } 6431 return fmt.Sprintf("IPCChainTesterCreateKeyArgs(%+v)", *p) 6432 } 6433 6434 // Attributes: 6435 // - Success 6436 type IPCChainTesterCreateKeyResult struct { 6437 Success *string `thrift:"success,0" db:"success" json:"success,omitempty"` 6438 } 6439 6440 func NewIPCChainTesterCreateKeyResult() *IPCChainTesterCreateKeyResult { 6441 return &IPCChainTesterCreateKeyResult{} 6442 } 6443 6444 var IPCChainTesterCreateKeyResult_Success_DEFAULT string 6445 func (p *IPCChainTesterCreateKeyResult) GetSuccess() string { 6446 if !p.IsSetSuccess() { 6447 return IPCChainTesterCreateKeyResult_Success_DEFAULT 6448 } 6449 return *p.Success 6450 } 6451 func (p *IPCChainTesterCreateKeyResult) IsSetSuccess() bool { 6452 return p.Success != nil 6453 } 6454 6455 func (p *IPCChainTesterCreateKeyResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 6456 if _, err := iprot.ReadStructBegin(ctx); err != nil { 6457 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 6458 } 6459 6460 6461 for { 6462 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 6463 if err != nil { 6464 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 6465 } 6466 if fieldTypeId == thrift.STOP { break; } 6467 switch fieldId { 6468 case 0: 6469 if fieldTypeId == thrift.STRING { 6470 if err := p.ReadField0(ctx, iprot); err != nil { 6471 return err 6472 } 6473 } else { 6474 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6475 return err 6476 } 6477 } 6478 default: 6479 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6480 return err 6481 } 6482 } 6483 if err := iprot.ReadFieldEnd(ctx); err != nil { 6484 return err 6485 } 6486 } 6487 if err := iprot.ReadStructEnd(ctx); err != nil { 6488 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 6489 } 6490 return nil 6491 } 6492 6493 func (p *IPCChainTesterCreateKeyResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 6494 if v, err := iprot.ReadString(ctx); err != nil { 6495 return thrift.PrependError("error reading field 0: ", err) 6496 } else { 6497 p.Success = &v 6498 } 6499 return nil 6500 } 6501 6502 func (p *IPCChainTesterCreateKeyResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 6503 if err := oprot.WriteStructBegin(ctx, "create_key_result"); err != nil { 6504 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 6505 if p != nil { 6506 if err := p.writeField0(ctx, oprot); err != nil { return err } 6507 } 6508 if err := oprot.WriteFieldStop(ctx); err != nil { 6509 return thrift.PrependError("write field stop error: ", err) } 6510 if err := oprot.WriteStructEnd(ctx); err != nil { 6511 return thrift.PrependError("write struct stop error: ", err) } 6512 return nil 6513 } 6514 6515 func (p *IPCChainTesterCreateKeyResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 6516 if p.IsSetSuccess() { 6517 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 6518 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 6519 if err := oprot.WriteString(ctx, string(*p.Success)); err != nil { 6520 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 6521 if err := oprot.WriteFieldEnd(ctx); err != nil { 6522 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 6523 } 6524 return err 6525 } 6526 6527 func (p *IPCChainTesterCreateKeyResult) String() string { 6528 if p == nil { 6529 return "<nil>" 6530 } 6531 return fmt.Sprintf("IPCChainTesterCreateKeyResult(%+v)", *p) 6532 } 6533 6534 // Attributes: 6535 // - ID 6536 // - Account 6537 type IPCChainTesterGetAccountArgs struct { 6538 ID int32 `thrift:"id,1" db:"id" json:"id"` 6539 Account string `thrift:"account,2" db:"account" json:"account"` 6540 } 6541 6542 func NewIPCChainTesterGetAccountArgs() *IPCChainTesterGetAccountArgs { 6543 return &IPCChainTesterGetAccountArgs{} 6544 } 6545 6546 6547 func (p *IPCChainTesterGetAccountArgs) GetID() int32 { 6548 return p.ID 6549 } 6550 6551 func (p *IPCChainTesterGetAccountArgs) GetAccount() string { 6552 return p.Account 6553 } 6554 func (p *IPCChainTesterGetAccountArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 6555 if _, err := iprot.ReadStructBegin(ctx); err != nil { 6556 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 6557 } 6558 6559 6560 for { 6561 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 6562 if err != nil { 6563 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 6564 } 6565 if fieldTypeId == thrift.STOP { break; } 6566 switch fieldId { 6567 case 1: 6568 if fieldTypeId == thrift.I32 { 6569 if err := p.ReadField1(ctx, iprot); err != nil { 6570 return err 6571 } 6572 } else { 6573 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6574 return err 6575 } 6576 } 6577 case 2: 6578 if fieldTypeId == thrift.STRING { 6579 if err := p.ReadField2(ctx, iprot); err != nil { 6580 return err 6581 } 6582 } else { 6583 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6584 return err 6585 } 6586 } 6587 default: 6588 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6589 return err 6590 } 6591 } 6592 if err := iprot.ReadFieldEnd(ctx); err != nil { 6593 return err 6594 } 6595 } 6596 if err := iprot.ReadStructEnd(ctx); err != nil { 6597 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 6598 } 6599 return nil 6600 } 6601 6602 func (p *IPCChainTesterGetAccountArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 6603 if v, err := iprot.ReadI32(ctx); err != nil { 6604 return thrift.PrependError("error reading field 1: ", err) 6605 } else { 6606 p.ID = v 6607 } 6608 return nil 6609 } 6610 6611 func (p *IPCChainTesterGetAccountArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 6612 if v, err := iprot.ReadString(ctx); err != nil { 6613 return thrift.PrependError("error reading field 2: ", err) 6614 } else { 6615 p.Account = v 6616 } 6617 return nil 6618 } 6619 6620 func (p *IPCChainTesterGetAccountArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 6621 if err := oprot.WriteStructBegin(ctx, "get_account_args"); err != nil { 6622 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 6623 if p != nil { 6624 if err := p.writeField1(ctx, oprot); err != nil { return err } 6625 if err := p.writeField2(ctx, oprot); err != nil { return err } 6626 } 6627 if err := oprot.WriteFieldStop(ctx); err != nil { 6628 return thrift.PrependError("write field stop error: ", err) } 6629 if err := oprot.WriteStructEnd(ctx); err != nil { 6630 return thrift.PrependError("write struct stop error: ", err) } 6631 return nil 6632 } 6633 6634 func (p *IPCChainTesterGetAccountArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 6635 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 6636 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 6637 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 6638 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 6639 if err := oprot.WriteFieldEnd(ctx); err != nil { 6640 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 6641 return err 6642 } 6643 6644 func (p *IPCChainTesterGetAccountArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 6645 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRING, 2); err != nil { 6646 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:account: ", p), err) } 6647 if err := oprot.WriteString(ctx, string(p.Account)); err != nil { 6648 return thrift.PrependError(fmt.Sprintf("%T.account (2) field write error: ", p), err) } 6649 if err := oprot.WriteFieldEnd(ctx); err != nil { 6650 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:account: ", p), err) } 6651 return err 6652 } 6653 6654 func (p *IPCChainTesterGetAccountArgs) String() string { 6655 if p == nil { 6656 return "<nil>" 6657 } 6658 return fmt.Sprintf("IPCChainTesterGetAccountArgs(%+v)", *p) 6659 } 6660 6661 // Attributes: 6662 // - Success 6663 type IPCChainTesterGetAccountResult struct { 6664 Success *string `thrift:"success,0" db:"success" json:"success,omitempty"` 6665 } 6666 6667 func NewIPCChainTesterGetAccountResult() *IPCChainTesterGetAccountResult { 6668 return &IPCChainTesterGetAccountResult{} 6669 } 6670 6671 var IPCChainTesterGetAccountResult_Success_DEFAULT string 6672 func (p *IPCChainTesterGetAccountResult) GetSuccess() string { 6673 if !p.IsSetSuccess() { 6674 return IPCChainTesterGetAccountResult_Success_DEFAULT 6675 } 6676 return *p.Success 6677 } 6678 func (p *IPCChainTesterGetAccountResult) IsSetSuccess() bool { 6679 return p.Success != nil 6680 } 6681 6682 func (p *IPCChainTesterGetAccountResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 6683 if _, err := iprot.ReadStructBegin(ctx); err != nil { 6684 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 6685 } 6686 6687 6688 for { 6689 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 6690 if err != nil { 6691 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 6692 } 6693 if fieldTypeId == thrift.STOP { break; } 6694 switch fieldId { 6695 case 0: 6696 if fieldTypeId == thrift.STRING { 6697 if err := p.ReadField0(ctx, iprot); err != nil { 6698 return err 6699 } 6700 } else { 6701 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6702 return err 6703 } 6704 } 6705 default: 6706 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6707 return err 6708 } 6709 } 6710 if err := iprot.ReadFieldEnd(ctx); err != nil { 6711 return err 6712 } 6713 } 6714 if err := iprot.ReadStructEnd(ctx); err != nil { 6715 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 6716 } 6717 return nil 6718 } 6719 6720 func (p *IPCChainTesterGetAccountResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 6721 if v, err := iprot.ReadString(ctx); err != nil { 6722 return thrift.PrependError("error reading field 0: ", err) 6723 } else { 6724 p.Success = &v 6725 } 6726 return nil 6727 } 6728 6729 func (p *IPCChainTesterGetAccountResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 6730 if err := oprot.WriteStructBegin(ctx, "get_account_result"); err != nil { 6731 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 6732 if p != nil { 6733 if err := p.writeField0(ctx, oprot); err != nil { return err } 6734 } 6735 if err := oprot.WriteFieldStop(ctx); err != nil { 6736 return thrift.PrependError("write field stop error: ", err) } 6737 if err := oprot.WriteStructEnd(ctx); err != nil { 6738 return thrift.PrependError("write struct stop error: ", err) } 6739 return nil 6740 } 6741 6742 func (p *IPCChainTesterGetAccountResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 6743 if p.IsSetSuccess() { 6744 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 6745 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 6746 if err := oprot.WriteString(ctx, string(*p.Success)); err != nil { 6747 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 6748 if err := oprot.WriteFieldEnd(ctx); err != nil { 6749 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 6750 } 6751 return err 6752 } 6753 6754 func (p *IPCChainTesterGetAccountResult) String() string { 6755 if p == nil { 6756 return "<nil>" 6757 } 6758 return fmt.Sprintf("IPCChainTesterGetAccountResult(%+v)", *p) 6759 } 6760 6761 // Attributes: 6762 // - ID 6763 // - Creator 6764 // - Account 6765 // - OwnerKey 6766 // - ActiveKey 6767 // - RAMBytes 6768 // - StakeNet 6769 // - StakeCPU 6770 type IPCChainTesterCreateAccountArgs struct { 6771 ID int32 `thrift:"id,1" db:"id" json:"id"` 6772 Creator string `thrift:"creator,2" db:"creator" json:"creator"` 6773 Account string `thrift:"account,3" db:"account" json:"account"` 6774 OwnerKey string `thrift:"owner_key,4" db:"owner_key" json:"owner_key"` 6775 ActiveKey string `thrift:"active_key,5" db:"active_key" json:"active_key"` 6776 RAMBytes int64 `thrift:"ram_bytes,6" db:"ram_bytes" json:"ram_bytes"` 6777 StakeNet int64 `thrift:"stake_net,7" db:"stake_net" json:"stake_net"` 6778 StakeCPU int64 `thrift:"stake_cpu,8" db:"stake_cpu" json:"stake_cpu"` 6779 } 6780 6781 func NewIPCChainTesterCreateAccountArgs() *IPCChainTesterCreateAccountArgs { 6782 return &IPCChainTesterCreateAccountArgs{} 6783 } 6784 6785 6786 func (p *IPCChainTesterCreateAccountArgs) GetID() int32 { 6787 return p.ID 6788 } 6789 6790 func (p *IPCChainTesterCreateAccountArgs) GetCreator() string { 6791 return p.Creator 6792 } 6793 6794 func (p *IPCChainTesterCreateAccountArgs) GetAccount() string { 6795 return p.Account 6796 } 6797 6798 func (p *IPCChainTesterCreateAccountArgs) GetOwnerKey() string { 6799 return p.OwnerKey 6800 } 6801 6802 func (p *IPCChainTesterCreateAccountArgs) GetActiveKey() string { 6803 return p.ActiveKey 6804 } 6805 6806 func (p *IPCChainTesterCreateAccountArgs) GetRAMBytes() int64 { 6807 return p.RAMBytes 6808 } 6809 6810 func (p *IPCChainTesterCreateAccountArgs) GetStakeNet() int64 { 6811 return p.StakeNet 6812 } 6813 6814 func (p *IPCChainTesterCreateAccountArgs) GetStakeCPU() int64 { 6815 return p.StakeCPU 6816 } 6817 func (p *IPCChainTesterCreateAccountArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 6818 if _, err := iprot.ReadStructBegin(ctx); err != nil { 6819 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 6820 } 6821 6822 6823 for { 6824 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 6825 if err != nil { 6826 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 6827 } 6828 if fieldTypeId == thrift.STOP { break; } 6829 switch fieldId { 6830 case 1: 6831 if fieldTypeId == thrift.I32 { 6832 if err := p.ReadField1(ctx, iprot); err != nil { 6833 return err 6834 } 6835 } else { 6836 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6837 return err 6838 } 6839 } 6840 case 2: 6841 if fieldTypeId == thrift.STRING { 6842 if err := p.ReadField2(ctx, iprot); err != nil { 6843 return err 6844 } 6845 } else { 6846 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6847 return err 6848 } 6849 } 6850 case 3: 6851 if fieldTypeId == thrift.STRING { 6852 if err := p.ReadField3(ctx, iprot); err != nil { 6853 return err 6854 } 6855 } else { 6856 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6857 return err 6858 } 6859 } 6860 case 4: 6861 if fieldTypeId == thrift.STRING { 6862 if err := p.ReadField4(ctx, iprot); err != nil { 6863 return err 6864 } 6865 } else { 6866 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6867 return err 6868 } 6869 } 6870 case 5: 6871 if fieldTypeId == thrift.STRING { 6872 if err := p.ReadField5(ctx, iprot); err != nil { 6873 return err 6874 } 6875 } else { 6876 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6877 return err 6878 } 6879 } 6880 case 6: 6881 if fieldTypeId == thrift.I64 { 6882 if err := p.ReadField6(ctx, iprot); err != nil { 6883 return err 6884 } 6885 } else { 6886 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6887 return err 6888 } 6889 } 6890 case 7: 6891 if fieldTypeId == thrift.I64 { 6892 if err := p.ReadField7(ctx, iprot); err != nil { 6893 return err 6894 } 6895 } else { 6896 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6897 return err 6898 } 6899 } 6900 case 8: 6901 if fieldTypeId == thrift.I64 { 6902 if err := p.ReadField8(ctx, iprot); err != nil { 6903 return err 6904 } 6905 } else { 6906 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6907 return err 6908 } 6909 } 6910 default: 6911 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 6912 return err 6913 } 6914 } 6915 if err := iprot.ReadFieldEnd(ctx); err != nil { 6916 return err 6917 } 6918 } 6919 if err := iprot.ReadStructEnd(ctx); err != nil { 6920 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 6921 } 6922 return nil 6923 } 6924 6925 func (p *IPCChainTesterCreateAccountArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 6926 if v, err := iprot.ReadI32(ctx); err != nil { 6927 return thrift.PrependError("error reading field 1: ", err) 6928 } else { 6929 p.ID = v 6930 } 6931 return nil 6932 } 6933 6934 func (p *IPCChainTesterCreateAccountArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 6935 if v, err := iprot.ReadString(ctx); err != nil { 6936 return thrift.PrependError("error reading field 2: ", err) 6937 } else { 6938 p.Creator = v 6939 } 6940 return nil 6941 } 6942 6943 func (p *IPCChainTesterCreateAccountArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 6944 if v, err := iprot.ReadString(ctx); err != nil { 6945 return thrift.PrependError("error reading field 3: ", err) 6946 } else { 6947 p.Account = v 6948 } 6949 return nil 6950 } 6951 6952 func (p *IPCChainTesterCreateAccountArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 6953 if v, err := iprot.ReadString(ctx); err != nil { 6954 return thrift.PrependError("error reading field 4: ", err) 6955 } else { 6956 p.OwnerKey = v 6957 } 6958 return nil 6959 } 6960 6961 func (p *IPCChainTesterCreateAccountArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 6962 if v, err := iprot.ReadString(ctx); err != nil { 6963 return thrift.PrependError("error reading field 5: ", err) 6964 } else { 6965 p.ActiveKey = v 6966 } 6967 return nil 6968 } 6969 6970 func (p *IPCChainTesterCreateAccountArgs) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { 6971 if v, err := iprot.ReadI64(ctx); err != nil { 6972 return thrift.PrependError("error reading field 6: ", err) 6973 } else { 6974 p.RAMBytes = v 6975 } 6976 return nil 6977 } 6978 6979 func (p *IPCChainTesterCreateAccountArgs) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { 6980 if v, err := iprot.ReadI64(ctx); err != nil { 6981 return thrift.PrependError("error reading field 7: ", err) 6982 } else { 6983 p.StakeNet = v 6984 } 6985 return nil 6986 } 6987 6988 func (p *IPCChainTesterCreateAccountArgs) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { 6989 if v, err := iprot.ReadI64(ctx); err != nil { 6990 return thrift.PrependError("error reading field 8: ", err) 6991 } else { 6992 p.StakeCPU = v 6993 } 6994 return nil 6995 } 6996 6997 func (p *IPCChainTesterCreateAccountArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 6998 if err := oprot.WriteStructBegin(ctx, "create_account_args"); err != nil { 6999 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 7000 if p != nil { 7001 if err := p.writeField1(ctx, oprot); err != nil { return err } 7002 if err := p.writeField2(ctx, oprot); err != nil { return err } 7003 if err := p.writeField3(ctx, oprot); err != nil { return err } 7004 if err := p.writeField4(ctx, oprot); err != nil { return err } 7005 if err := p.writeField5(ctx, oprot); err != nil { return err } 7006 if err := p.writeField6(ctx, oprot); err != nil { return err } 7007 if err := p.writeField7(ctx, oprot); err != nil { return err } 7008 if err := p.writeField8(ctx, oprot); err != nil { return err } 7009 } 7010 if err := oprot.WriteFieldStop(ctx); err != nil { 7011 return thrift.PrependError("write field stop error: ", err) } 7012 if err := oprot.WriteStructEnd(ctx); err != nil { 7013 return thrift.PrependError("write struct stop error: ", err) } 7014 return nil 7015 } 7016 7017 func (p *IPCChainTesterCreateAccountArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 7018 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 7019 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 7020 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 7021 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 7022 if err := oprot.WriteFieldEnd(ctx); err != nil { 7023 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 7024 return err 7025 } 7026 7027 func (p *IPCChainTesterCreateAccountArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 7028 if err := oprot.WriteFieldBegin(ctx, "creator", thrift.STRING, 2); err != nil { 7029 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:creator: ", p), err) } 7030 if err := oprot.WriteString(ctx, string(p.Creator)); err != nil { 7031 return thrift.PrependError(fmt.Sprintf("%T.creator (2) field write error: ", p), err) } 7032 if err := oprot.WriteFieldEnd(ctx); err != nil { 7033 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:creator: ", p), err) } 7034 return err 7035 } 7036 7037 func (p *IPCChainTesterCreateAccountArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 7038 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRING, 3); err != nil { 7039 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:account: ", p), err) } 7040 if err := oprot.WriteString(ctx, string(p.Account)); err != nil { 7041 return thrift.PrependError(fmt.Sprintf("%T.account (3) field write error: ", p), err) } 7042 if err := oprot.WriteFieldEnd(ctx); err != nil { 7043 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:account: ", p), err) } 7044 return err 7045 } 7046 7047 func (p *IPCChainTesterCreateAccountArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 7048 if err := oprot.WriteFieldBegin(ctx, "owner_key", thrift.STRING, 4); err != nil { 7049 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:owner_key: ", p), err) } 7050 if err := oprot.WriteString(ctx, string(p.OwnerKey)); err != nil { 7051 return thrift.PrependError(fmt.Sprintf("%T.owner_key (4) field write error: ", p), err) } 7052 if err := oprot.WriteFieldEnd(ctx); err != nil { 7053 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:owner_key: ", p), err) } 7054 return err 7055 } 7056 7057 func (p *IPCChainTesterCreateAccountArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 7058 if err := oprot.WriteFieldBegin(ctx, "active_key", thrift.STRING, 5); err != nil { 7059 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:active_key: ", p), err) } 7060 if err := oprot.WriteString(ctx, string(p.ActiveKey)); err != nil { 7061 return thrift.PrependError(fmt.Sprintf("%T.active_key (5) field write error: ", p), err) } 7062 if err := oprot.WriteFieldEnd(ctx); err != nil { 7063 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:active_key: ", p), err) } 7064 return err 7065 } 7066 7067 func (p *IPCChainTesterCreateAccountArgs) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { 7068 if err := oprot.WriteFieldBegin(ctx, "ram_bytes", thrift.I64, 6); err != nil { 7069 return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:ram_bytes: ", p), err) } 7070 if err := oprot.WriteI64(ctx, int64(p.RAMBytes)); err != nil { 7071 return thrift.PrependError(fmt.Sprintf("%T.ram_bytes (6) field write error: ", p), err) } 7072 if err := oprot.WriteFieldEnd(ctx); err != nil { 7073 return thrift.PrependError(fmt.Sprintf("%T write field end error 6:ram_bytes: ", p), err) } 7074 return err 7075 } 7076 7077 func (p *IPCChainTesterCreateAccountArgs) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { 7078 if err := oprot.WriteFieldBegin(ctx, "stake_net", thrift.I64, 7); err != nil { 7079 return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:stake_net: ", p), err) } 7080 if err := oprot.WriteI64(ctx, int64(p.StakeNet)); err != nil { 7081 return thrift.PrependError(fmt.Sprintf("%T.stake_net (7) field write error: ", p), err) } 7082 if err := oprot.WriteFieldEnd(ctx); err != nil { 7083 return thrift.PrependError(fmt.Sprintf("%T write field end error 7:stake_net: ", p), err) } 7084 return err 7085 } 7086 7087 func (p *IPCChainTesterCreateAccountArgs) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { 7088 if err := oprot.WriteFieldBegin(ctx, "stake_cpu", thrift.I64, 8); err != nil { 7089 return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:stake_cpu: ", p), err) } 7090 if err := oprot.WriteI64(ctx, int64(p.StakeCPU)); err != nil { 7091 return thrift.PrependError(fmt.Sprintf("%T.stake_cpu (8) field write error: ", p), err) } 7092 if err := oprot.WriteFieldEnd(ctx); err != nil { 7093 return thrift.PrependError(fmt.Sprintf("%T write field end error 8:stake_cpu: ", p), err) } 7094 return err 7095 } 7096 7097 func (p *IPCChainTesterCreateAccountArgs) String() string { 7098 if p == nil { 7099 return "<nil>" 7100 } 7101 return fmt.Sprintf("IPCChainTesterCreateAccountArgs(%+v)", *p) 7102 } 7103 7104 // Attributes: 7105 // - Success 7106 type IPCChainTesterCreateAccountResult struct { 7107 Success *string `thrift:"success,0" db:"success" json:"success,omitempty"` 7108 } 7109 7110 func NewIPCChainTesterCreateAccountResult() *IPCChainTesterCreateAccountResult { 7111 return &IPCChainTesterCreateAccountResult{} 7112 } 7113 7114 var IPCChainTesterCreateAccountResult_Success_DEFAULT string 7115 func (p *IPCChainTesterCreateAccountResult) GetSuccess() string { 7116 if !p.IsSetSuccess() { 7117 return IPCChainTesterCreateAccountResult_Success_DEFAULT 7118 } 7119 return *p.Success 7120 } 7121 func (p *IPCChainTesterCreateAccountResult) IsSetSuccess() bool { 7122 return p.Success != nil 7123 } 7124 7125 func (p *IPCChainTesterCreateAccountResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 7126 if _, err := iprot.ReadStructBegin(ctx); err != nil { 7127 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 7128 } 7129 7130 7131 for { 7132 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 7133 if err != nil { 7134 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 7135 } 7136 if fieldTypeId == thrift.STOP { break; } 7137 switch fieldId { 7138 case 0: 7139 if fieldTypeId == thrift.STRING { 7140 if err := p.ReadField0(ctx, iprot); err != nil { 7141 return err 7142 } 7143 } else { 7144 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7145 return err 7146 } 7147 } 7148 default: 7149 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7150 return err 7151 } 7152 } 7153 if err := iprot.ReadFieldEnd(ctx); err != nil { 7154 return err 7155 } 7156 } 7157 if err := iprot.ReadStructEnd(ctx); err != nil { 7158 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 7159 } 7160 return nil 7161 } 7162 7163 func (p *IPCChainTesterCreateAccountResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 7164 if v, err := iprot.ReadString(ctx); err != nil { 7165 return thrift.PrependError("error reading field 0: ", err) 7166 } else { 7167 p.Success = &v 7168 } 7169 return nil 7170 } 7171 7172 func (p *IPCChainTesterCreateAccountResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 7173 if err := oprot.WriteStructBegin(ctx, "create_account_result"); err != nil { 7174 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 7175 if p != nil { 7176 if err := p.writeField0(ctx, oprot); err != nil { return err } 7177 } 7178 if err := oprot.WriteFieldStop(ctx); err != nil { 7179 return thrift.PrependError("write field stop error: ", err) } 7180 if err := oprot.WriteStructEnd(ctx); err != nil { 7181 return thrift.PrependError("write struct stop error: ", err) } 7182 return nil 7183 } 7184 7185 func (p *IPCChainTesterCreateAccountResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 7186 if p.IsSetSuccess() { 7187 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 7188 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 7189 if err := oprot.WriteString(ctx, string(*p.Success)); err != nil { 7190 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 7191 if err := oprot.WriteFieldEnd(ctx); err != nil { 7192 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 7193 } 7194 return err 7195 } 7196 7197 func (p *IPCChainTesterCreateAccountResult) String() string { 7198 if p == nil { 7199 return "<nil>" 7200 } 7201 return fmt.Sprintf("IPCChainTesterCreateAccountResult(%+v)", *p) 7202 } 7203 7204 // Attributes: 7205 // - ID 7206 // - PubKey 7207 // - PrivKey 7208 type IPCChainTesterImportKeyArgs struct { 7209 ID int32 `thrift:"id,1" db:"id" json:"id"` 7210 PubKey string `thrift:"pub_key,2" db:"pub_key" json:"pub_key"` 7211 PrivKey string `thrift:"priv_key,3" db:"priv_key" json:"priv_key"` 7212 } 7213 7214 func NewIPCChainTesterImportKeyArgs() *IPCChainTesterImportKeyArgs { 7215 return &IPCChainTesterImportKeyArgs{} 7216 } 7217 7218 7219 func (p *IPCChainTesterImportKeyArgs) GetID() int32 { 7220 return p.ID 7221 } 7222 7223 func (p *IPCChainTesterImportKeyArgs) GetPubKey() string { 7224 return p.PubKey 7225 } 7226 7227 func (p *IPCChainTesterImportKeyArgs) GetPrivKey() string { 7228 return p.PrivKey 7229 } 7230 func (p *IPCChainTesterImportKeyArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 7231 if _, err := iprot.ReadStructBegin(ctx); err != nil { 7232 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 7233 } 7234 7235 7236 for { 7237 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 7238 if err != nil { 7239 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 7240 } 7241 if fieldTypeId == thrift.STOP { break; } 7242 switch fieldId { 7243 case 1: 7244 if fieldTypeId == thrift.I32 { 7245 if err := p.ReadField1(ctx, iprot); err != nil { 7246 return err 7247 } 7248 } else { 7249 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7250 return err 7251 } 7252 } 7253 case 2: 7254 if fieldTypeId == thrift.STRING { 7255 if err := p.ReadField2(ctx, iprot); err != nil { 7256 return err 7257 } 7258 } else { 7259 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7260 return err 7261 } 7262 } 7263 case 3: 7264 if fieldTypeId == thrift.STRING { 7265 if err := p.ReadField3(ctx, iprot); err != nil { 7266 return err 7267 } 7268 } else { 7269 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7270 return err 7271 } 7272 } 7273 default: 7274 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7275 return err 7276 } 7277 } 7278 if err := iprot.ReadFieldEnd(ctx); err != nil { 7279 return err 7280 } 7281 } 7282 if err := iprot.ReadStructEnd(ctx); err != nil { 7283 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 7284 } 7285 return nil 7286 } 7287 7288 func (p *IPCChainTesterImportKeyArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 7289 if v, err := iprot.ReadI32(ctx); err != nil { 7290 return thrift.PrependError("error reading field 1: ", err) 7291 } else { 7292 p.ID = v 7293 } 7294 return nil 7295 } 7296 7297 func (p *IPCChainTesterImportKeyArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 7298 if v, err := iprot.ReadString(ctx); err != nil { 7299 return thrift.PrependError("error reading field 2: ", err) 7300 } else { 7301 p.PubKey = v 7302 } 7303 return nil 7304 } 7305 7306 func (p *IPCChainTesterImportKeyArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 7307 if v, err := iprot.ReadString(ctx); err != nil { 7308 return thrift.PrependError("error reading field 3: ", err) 7309 } else { 7310 p.PrivKey = v 7311 } 7312 return nil 7313 } 7314 7315 func (p *IPCChainTesterImportKeyArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 7316 if err := oprot.WriteStructBegin(ctx, "import_key_args"); err != nil { 7317 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 7318 if p != nil { 7319 if err := p.writeField1(ctx, oprot); err != nil { return err } 7320 if err := p.writeField2(ctx, oprot); err != nil { return err } 7321 if err := p.writeField3(ctx, oprot); err != nil { return err } 7322 } 7323 if err := oprot.WriteFieldStop(ctx); err != nil { 7324 return thrift.PrependError("write field stop error: ", err) } 7325 if err := oprot.WriteStructEnd(ctx); err != nil { 7326 return thrift.PrependError("write struct stop error: ", err) } 7327 return nil 7328 } 7329 7330 func (p *IPCChainTesterImportKeyArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 7331 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 7332 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 7333 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 7334 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 7335 if err := oprot.WriteFieldEnd(ctx); err != nil { 7336 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 7337 return err 7338 } 7339 7340 func (p *IPCChainTesterImportKeyArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 7341 if err := oprot.WriteFieldBegin(ctx, "pub_key", thrift.STRING, 2); err != nil { 7342 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:pub_key: ", p), err) } 7343 if err := oprot.WriteString(ctx, string(p.PubKey)); err != nil { 7344 return thrift.PrependError(fmt.Sprintf("%T.pub_key (2) field write error: ", p), err) } 7345 if err := oprot.WriteFieldEnd(ctx); err != nil { 7346 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:pub_key: ", p), err) } 7347 return err 7348 } 7349 7350 func (p *IPCChainTesterImportKeyArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 7351 if err := oprot.WriteFieldBegin(ctx, "priv_key", thrift.STRING, 3); err != nil { 7352 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:priv_key: ", p), err) } 7353 if err := oprot.WriteString(ctx, string(p.PrivKey)); err != nil { 7354 return thrift.PrependError(fmt.Sprintf("%T.priv_key (3) field write error: ", p), err) } 7355 if err := oprot.WriteFieldEnd(ctx); err != nil { 7356 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:priv_key: ", p), err) } 7357 return err 7358 } 7359 7360 func (p *IPCChainTesterImportKeyArgs) String() string { 7361 if p == nil { 7362 return "<nil>" 7363 } 7364 return fmt.Sprintf("IPCChainTesterImportKeyArgs(%+v)", *p) 7365 } 7366 7367 // Attributes: 7368 // - Success 7369 type IPCChainTesterImportKeyResult struct { 7370 Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` 7371 } 7372 7373 func NewIPCChainTesterImportKeyResult() *IPCChainTesterImportKeyResult { 7374 return &IPCChainTesterImportKeyResult{} 7375 } 7376 7377 var IPCChainTesterImportKeyResult_Success_DEFAULT bool 7378 func (p *IPCChainTesterImportKeyResult) GetSuccess() bool { 7379 if !p.IsSetSuccess() { 7380 return IPCChainTesterImportKeyResult_Success_DEFAULT 7381 } 7382 return *p.Success 7383 } 7384 func (p *IPCChainTesterImportKeyResult) IsSetSuccess() bool { 7385 return p.Success != nil 7386 } 7387 7388 func (p *IPCChainTesterImportKeyResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 7389 if _, err := iprot.ReadStructBegin(ctx); err != nil { 7390 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 7391 } 7392 7393 7394 for { 7395 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 7396 if err != nil { 7397 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 7398 } 7399 if fieldTypeId == thrift.STOP { break; } 7400 switch fieldId { 7401 case 0: 7402 if fieldTypeId == thrift.BOOL { 7403 if err := p.ReadField0(ctx, iprot); err != nil { 7404 return err 7405 } 7406 } else { 7407 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7408 return err 7409 } 7410 } 7411 default: 7412 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7413 return err 7414 } 7415 } 7416 if err := iprot.ReadFieldEnd(ctx); err != nil { 7417 return err 7418 } 7419 } 7420 if err := iprot.ReadStructEnd(ctx); err != nil { 7421 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 7422 } 7423 return nil 7424 } 7425 7426 func (p *IPCChainTesterImportKeyResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 7427 if v, err := iprot.ReadBool(ctx); err != nil { 7428 return thrift.PrependError("error reading field 0: ", err) 7429 } else { 7430 p.Success = &v 7431 } 7432 return nil 7433 } 7434 7435 func (p *IPCChainTesterImportKeyResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 7436 if err := oprot.WriteStructBegin(ctx, "import_key_result"); err != nil { 7437 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 7438 if p != nil { 7439 if err := p.writeField0(ctx, oprot); err != nil { return err } 7440 } 7441 if err := oprot.WriteFieldStop(ctx); err != nil { 7442 return thrift.PrependError("write field stop error: ", err) } 7443 if err := oprot.WriteStructEnd(ctx); err != nil { 7444 return thrift.PrependError("write struct stop error: ", err) } 7445 return nil 7446 } 7447 7448 func (p *IPCChainTesterImportKeyResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 7449 if p.IsSetSuccess() { 7450 if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { 7451 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 7452 if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { 7453 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 7454 if err := oprot.WriteFieldEnd(ctx); err != nil { 7455 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 7456 } 7457 return err 7458 } 7459 7460 func (p *IPCChainTesterImportKeyResult) String() string { 7461 if p == nil { 7462 return "<nil>" 7463 } 7464 return fmt.Sprintf("IPCChainTesterImportKeyResult(%+v)", *p) 7465 } 7466 7467 // Attributes: 7468 // - ID 7469 // - Transaction 7470 // - AvailableKeys 7471 type IPCChainTesterGetRequiredKeysArgs struct { 7472 ID int32 `thrift:"id,1" db:"id" json:"id"` 7473 Transaction string `thrift:"transaction,2" db:"transaction" json:"transaction"` 7474 AvailableKeys []string `thrift:"available_keys,3" db:"available_keys" json:"available_keys"` 7475 } 7476 7477 func NewIPCChainTesterGetRequiredKeysArgs() *IPCChainTesterGetRequiredKeysArgs { 7478 return &IPCChainTesterGetRequiredKeysArgs{} 7479 } 7480 7481 7482 func (p *IPCChainTesterGetRequiredKeysArgs) GetID() int32 { 7483 return p.ID 7484 } 7485 7486 func (p *IPCChainTesterGetRequiredKeysArgs) GetTransaction() string { 7487 return p.Transaction 7488 } 7489 7490 func (p *IPCChainTesterGetRequiredKeysArgs) GetAvailableKeys() []string { 7491 return p.AvailableKeys 7492 } 7493 func (p *IPCChainTesterGetRequiredKeysArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 7494 if _, err := iprot.ReadStructBegin(ctx); err != nil { 7495 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 7496 } 7497 7498 7499 for { 7500 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 7501 if err != nil { 7502 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 7503 } 7504 if fieldTypeId == thrift.STOP { break; } 7505 switch fieldId { 7506 case 1: 7507 if fieldTypeId == thrift.I32 { 7508 if err := p.ReadField1(ctx, iprot); err != nil { 7509 return err 7510 } 7511 } else { 7512 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7513 return err 7514 } 7515 } 7516 case 2: 7517 if fieldTypeId == thrift.STRING { 7518 if err := p.ReadField2(ctx, iprot); err != nil { 7519 return err 7520 } 7521 } else { 7522 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7523 return err 7524 } 7525 } 7526 case 3: 7527 if fieldTypeId == thrift.LIST { 7528 if err := p.ReadField3(ctx, iprot); err != nil { 7529 return err 7530 } 7531 } else { 7532 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7533 return err 7534 } 7535 } 7536 default: 7537 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7538 return err 7539 } 7540 } 7541 if err := iprot.ReadFieldEnd(ctx); err != nil { 7542 return err 7543 } 7544 } 7545 if err := iprot.ReadStructEnd(ctx); err != nil { 7546 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 7547 } 7548 return nil 7549 } 7550 7551 func (p *IPCChainTesterGetRequiredKeysArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 7552 if v, err := iprot.ReadI32(ctx); err != nil { 7553 return thrift.PrependError("error reading field 1: ", err) 7554 } else { 7555 p.ID = v 7556 } 7557 return nil 7558 } 7559 7560 func (p *IPCChainTesterGetRequiredKeysArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 7561 if v, err := iprot.ReadString(ctx); err != nil { 7562 return thrift.PrependError("error reading field 2: ", err) 7563 } else { 7564 p.Transaction = v 7565 } 7566 return nil 7567 } 7568 7569 func (p *IPCChainTesterGetRequiredKeysArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 7570 _, size, err := iprot.ReadListBegin(ctx) 7571 if err != nil { 7572 return thrift.PrependError("error reading list begin: ", err) 7573 } 7574 tSlice := make([]string, 0, size) 7575 p.AvailableKeys = tSlice 7576 for i := 0; i < size; i ++ { 7577 var _elem64 string 7578 if v, err := iprot.ReadString(ctx); err != nil { 7579 return thrift.PrependError("error reading field 0: ", err) 7580 } else { 7581 _elem64 = v 7582 } 7583 p.AvailableKeys = append(p.AvailableKeys, _elem64) 7584 } 7585 if err := iprot.ReadListEnd(ctx); err != nil { 7586 return thrift.PrependError("error reading list end: ", err) 7587 } 7588 return nil 7589 } 7590 7591 func (p *IPCChainTesterGetRequiredKeysArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 7592 if err := oprot.WriteStructBegin(ctx, "get_required_keys_args"); err != nil { 7593 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 7594 if p != nil { 7595 if err := p.writeField1(ctx, oprot); err != nil { return err } 7596 if err := p.writeField2(ctx, oprot); err != nil { return err } 7597 if err := p.writeField3(ctx, oprot); err != nil { return err } 7598 } 7599 if err := oprot.WriteFieldStop(ctx); err != nil { 7600 return thrift.PrependError("write field stop error: ", err) } 7601 if err := oprot.WriteStructEnd(ctx); err != nil { 7602 return thrift.PrependError("write struct stop error: ", err) } 7603 return nil 7604 } 7605 7606 func (p *IPCChainTesterGetRequiredKeysArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 7607 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 7608 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 7609 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 7610 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 7611 if err := oprot.WriteFieldEnd(ctx); err != nil { 7612 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 7613 return err 7614 } 7615 7616 func (p *IPCChainTesterGetRequiredKeysArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 7617 if err := oprot.WriteFieldBegin(ctx, "transaction", thrift.STRING, 2); err != nil { 7618 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:transaction: ", p), err) } 7619 if err := oprot.WriteString(ctx, string(p.Transaction)); err != nil { 7620 return thrift.PrependError(fmt.Sprintf("%T.transaction (2) field write error: ", p), err) } 7621 if err := oprot.WriteFieldEnd(ctx); err != nil { 7622 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:transaction: ", p), err) } 7623 return err 7624 } 7625 7626 func (p *IPCChainTesterGetRequiredKeysArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 7627 if err := oprot.WriteFieldBegin(ctx, "available_keys", thrift.LIST, 3); err != nil { 7628 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:available_keys: ", p), err) } 7629 if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.AvailableKeys)); err != nil { 7630 return thrift.PrependError("error writing list begin: ", err) 7631 } 7632 for _, v := range p.AvailableKeys { 7633 if err := oprot.WriteString(ctx, string(v)); err != nil { 7634 return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } 7635 } 7636 if err := oprot.WriteListEnd(ctx); err != nil { 7637 return thrift.PrependError("error writing list end: ", err) 7638 } 7639 if err := oprot.WriteFieldEnd(ctx); err != nil { 7640 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:available_keys: ", p), err) } 7641 return err 7642 } 7643 7644 func (p *IPCChainTesterGetRequiredKeysArgs) String() string { 7645 if p == nil { 7646 return "<nil>" 7647 } 7648 return fmt.Sprintf("IPCChainTesterGetRequiredKeysArgs(%+v)", *p) 7649 } 7650 7651 // Attributes: 7652 // - Success 7653 type IPCChainTesterGetRequiredKeysResult struct { 7654 Success *string `thrift:"success,0" db:"success" json:"success,omitempty"` 7655 } 7656 7657 func NewIPCChainTesterGetRequiredKeysResult() *IPCChainTesterGetRequiredKeysResult { 7658 return &IPCChainTesterGetRequiredKeysResult{} 7659 } 7660 7661 var IPCChainTesterGetRequiredKeysResult_Success_DEFAULT string 7662 func (p *IPCChainTesterGetRequiredKeysResult) GetSuccess() string { 7663 if !p.IsSetSuccess() { 7664 return IPCChainTesterGetRequiredKeysResult_Success_DEFAULT 7665 } 7666 return *p.Success 7667 } 7668 func (p *IPCChainTesterGetRequiredKeysResult) IsSetSuccess() bool { 7669 return p.Success != nil 7670 } 7671 7672 func (p *IPCChainTesterGetRequiredKeysResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 7673 if _, err := iprot.ReadStructBegin(ctx); err != nil { 7674 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 7675 } 7676 7677 7678 for { 7679 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 7680 if err != nil { 7681 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 7682 } 7683 if fieldTypeId == thrift.STOP { break; } 7684 switch fieldId { 7685 case 0: 7686 if fieldTypeId == thrift.STRING { 7687 if err := p.ReadField0(ctx, iprot); err != nil { 7688 return err 7689 } 7690 } else { 7691 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7692 return err 7693 } 7694 } 7695 default: 7696 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7697 return err 7698 } 7699 } 7700 if err := iprot.ReadFieldEnd(ctx); err != nil { 7701 return err 7702 } 7703 } 7704 if err := iprot.ReadStructEnd(ctx); err != nil { 7705 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 7706 } 7707 return nil 7708 } 7709 7710 func (p *IPCChainTesterGetRequiredKeysResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 7711 if v, err := iprot.ReadString(ctx); err != nil { 7712 return thrift.PrependError("error reading field 0: ", err) 7713 } else { 7714 p.Success = &v 7715 } 7716 return nil 7717 } 7718 7719 func (p *IPCChainTesterGetRequiredKeysResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 7720 if err := oprot.WriteStructBegin(ctx, "get_required_keys_result"); err != nil { 7721 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 7722 if p != nil { 7723 if err := p.writeField0(ctx, oprot); err != nil { return err } 7724 } 7725 if err := oprot.WriteFieldStop(ctx); err != nil { 7726 return thrift.PrependError("write field stop error: ", err) } 7727 if err := oprot.WriteStructEnd(ctx); err != nil { 7728 return thrift.PrependError("write struct stop error: ", err) } 7729 return nil 7730 } 7731 7732 func (p *IPCChainTesterGetRequiredKeysResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 7733 if p.IsSetSuccess() { 7734 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 7735 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 7736 if err := oprot.WriteString(ctx, string(*p.Success)); err != nil { 7737 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 7738 if err := oprot.WriteFieldEnd(ctx); err != nil { 7739 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 7740 } 7741 return err 7742 } 7743 7744 func (p *IPCChainTesterGetRequiredKeysResult) String() string { 7745 if p == nil { 7746 return "<nil>" 7747 } 7748 return fmt.Sprintf("IPCChainTesterGetRequiredKeysResult(%+v)", *p) 7749 } 7750 7751 // Attributes: 7752 // - ID 7753 // - NextBlockSkipSeconds 7754 type IPCChainTesterProduceBlockArgs struct { 7755 ID int32 `thrift:"id,1" db:"id" json:"id"` 7756 NextBlockSkipSeconds int64 `thrift:"next_block_skip_seconds,2" db:"next_block_skip_seconds" json:"next_block_skip_seconds"` 7757 } 7758 7759 func NewIPCChainTesterProduceBlockArgs() *IPCChainTesterProduceBlockArgs { 7760 return &IPCChainTesterProduceBlockArgs{} 7761 } 7762 7763 7764 func (p *IPCChainTesterProduceBlockArgs) GetID() int32 { 7765 return p.ID 7766 } 7767 7768 func (p *IPCChainTesterProduceBlockArgs) GetNextBlockSkipSeconds() int64 { 7769 return p.NextBlockSkipSeconds 7770 } 7771 func (p *IPCChainTesterProduceBlockArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 7772 if _, err := iprot.ReadStructBegin(ctx); err != nil { 7773 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 7774 } 7775 7776 7777 for { 7778 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 7779 if err != nil { 7780 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 7781 } 7782 if fieldTypeId == thrift.STOP { break; } 7783 switch fieldId { 7784 case 1: 7785 if fieldTypeId == thrift.I32 { 7786 if err := p.ReadField1(ctx, iprot); err != nil { 7787 return err 7788 } 7789 } else { 7790 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7791 return err 7792 } 7793 } 7794 case 2: 7795 if fieldTypeId == thrift.I64 { 7796 if err := p.ReadField2(ctx, iprot); err != nil { 7797 return err 7798 } 7799 } else { 7800 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7801 return err 7802 } 7803 } 7804 default: 7805 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7806 return err 7807 } 7808 } 7809 if err := iprot.ReadFieldEnd(ctx); err != nil { 7810 return err 7811 } 7812 } 7813 if err := iprot.ReadStructEnd(ctx); err != nil { 7814 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 7815 } 7816 return nil 7817 } 7818 7819 func (p *IPCChainTesterProduceBlockArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 7820 if v, err := iprot.ReadI32(ctx); err != nil { 7821 return thrift.PrependError("error reading field 1: ", err) 7822 } else { 7823 p.ID = v 7824 } 7825 return nil 7826 } 7827 7828 func (p *IPCChainTesterProduceBlockArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 7829 if v, err := iprot.ReadI64(ctx); err != nil { 7830 return thrift.PrependError("error reading field 2: ", err) 7831 } else { 7832 p.NextBlockSkipSeconds = v 7833 } 7834 return nil 7835 } 7836 7837 func (p *IPCChainTesterProduceBlockArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 7838 if err := oprot.WriteStructBegin(ctx, "produce_block_args"); err != nil { 7839 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 7840 if p != nil { 7841 if err := p.writeField1(ctx, oprot); err != nil { return err } 7842 if err := p.writeField2(ctx, oprot); err != nil { return err } 7843 } 7844 if err := oprot.WriteFieldStop(ctx); err != nil { 7845 return thrift.PrependError("write field stop error: ", err) } 7846 if err := oprot.WriteStructEnd(ctx); err != nil { 7847 return thrift.PrependError("write struct stop error: ", err) } 7848 return nil 7849 } 7850 7851 func (p *IPCChainTesterProduceBlockArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 7852 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 7853 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 7854 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 7855 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 7856 if err := oprot.WriteFieldEnd(ctx); err != nil { 7857 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 7858 return err 7859 } 7860 7861 func (p *IPCChainTesterProduceBlockArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 7862 if err := oprot.WriteFieldBegin(ctx, "next_block_skip_seconds", thrift.I64, 2); err != nil { 7863 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:next_block_skip_seconds: ", p), err) } 7864 if err := oprot.WriteI64(ctx, int64(p.NextBlockSkipSeconds)); err != nil { 7865 return thrift.PrependError(fmt.Sprintf("%T.next_block_skip_seconds (2) field write error: ", p), err) } 7866 if err := oprot.WriteFieldEnd(ctx); err != nil { 7867 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:next_block_skip_seconds: ", p), err) } 7868 return err 7869 } 7870 7871 func (p *IPCChainTesterProduceBlockArgs) String() string { 7872 if p == nil { 7873 return "<nil>" 7874 } 7875 return fmt.Sprintf("IPCChainTesterProduceBlockArgs(%+v)", *p) 7876 } 7877 7878 type IPCChainTesterProduceBlockResult struct { 7879 } 7880 7881 func NewIPCChainTesterProduceBlockResult() *IPCChainTesterProduceBlockResult { 7882 return &IPCChainTesterProduceBlockResult{} 7883 } 7884 7885 func (p *IPCChainTesterProduceBlockResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 7886 if _, err := iprot.ReadStructBegin(ctx); err != nil { 7887 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 7888 } 7889 7890 7891 for { 7892 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 7893 if err != nil { 7894 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 7895 } 7896 if fieldTypeId == thrift.STOP { break; } 7897 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7898 return err 7899 } 7900 if err := iprot.ReadFieldEnd(ctx); err != nil { 7901 return err 7902 } 7903 } 7904 if err := iprot.ReadStructEnd(ctx); err != nil { 7905 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 7906 } 7907 return nil 7908 } 7909 7910 func (p *IPCChainTesterProduceBlockResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 7911 if err := oprot.WriteStructBegin(ctx, "produce_block_result"); err != nil { 7912 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 7913 if p != nil { 7914 } 7915 if err := oprot.WriteFieldStop(ctx); err != nil { 7916 return thrift.PrependError("write field stop error: ", err) } 7917 if err := oprot.WriteStructEnd(ctx); err != nil { 7918 return thrift.PrependError("write struct stop error: ", err) } 7919 return nil 7920 } 7921 7922 func (p *IPCChainTesterProduceBlockResult) String() string { 7923 if p == nil { 7924 return "<nil>" 7925 } 7926 return fmt.Sprintf("IPCChainTesterProduceBlockResult(%+v)", *p) 7927 } 7928 7929 // Attributes: 7930 // - ID 7931 // - Account 7932 // - Action 7933 // - Arguments 7934 // - Permissions 7935 type IPCChainTesterPushActionArgs struct { 7936 ID int32 `thrift:"id,1" db:"id" json:"id"` 7937 Account string `thrift:"account,2" db:"account" json:"account"` 7938 Action string `thrift:"action,3" db:"action" json:"action"` 7939 Arguments *ActionArguments `thrift:"arguments,4" db:"arguments" json:"arguments"` 7940 Permissions string `thrift:"permissions,5" db:"permissions" json:"permissions"` 7941 } 7942 7943 func NewIPCChainTesterPushActionArgs() *IPCChainTesterPushActionArgs { 7944 return &IPCChainTesterPushActionArgs{} 7945 } 7946 7947 7948 func (p *IPCChainTesterPushActionArgs) GetID() int32 { 7949 return p.ID 7950 } 7951 7952 func (p *IPCChainTesterPushActionArgs) GetAccount() string { 7953 return p.Account 7954 } 7955 7956 func (p *IPCChainTesterPushActionArgs) GetAction() string { 7957 return p.Action 7958 } 7959 var IPCChainTesterPushActionArgs_Arguments_DEFAULT *ActionArguments 7960 func (p *IPCChainTesterPushActionArgs) GetArguments() *ActionArguments { 7961 if !p.IsSetArguments() { 7962 return IPCChainTesterPushActionArgs_Arguments_DEFAULT 7963 } 7964 return p.Arguments 7965 } 7966 7967 func (p *IPCChainTesterPushActionArgs) GetPermissions() string { 7968 return p.Permissions 7969 } 7970 func (p *IPCChainTesterPushActionArgs) IsSetArguments() bool { 7971 return p.Arguments != nil 7972 } 7973 7974 func (p *IPCChainTesterPushActionArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 7975 if _, err := iprot.ReadStructBegin(ctx); err != nil { 7976 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 7977 } 7978 7979 7980 for { 7981 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 7982 if err != nil { 7983 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 7984 } 7985 if fieldTypeId == thrift.STOP { break; } 7986 switch fieldId { 7987 case 1: 7988 if fieldTypeId == thrift.I32 { 7989 if err := p.ReadField1(ctx, iprot); err != nil { 7990 return err 7991 } 7992 } else { 7993 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 7994 return err 7995 } 7996 } 7997 case 2: 7998 if fieldTypeId == thrift.STRING { 7999 if err := p.ReadField2(ctx, iprot); err != nil { 8000 return err 8001 } 8002 } else { 8003 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8004 return err 8005 } 8006 } 8007 case 3: 8008 if fieldTypeId == thrift.STRING { 8009 if err := p.ReadField3(ctx, iprot); err != nil { 8010 return err 8011 } 8012 } else { 8013 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8014 return err 8015 } 8016 } 8017 case 4: 8018 if fieldTypeId == thrift.STRUCT { 8019 if err := p.ReadField4(ctx, iprot); err != nil { 8020 return err 8021 } 8022 } else { 8023 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8024 return err 8025 } 8026 } 8027 case 5: 8028 if fieldTypeId == thrift.STRING { 8029 if err := p.ReadField5(ctx, iprot); err != nil { 8030 return err 8031 } 8032 } else { 8033 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8034 return err 8035 } 8036 } 8037 default: 8038 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8039 return err 8040 } 8041 } 8042 if err := iprot.ReadFieldEnd(ctx); err != nil { 8043 return err 8044 } 8045 } 8046 if err := iprot.ReadStructEnd(ctx); err != nil { 8047 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 8048 } 8049 return nil 8050 } 8051 8052 func (p *IPCChainTesterPushActionArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 8053 if v, err := iprot.ReadI32(ctx); err != nil { 8054 return thrift.PrependError("error reading field 1: ", err) 8055 } else { 8056 p.ID = v 8057 } 8058 return nil 8059 } 8060 8061 func (p *IPCChainTesterPushActionArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 8062 if v, err := iprot.ReadString(ctx); err != nil { 8063 return thrift.PrependError("error reading field 2: ", err) 8064 } else { 8065 p.Account = v 8066 } 8067 return nil 8068 } 8069 8070 func (p *IPCChainTesterPushActionArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 8071 if v, err := iprot.ReadString(ctx); err != nil { 8072 return thrift.PrependError("error reading field 3: ", err) 8073 } else { 8074 p.Action = v 8075 } 8076 return nil 8077 } 8078 8079 func (p *IPCChainTesterPushActionArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 8080 p.Arguments = &ActionArguments{} 8081 if err := p.Arguments.Read(ctx, iprot); err != nil { 8082 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Arguments), err) 8083 } 8084 return nil 8085 } 8086 8087 func (p *IPCChainTesterPushActionArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 8088 if v, err := iprot.ReadString(ctx); err != nil { 8089 return thrift.PrependError("error reading field 5: ", err) 8090 } else { 8091 p.Permissions = v 8092 } 8093 return nil 8094 } 8095 8096 func (p *IPCChainTesterPushActionArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 8097 if err := oprot.WriteStructBegin(ctx, "push_action_args"); err != nil { 8098 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 8099 if p != nil { 8100 if err := p.writeField1(ctx, oprot); err != nil { return err } 8101 if err := p.writeField2(ctx, oprot); err != nil { return err } 8102 if err := p.writeField3(ctx, oprot); err != nil { return err } 8103 if err := p.writeField4(ctx, oprot); err != nil { return err } 8104 if err := p.writeField5(ctx, oprot); err != nil { return err } 8105 } 8106 if err := oprot.WriteFieldStop(ctx); err != nil { 8107 return thrift.PrependError("write field stop error: ", err) } 8108 if err := oprot.WriteStructEnd(ctx); err != nil { 8109 return thrift.PrependError("write struct stop error: ", err) } 8110 return nil 8111 } 8112 8113 func (p *IPCChainTesterPushActionArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 8114 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 8115 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 8116 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 8117 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 8118 if err := oprot.WriteFieldEnd(ctx); err != nil { 8119 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 8120 return err 8121 } 8122 8123 func (p *IPCChainTesterPushActionArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 8124 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRING, 2); err != nil { 8125 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:account: ", p), err) } 8126 if err := oprot.WriteString(ctx, string(p.Account)); err != nil { 8127 return thrift.PrependError(fmt.Sprintf("%T.account (2) field write error: ", p), err) } 8128 if err := oprot.WriteFieldEnd(ctx); err != nil { 8129 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:account: ", p), err) } 8130 return err 8131 } 8132 8133 func (p *IPCChainTesterPushActionArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 8134 if err := oprot.WriteFieldBegin(ctx, "action", thrift.STRING, 3); err != nil { 8135 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:action: ", p), err) } 8136 if err := oprot.WriteString(ctx, string(p.Action)); err != nil { 8137 return thrift.PrependError(fmt.Sprintf("%T.action (3) field write error: ", p), err) } 8138 if err := oprot.WriteFieldEnd(ctx); err != nil { 8139 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:action: ", p), err) } 8140 return err 8141 } 8142 8143 func (p *IPCChainTesterPushActionArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 8144 if err := oprot.WriteFieldBegin(ctx, "arguments", thrift.STRUCT, 4); err != nil { 8145 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:arguments: ", p), err) } 8146 if err := p.Arguments.Write(ctx, oprot); err != nil { 8147 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Arguments), err) 8148 } 8149 if err := oprot.WriteFieldEnd(ctx); err != nil { 8150 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:arguments: ", p), err) } 8151 return err 8152 } 8153 8154 func (p *IPCChainTesterPushActionArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 8155 if err := oprot.WriteFieldBegin(ctx, "permissions", thrift.STRING, 5); err != nil { 8156 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:permissions: ", p), err) } 8157 if err := oprot.WriteString(ctx, string(p.Permissions)); err != nil { 8158 return thrift.PrependError(fmt.Sprintf("%T.permissions (5) field write error: ", p), err) } 8159 if err := oprot.WriteFieldEnd(ctx); err != nil { 8160 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:permissions: ", p), err) } 8161 return err 8162 } 8163 8164 func (p *IPCChainTesterPushActionArgs) String() string { 8165 if p == nil { 8166 return "<nil>" 8167 } 8168 return fmt.Sprintf("IPCChainTesterPushActionArgs(%+v)", *p) 8169 } 8170 8171 // Attributes: 8172 // - Success 8173 type IPCChainTesterPushActionResult struct { 8174 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 8175 } 8176 8177 func NewIPCChainTesterPushActionResult() *IPCChainTesterPushActionResult { 8178 return &IPCChainTesterPushActionResult{} 8179 } 8180 8181 var IPCChainTesterPushActionResult_Success_DEFAULT []byte 8182 8183 func (p *IPCChainTesterPushActionResult) GetSuccess() []byte { 8184 return p.Success 8185 } 8186 func (p *IPCChainTesterPushActionResult) IsSetSuccess() bool { 8187 return p.Success != nil 8188 } 8189 8190 func (p *IPCChainTesterPushActionResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 8191 if _, err := iprot.ReadStructBegin(ctx); err != nil { 8192 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 8193 } 8194 8195 8196 for { 8197 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 8198 if err != nil { 8199 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 8200 } 8201 if fieldTypeId == thrift.STOP { break; } 8202 switch fieldId { 8203 case 0: 8204 if fieldTypeId == thrift.STRING { 8205 if err := p.ReadField0(ctx, iprot); err != nil { 8206 return err 8207 } 8208 } else { 8209 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8210 return err 8211 } 8212 } 8213 default: 8214 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8215 return err 8216 } 8217 } 8218 if err := iprot.ReadFieldEnd(ctx); err != nil { 8219 return err 8220 } 8221 } 8222 if err := iprot.ReadStructEnd(ctx); err != nil { 8223 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 8224 } 8225 return nil 8226 } 8227 8228 func (p *IPCChainTesterPushActionResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 8229 if v, err := iprot.ReadBinary(ctx); err != nil { 8230 return thrift.PrependError("error reading field 0: ", err) 8231 } else { 8232 p.Success = v 8233 } 8234 return nil 8235 } 8236 8237 func (p *IPCChainTesterPushActionResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 8238 if err := oprot.WriteStructBegin(ctx, "push_action_result"); err != nil { 8239 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 8240 if p != nil { 8241 if err := p.writeField0(ctx, oprot); err != nil { return err } 8242 } 8243 if err := oprot.WriteFieldStop(ctx); err != nil { 8244 return thrift.PrependError("write field stop error: ", err) } 8245 if err := oprot.WriteStructEnd(ctx); err != nil { 8246 return thrift.PrependError("write struct stop error: ", err) } 8247 return nil 8248 } 8249 8250 func (p *IPCChainTesterPushActionResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 8251 if p.IsSetSuccess() { 8252 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 8253 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 8254 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 8255 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 8256 if err := oprot.WriteFieldEnd(ctx); err != nil { 8257 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 8258 } 8259 return err 8260 } 8261 8262 func (p *IPCChainTesterPushActionResult) String() string { 8263 if p == nil { 8264 return "<nil>" 8265 } 8266 return fmt.Sprintf("IPCChainTesterPushActionResult(%+v)", *p) 8267 } 8268 8269 // Attributes: 8270 // - ID 8271 // - Actions 8272 type IPCChainTesterPushActionsArgs struct { 8273 ID int32 `thrift:"id,1" db:"id" json:"id"` 8274 Actions []*Action `thrift:"actions,2" db:"actions" json:"actions"` 8275 } 8276 8277 func NewIPCChainTesterPushActionsArgs() *IPCChainTesterPushActionsArgs { 8278 return &IPCChainTesterPushActionsArgs{} 8279 } 8280 8281 8282 func (p *IPCChainTesterPushActionsArgs) GetID() int32 { 8283 return p.ID 8284 } 8285 8286 func (p *IPCChainTesterPushActionsArgs) GetActions() []*Action { 8287 return p.Actions 8288 } 8289 func (p *IPCChainTesterPushActionsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 8290 if _, err := iprot.ReadStructBegin(ctx); err != nil { 8291 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 8292 } 8293 8294 8295 for { 8296 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 8297 if err != nil { 8298 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 8299 } 8300 if fieldTypeId == thrift.STOP { break; } 8301 switch fieldId { 8302 case 1: 8303 if fieldTypeId == thrift.I32 { 8304 if err := p.ReadField1(ctx, iprot); err != nil { 8305 return err 8306 } 8307 } else { 8308 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8309 return err 8310 } 8311 } 8312 case 2: 8313 if fieldTypeId == thrift.LIST { 8314 if err := p.ReadField2(ctx, iprot); err != nil { 8315 return err 8316 } 8317 } else { 8318 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8319 return err 8320 } 8321 } 8322 default: 8323 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8324 return err 8325 } 8326 } 8327 if err := iprot.ReadFieldEnd(ctx); err != nil { 8328 return err 8329 } 8330 } 8331 if err := iprot.ReadStructEnd(ctx); err != nil { 8332 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 8333 } 8334 return nil 8335 } 8336 8337 func (p *IPCChainTesterPushActionsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 8338 if v, err := iprot.ReadI32(ctx); err != nil { 8339 return thrift.PrependError("error reading field 1: ", err) 8340 } else { 8341 p.ID = v 8342 } 8343 return nil 8344 } 8345 8346 func (p *IPCChainTesterPushActionsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 8347 _, size, err := iprot.ReadListBegin(ctx) 8348 if err != nil { 8349 return thrift.PrependError("error reading list begin: ", err) 8350 } 8351 tSlice := make([]*Action, 0, size) 8352 p.Actions = tSlice 8353 for i := 0; i < size; i ++ { 8354 _elem65 := &Action{} 8355 if err := _elem65.Read(ctx, iprot); err != nil { 8356 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem65), err) 8357 } 8358 p.Actions = append(p.Actions, _elem65) 8359 } 8360 if err := iprot.ReadListEnd(ctx); err != nil { 8361 return thrift.PrependError("error reading list end: ", err) 8362 } 8363 return nil 8364 } 8365 8366 func (p *IPCChainTesterPushActionsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 8367 if err := oprot.WriteStructBegin(ctx, "push_actions_args"); err != nil { 8368 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 8369 if p != nil { 8370 if err := p.writeField1(ctx, oprot); err != nil { return err } 8371 if err := p.writeField2(ctx, oprot); err != nil { return err } 8372 } 8373 if err := oprot.WriteFieldStop(ctx); err != nil { 8374 return thrift.PrependError("write field stop error: ", err) } 8375 if err := oprot.WriteStructEnd(ctx); err != nil { 8376 return thrift.PrependError("write struct stop error: ", err) } 8377 return nil 8378 } 8379 8380 func (p *IPCChainTesterPushActionsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 8381 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 8382 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 8383 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 8384 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 8385 if err := oprot.WriteFieldEnd(ctx); err != nil { 8386 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 8387 return err 8388 } 8389 8390 func (p *IPCChainTesterPushActionsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 8391 if err := oprot.WriteFieldBegin(ctx, "actions", thrift.LIST, 2); err != nil { 8392 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:actions: ", p), err) } 8393 if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Actions)); err != nil { 8394 return thrift.PrependError("error writing list begin: ", err) 8395 } 8396 for _, v := range p.Actions { 8397 if err := v.Write(ctx, oprot); err != nil { 8398 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) 8399 } 8400 } 8401 if err := oprot.WriteListEnd(ctx); err != nil { 8402 return thrift.PrependError("error writing list end: ", err) 8403 } 8404 if err := oprot.WriteFieldEnd(ctx); err != nil { 8405 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:actions: ", p), err) } 8406 return err 8407 } 8408 8409 func (p *IPCChainTesterPushActionsArgs) String() string { 8410 if p == nil { 8411 return "<nil>" 8412 } 8413 return fmt.Sprintf("IPCChainTesterPushActionsArgs(%+v)", *p) 8414 } 8415 8416 // Attributes: 8417 // - Success 8418 type IPCChainTesterPushActionsResult struct { 8419 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 8420 } 8421 8422 func NewIPCChainTesterPushActionsResult() *IPCChainTesterPushActionsResult { 8423 return &IPCChainTesterPushActionsResult{} 8424 } 8425 8426 var IPCChainTesterPushActionsResult_Success_DEFAULT []byte 8427 8428 func (p *IPCChainTesterPushActionsResult) GetSuccess() []byte { 8429 return p.Success 8430 } 8431 func (p *IPCChainTesterPushActionsResult) IsSetSuccess() bool { 8432 return p.Success != nil 8433 } 8434 8435 func (p *IPCChainTesterPushActionsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 8436 if _, err := iprot.ReadStructBegin(ctx); err != nil { 8437 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 8438 } 8439 8440 8441 for { 8442 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 8443 if err != nil { 8444 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 8445 } 8446 if fieldTypeId == thrift.STOP { break; } 8447 switch fieldId { 8448 case 0: 8449 if fieldTypeId == thrift.STRING { 8450 if err := p.ReadField0(ctx, iprot); err != nil { 8451 return err 8452 } 8453 } else { 8454 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8455 return err 8456 } 8457 } 8458 default: 8459 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8460 return err 8461 } 8462 } 8463 if err := iprot.ReadFieldEnd(ctx); err != nil { 8464 return err 8465 } 8466 } 8467 if err := iprot.ReadStructEnd(ctx); err != nil { 8468 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 8469 } 8470 return nil 8471 } 8472 8473 func (p *IPCChainTesterPushActionsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 8474 if v, err := iprot.ReadBinary(ctx); err != nil { 8475 return thrift.PrependError("error reading field 0: ", err) 8476 } else { 8477 p.Success = v 8478 } 8479 return nil 8480 } 8481 8482 func (p *IPCChainTesterPushActionsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 8483 if err := oprot.WriteStructBegin(ctx, "push_actions_result"); err != nil { 8484 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 8485 if p != nil { 8486 if err := p.writeField0(ctx, oprot); err != nil { return err } 8487 } 8488 if err := oprot.WriteFieldStop(ctx); err != nil { 8489 return thrift.PrependError("write field stop error: ", err) } 8490 if err := oprot.WriteStructEnd(ctx); err != nil { 8491 return thrift.PrependError("write struct stop error: ", err) } 8492 return nil 8493 } 8494 8495 func (p *IPCChainTesterPushActionsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 8496 if p.IsSetSuccess() { 8497 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 8498 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 8499 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 8500 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 8501 if err := oprot.WriteFieldEnd(ctx); err != nil { 8502 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 8503 } 8504 return err 8505 } 8506 8507 func (p *IPCChainTesterPushActionsResult) String() string { 8508 if p == nil { 8509 return "<nil>" 8510 } 8511 return fmt.Sprintf("IPCChainTesterPushActionsResult(%+v)", *p) 8512 } 8513 8514 // Attributes: 8515 // - ID 8516 // - Account 8517 // - Wasm 8518 // - Abi 8519 type IPCChainTesterDeployContractArgs struct { 8520 ID int32 `thrift:"id,1" db:"id" json:"id"` 8521 Account string `thrift:"account,2" db:"account" json:"account"` 8522 Wasm string `thrift:"wasm,3" db:"wasm" json:"wasm"` 8523 Abi string `thrift:"abi,4" db:"abi" json:"abi"` 8524 } 8525 8526 func NewIPCChainTesterDeployContractArgs() *IPCChainTesterDeployContractArgs { 8527 return &IPCChainTesterDeployContractArgs{} 8528 } 8529 8530 8531 func (p *IPCChainTesterDeployContractArgs) GetID() int32 { 8532 return p.ID 8533 } 8534 8535 func (p *IPCChainTesterDeployContractArgs) GetAccount() string { 8536 return p.Account 8537 } 8538 8539 func (p *IPCChainTesterDeployContractArgs) GetWasm() string { 8540 return p.Wasm 8541 } 8542 8543 func (p *IPCChainTesterDeployContractArgs) GetAbi() string { 8544 return p.Abi 8545 } 8546 func (p *IPCChainTesterDeployContractArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 8547 if _, err := iprot.ReadStructBegin(ctx); err != nil { 8548 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 8549 } 8550 8551 8552 for { 8553 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 8554 if err != nil { 8555 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 8556 } 8557 if fieldTypeId == thrift.STOP { break; } 8558 switch fieldId { 8559 case 1: 8560 if fieldTypeId == thrift.I32 { 8561 if err := p.ReadField1(ctx, iprot); err != nil { 8562 return err 8563 } 8564 } else { 8565 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8566 return err 8567 } 8568 } 8569 case 2: 8570 if fieldTypeId == thrift.STRING { 8571 if err := p.ReadField2(ctx, iprot); err != nil { 8572 return err 8573 } 8574 } else { 8575 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8576 return err 8577 } 8578 } 8579 case 3: 8580 if fieldTypeId == thrift.STRING { 8581 if err := p.ReadField3(ctx, iprot); err != nil { 8582 return err 8583 } 8584 } else { 8585 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8586 return err 8587 } 8588 } 8589 case 4: 8590 if fieldTypeId == thrift.STRING { 8591 if err := p.ReadField4(ctx, iprot); err != nil { 8592 return err 8593 } 8594 } else { 8595 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8596 return err 8597 } 8598 } 8599 default: 8600 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8601 return err 8602 } 8603 } 8604 if err := iprot.ReadFieldEnd(ctx); err != nil { 8605 return err 8606 } 8607 } 8608 if err := iprot.ReadStructEnd(ctx); err != nil { 8609 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 8610 } 8611 return nil 8612 } 8613 8614 func (p *IPCChainTesterDeployContractArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 8615 if v, err := iprot.ReadI32(ctx); err != nil { 8616 return thrift.PrependError("error reading field 1: ", err) 8617 } else { 8618 p.ID = v 8619 } 8620 return nil 8621 } 8622 8623 func (p *IPCChainTesterDeployContractArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 8624 if v, err := iprot.ReadString(ctx); err != nil { 8625 return thrift.PrependError("error reading field 2: ", err) 8626 } else { 8627 p.Account = v 8628 } 8629 return nil 8630 } 8631 8632 func (p *IPCChainTesterDeployContractArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 8633 if v, err := iprot.ReadString(ctx); err != nil { 8634 return thrift.PrependError("error reading field 3: ", err) 8635 } else { 8636 p.Wasm = v 8637 } 8638 return nil 8639 } 8640 8641 func (p *IPCChainTesterDeployContractArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 8642 if v, err := iprot.ReadString(ctx); err != nil { 8643 return thrift.PrependError("error reading field 4: ", err) 8644 } else { 8645 p.Abi = v 8646 } 8647 return nil 8648 } 8649 8650 func (p *IPCChainTesterDeployContractArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 8651 if err := oprot.WriteStructBegin(ctx, "deploy_contract_args"); err != nil { 8652 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 8653 if p != nil { 8654 if err := p.writeField1(ctx, oprot); err != nil { return err } 8655 if err := p.writeField2(ctx, oprot); err != nil { return err } 8656 if err := p.writeField3(ctx, oprot); err != nil { return err } 8657 if err := p.writeField4(ctx, oprot); err != nil { return err } 8658 } 8659 if err := oprot.WriteFieldStop(ctx); err != nil { 8660 return thrift.PrependError("write field stop error: ", err) } 8661 if err := oprot.WriteStructEnd(ctx); err != nil { 8662 return thrift.PrependError("write struct stop error: ", err) } 8663 return nil 8664 } 8665 8666 func (p *IPCChainTesterDeployContractArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 8667 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 8668 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 8669 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 8670 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 8671 if err := oprot.WriteFieldEnd(ctx); err != nil { 8672 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 8673 return err 8674 } 8675 8676 func (p *IPCChainTesterDeployContractArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 8677 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRING, 2); err != nil { 8678 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:account: ", p), err) } 8679 if err := oprot.WriteString(ctx, string(p.Account)); err != nil { 8680 return thrift.PrependError(fmt.Sprintf("%T.account (2) field write error: ", p), err) } 8681 if err := oprot.WriteFieldEnd(ctx); err != nil { 8682 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:account: ", p), err) } 8683 return err 8684 } 8685 8686 func (p *IPCChainTesterDeployContractArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 8687 if err := oprot.WriteFieldBegin(ctx, "wasm", thrift.STRING, 3); err != nil { 8688 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:wasm: ", p), err) } 8689 if err := oprot.WriteString(ctx, string(p.Wasm)); err != nil { 8690 return thrift.PrependError(fmt.Sprintf("%T.wasm (3) field write error: ", p), err) } 8691 if err := oprot.WriteFieldEnd(ctx); err != nil { 8692 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:wasm: ", p), err) } 8693 return err 8694 } 8695 8696 func (p *IPCChainTesterDeployContractArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 8697 if err := oprot.WriteFieldBegin(ctx, "abi", thrift.STRING, 4); err != nil { 8698 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:abi: ", p), err) } 8699 if err := oprot.WriteString(ctx, string(p.Abi)); err != nil { 8700 return thrift.PrependError(fmt.Sprintf("%T.abi (4) field write error: ", p), err) } 8701 if err := oprot.WriteFieldEnd(ctx); err != nil { 8702 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:abi: ", p), err) } 8703 return err 8704 } 8705 8706 func (p *IPCChainTesterDeployContractArgs) String() string { 8707 if p == nil { 8708 return "<nil>" 8709 } 8710 return fmt.Sprintf("IPCChainTesterDeployContractArgs(%+v)", *p) 8711 } 8712 8713 // Attributes: 8714 // - Success 8715 type IPCChainTesterDeployContractResult struct { 8716 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 8717 } 8718 8719 func NewIPCChainTesterDeployContractResult() *IPCChainTesterDeployContractResult { 8720 return &IPCChainTesterDeployContractResult{} 8721 } 8722 8723 var IPCChainTesterDeployContractResult_Success_DEFAULT []byte 8724 8725 func (p *IPCChainTesterDeployContractResult) GetSuccess() []byte { 8726 return p.Success 8727 } 8728 func (p *IPCChainTesterDeployContractResult) IsSetSuccess() bool { 8729 return p.Success != nil 8730 } 8731 8732 func (p *IPCChainTesterDeployContractResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 8733 if _, err := iprot.ReadStructBegin(ctx); err != nil { 8734 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 8735 } 8736 8737 8738 for { 8739 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 8740 if err != nil { 8741 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 8742 } 8743 if fieldTypeId == thrift.STOP { break; } 8744 switch fieldId { 8745 case 0: 8746 if fieldTypeId == thrift.STRING { 8747 if err := p.ReadField0(ctx, iprot); err != nil { 8748 return err 8749 } 8750 } else { 8751 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8752 return err 8753 } 8754 } 8755 default: 8756 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8757 return err 8758 } 8759 } 8760 if err := iprot.ReadFieldEnd(ctx); err != nil { 8761 return err 8762 } 8763 } 8764 if err := iprot.ReadStructEnd(ctx); err != nil { 8765 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 8766 } 8767 return nil 8768 } 8769 8770 func (p *IPCChainTesterDeployContractResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 8771 if v, err := iprot.ReadBinary(ctx); err != nil { 8772 return thrift.PrependError("error reading field 0: ", err) 8773 } else { 8774 p.Success = v 8775 } 8776 return nil 8777 } 8778 8779 func (p *IPCChainTesterDeployContractResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 8780 if err := oprot.WriteStructBegin(ctx, "deploy_contract_result"); err != nil { 8781 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 8782 if p != nil { 8783 if err := p.writeField0(ctx, oprot); err != nil { return err } 8784 } 8785 if err := oprot.WriteFieldStop(ctx); err != nil { 8786 return thrift.PrependError("write field stop error: ", err) } 8787 if err := oprot.WriteStructEnd(ctx); err != nil { 8788 return thrift.PrependError("write struct stop error: ", err) } 8789 return nil 8790 } 8791 8792 func (p *IPCChainTesterDeployContractResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 8793 if p.IsSetSuccess() { 8794 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 8795 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 8796 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 8797 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 8798 if err := oprot.WriteFieldEnd(ctx); err != nil { 8799 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 8800 } 8801 return err 8802 } 8803 8804 func (p *IPCChainTesterDeployContractResult) String() string { 8805 if p == nil { 8806 return "<nil>" 8807 } 8808 return fmt.Sprintf("IPCChainTesterDeployContractResult(%+v)", *p) 8809 } 8810 8811 // Attributes: 8812 // - ID 8813 // - JSON 8814 // - Code 8815 // - Scope 8816 // - Table 8817 // - LowerBound 8818 // - UpperBound 8819 // - Limit 8820 // - KeyType 8821 // - IndexPosition 8822 // - EncodeType 8823 // - Reverse 8824 // - ShowPayer 8825 type IPCChainTesterGetTableRowsArgs struct { 8826 ID int32 `thrift:"id,1" db:"id" json:"id"` 8827 JSON bool `thrift:"json,2" db:"json" json:"json"` 8828 Code string `thrift:"code,3" db:"code" json:"code"` 8829 Scope string `thrift:"scope,4" db:"scope" json:"scope"` 8830 Table string `thrift:"table,5" db:"table" json:"table"` 8831 LowerBound string `thrift:"lower_bound,6" db:"lower_bound" json:"lower_bound"` 8832 UpperBound string `thrift:"upper_bound,7" db:"upper_bound" json:"upper_bound"` 8833 Limit int64 `thrift:"limit,8" db:"limit" json:"limit"` 8834 KeyType string `thrift:"key_type,9" db:"key_type" json:"key_type"` 8835 IndexPosition string `thrift:"index_position,10" db:"index_position" json:"index_position"` 8836 EncodeType string `thrift:"encode_type,11" db:"encode_type" json:"encode_type"` 8837 Reverse bool `thrift:"reverse,12" db:"reverse" json:"reverse"` 8838 ShowPayer bool `thrift:"show_payer,13" db:"show_payer" json:"show_payer"` 8839 } 8840 8841 func NewIPCChainTesterGetTableRowsArgs() *IPCChainTesterGetTableRowsArgs { 8842 return &IPCChainTesterGetTableRowsArgs{} 8843 } 8844 8845 8846 func (p *IPCChainTesterGetTableRowsArgs) GetID() int32 { 8847 return p.ID 8848 } 8849 8850 func (p *IPCChainTesterGetTableRowsArgs) GetJSON() bool { 8851 return p.JSON 8852 } 8853 8854 func (p *IPCChainTesterGetTableRowsArgs) GetCode() string { 8855 return p.Code 8856 } 8857 8858 func (p *IPCChainTesterGetTableRowsArgs) GetScope() string { 8859 return p.Scope 8860 } 8861 8862 func (p *IPCChainTesterGetTableRowsArgs) GetTable() string { 8863 return p.Table 8864 } 8865 8866 func (p *IPCChainTesterGetTableRowsArgs) GetLowerBound() string { 8867 return p.LowerBound 8868 } 8869 8870 func (p *IPCChainTesterGetTableRowsArgs) GetUpperBound() string { 8871 return p.UpperBound 8872 } 8873 8874 func (p *IPCChainTesterGetTableRowsArgs) GetLimit() int64 { 8875 return p.Limit 8876 } 8877 8878 func (p *IPCChainTesterGetTableRowsArgs) GetKeyType() string { 8879 return p.KeyType 8880 } 8881 8882 func (p *IPCChainTesterGetTableRowsArgs) GetIndexPosition() string { 8883 return p.IndexPosition 8884 } 8885 8886 func (p *IPCChainTesterGetTableRowsArgs) GetEncodeType() string { 8887 return p.EncodeType 8888 } 8889 8890 func (p *IPCChainTesterGetTableRowsArgs) GetReverse() bool { 8891 return p.Reverse 8892 } 8893 8894 func (p *IPCChainTesterGetTableRowsArgs) GetShowPayer() bool { 8895 return p.ShowPayer 8896 } 8897 func (p *IPCChainTesterGetTableRowsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 8898 if _, err := iprot.ReadStructBegin(ctx); err != nil { 8899 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 8900 } 8901 8902 8903 for { 8904 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 8905 if err != nil { 8906 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 8907 } 8908 if fieldTypeId == thrift.STOP { break; } 8909 switch fieldId { 8910 case 1: 8911 if fieldTypeId == thrift.I32 { 8912 if err := p.ReadField1(ctx, iprot); err != nil { 8913 return err 8914 } 8915 } else { 8916 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8917 return err 8918 } 8919 } 8920 case 2: 8921 if fieldTypeId == thrift.BOOL { 8922 if err := p.ReadField2(ctx, iprot); err != nil { 8923 return err 8924 } 8925 } else { 8926 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8927 return err 8928 } 8929 } 8930 case 3: 8931 if fieldTypeId == thrift.STRING { 8932 if err := p.ReadField3(ctx, iprot); err != nil { 8933 return err 8934 } 8935 } else { 8936 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8937 return err 8938 } 8939 } 8940 case 4: 8941 if fieldTypeId == thrift.STRING { 8942 if err := p.ReadField4(ctx, iprot); err != nil { 8943 return err 8944 } 8945 } else { 8946 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8947 return err 8948 } 8949 } 8950 case 5: 8951 if fieldTypeId == thrift.STRING { 8952 if err := p.ReadField5(ctx, iprot); err != nil { 8953 return err 8954 } 8955 } else { 8956 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8957 return err 8958 } 8959 } 8960 case 6: 8961 if fieldTypeId == thrift.STRING { 8962 if err := p.ReadField6(ctx, iprot); err != nil { 8963 return err 8964 } 8965 } else { 8966 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8967 return err 8968 } 8969 } 8970 case 7: 8971 if fieldTypeId == thrift.STRING { 8972 if err := p.ReadField7(ctx, iprot); err != nil { 8973 return err 8974 } 8975 } else { 8976 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8977 return err 8978 } 8979 } 8980 case 8: 8981 if fieldTypeId == thrift.I64 { 8982 if err := p.ReadField8(ctx, iprot); err != nil { 8983 return err 8984 } 8985 } else { 8986 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8987 return err 8988 } 8989 } 8990 case 9: 8991 if fieldTypeId == thrift.STRING { 8992 if err := p.ReadField9(ctx, iprot); err != nil { 8993 return err 8994 } 8995 } else { 8996 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 8997 return err 8998 } 8999 } 9000 case 10: 9001 if fieldTypeId == thrift.STRING { 9002 if err := p.ReadField10(ctx, iprot); err != nil { 9003 return err 9004 } 9005 } else { 9006 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 9007 return err 9008 } 9009 } 9010 case 11: 9011 if fieldTypeId == thrift.STRING { 9012 if err := p.ReadField11(ctx, iprot); err != nil { 9013 return err 9014 } 9015 } else { 9016 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 9017 return err 9018 } 9019 } 9020 case 12: 9021 if fieldTypeId == thrift.BOOL { 9022 if err := p.ReadField12(ctx, iprot); err != nil { 9023 return err 9024 } 9025 } else { 9026 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 9027 return err 9028 } 9029 } 9030 case 13: 9031 if fieldTypeId == thrift.BOOL { 9032 if err := p.ReadField13(ctx, iprot); err != nil { 9033 return err 9034 } 9035 } else { 9036 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 9037 return err 9038 } 9039 } 9040 default: 9041 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 9042 return err 9043 } 9044 } 9045 if err := iprot.ReadFieldEnd(ctx); err != nil { 9046 return err 9047 } 9048 } 9049 if err := iprot.ReadStructEnd(ctx); err != nil { 9050 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 9051 } 9052 return nil 9053 } 9054 9055 func (p *IPCChainTesterGetTableRowsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 9056 if v, err := iprot.ReadI32(ctx); err != nil { 9057 return thrift.PrependError("error reading field 1: ", err) 9058 } else { 9059 p.ID = v 9060 } 9061 return nil 9062 } 9063 9064 func (p *IPCChainTesterGetTableRowsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 9065 if v, err := iprot.ReadBool(ctx); err != nil { 9066 return thrift.PrependError("error reading field 2: ", err) 9067 } else { 9068 p.JSON = v 9069 } 9070 return nil 9071 } 9072 9073 func (p *IPCChainTesterGetTableRowsArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 9074 if v, err := iprot.ReadString(ctx); err != nil { 9075 return thrift.PrependError("error reading field 3: ", err) 9076 } else { 9077 p.Code = v 9078 } 9079 return nil 9080 } 9081 9082 func (p *IPCChainTesterGetTableRowsArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 9083 if v, err := iprot.ReadString(ctx); err != nil { 9084 return thrift.PrependError("error reading field 4: ", err) 9085 } else { 9086 p.Scope = v 9087 } 9088 return nil 9089 } 9090 9091 func (p *IPCChainTesterGetTableRowsArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 9092 if v, err := iprot.ReadString(ctx); err != nil { 9093 return thrift.PrependError("error reading field 5: ", err) 9094 } else { 9095 p.Table = v 9096 } 9097 return nil 9098 } 9099 9100 func (p *IPCChainTesterGetTableRowsArgs) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { 9101 if v, err := iprot.ReadString(ctx); err != nil { 9102 return thrift.PrependError("error reading field 6: ", err) 9103 } else { 9104 p.LowerBound = v 9105 } 9106 return nil 9107 } 9108 9109 func (p *IPCChainTesterGetTableRowsArgs) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { 9110 if v, err := iprot.ReadString(ctx); err != nil { 9111 return thrift.PrependError("error reading field 7: ", err) 9112 } else { 9113 p.UpperBound = v 9114 } 9115 return nil 9116 } 9117 9118 func (p *IPCChainTesterGetTableRowsArgs) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { 9119 if v, err := iprot.ReadI64(ctx); err != nil { 9120 return thrift.PrependError("error reading field 8: ", err) 9121 } else { 9122 p.Limit = v 9123 } 9124 return nil 9125 } 9126 9127 func (p *IPCChainTesterGetTableRowsArgs) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { 9128 if v, err := iprot.ReadString(ctx); err != nil { 9129 return thrift.PrependError("error reading field 9: ", err) 9130 } else { 9131 p.KeyType = v 9132 } 9133 return nil 9134 } 9135 9136 func (p *IPCChainTesterGetTableRowsArgs) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { 9137 if v, err := iprot.ReadString(ctx); err != nil { 9138 return thrift.PrependError("error reading field 10: ", err) 9139 } else { 9140 p.IndexPosition = v 9141 } 9142 return nil 9143 } 9144 9145 func (p *IPCChainTesterGetTableRowsArgs) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { 9146 if v, err := iprot.ReadString(ctx); err != nil { 9147 return thrift.PrependError("error reading field 11: ", err) 9148 } else { 9149 p.EncodeType = v 9150 } 9151 return nil 9152 } 9153 9154 func (p *IPCChainTesterGetTableRowsArgs) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { 9155 if v, err := iprot.ReadBool(ctx); err != nil { 9156 return thrift.PrependError("error reading field 12: ", err) 9157 } else { 9158 p.Reverse = v 9159 } 9160 return nil 9161 } 9162 9163 func (p *IPCChainTesterGetTableRowsArgs) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { 9164 if v, err := iprot.ReadBool(ctx); err != nil { 9165 return thrift.PrependError("error reading field 13: ", err) 9166 } else { 9167 p.ShowPayer = v 9168 } 9169 return nil 9170 } 9171 9172 func (p *IPCChainTesterGetTableRowsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 9173 if err := oprot.WriteStructBegin(ctx, "get_table_rows_args"); err != nil { 9174 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 9175 if p != nil { 9176 if err := p.writeField1(ctx, oprot); err != nil { return err } 9177 if err := p.writeField2(ctx, oprot); err != nil { return err } 9178 if err := p.writeField3(ctx, oprot); err != nil { return err } 9179 if err := p.writeField4(ctx, oprot); err != nil { return err } 9180 if err := p.writeField5(ctx, oprot); err != nil { return err } 9181 if err := p.writeField6(ctx, oprot); err != nil { return err } 9182 if err := p.writeField7(ctx, oprot); err != nil { return err } 9183 if err := p.writeField8(ctx, oprot); err != nil { return err } 9184 if err := p.writeField9(ctx, oprot); err != nil { return err } 9185 if err := p.writeField10(ctx, oprot); err != nil { return err } 9186 if err := p.writeField11(ctx, oprot); err != nil { return err } 9187 if err := p.writeField12(ctx, oprot); err != nil { return err } 9188 if err := p.writeField13(ctx, oprot); err != nil { return err } 9189 } 9190 if err := oprot.WriteFieldStop(ctx); err != nil { 9191 return thrift.PrependError("write field stop error: ", err) } 9192 if err := oprot.WriteStructEnd(ctx); err != nil { 9193 return thrift.PrependError("write struct stop error: ", err) } 9194 return nil 9195 } 9196 9197 func (p *IPCChainTesterGetTableRowsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 9198 if err := oprot.WriteFieldBegin(ctx, "id", thrift.I32, 1); err != nil { 9199 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } 9200 if err := oprot.WriteI32(ctx, int32(p.ID)); err != nil { 9201 return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } 9202 if err := oprot.WriteFieldEnd(ctx); err != nil { 9203 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } 9204 return err 9205 } 9206 9207 func (p *IPCChainTesterGetTableRowsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 9208 if err := oprot.WriteFieldBegin(ctx, "json", thrift.BOOL, 2); err != nil { 9209 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:json: ", p), err) } 9210 if err := oprot.WriteBool(ctx, bool(p.JSON)); err != nil { 9211 return thrift.PrependError(fmt.Sprintf("%T.json (2) field write error: ", p), err) } 9212 if err := oprot.WriteFieldEnd(ctx); err != nil { 9213 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:json: ", p), err) } 9214 return err 9215 } 9216 9217 func (p *IPCChainTesterGetTableRowsArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 9218 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRING, 3); err != nil { 9219 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:code: ", p), err) } 9220 if err := oprot.WriteString(ctx, string(p.Code)); err != nil { 9221 return thrift.PrependError(fmt.Sprintf("%T.code (3) field write error: ", p), err) } 9222 if err := oprot.WriteFieldEnd(ctx); err != nil { 9223 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:code: ", p), err) } 9224 return err 9225 } 9226 9227 func (p *IPCChainTesterGetTableRowsArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 9228 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRING, 4); err != nil { 9229 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:scope: ", p), err) } 9230 if err := oprot.WriteString(ctx, string(p.Scope)); err != nil { 9231 return thrift.PrependError(fmt.Sprintf("%T.scope (4) field write error: ", p), err) } 9232 if err := oprot.WriteFieldEnd(ctx); err != nil { 9233 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:scope: ", p), err) } 9234 return err 9235 } 9236 9237 func (p *IPCChainTesterGetTableRowsArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 9238 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 5); err != nil { 9239 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:table: ", p), err) } 9240 if err := oprot.WriteString(ctx, string(p.Table)); err != nil { 9241 return thrift.PrependError(fmt.Sprintf("%T.table (5) field write error: ", p), err) } 9242 if err := oprot.WriteFieldEnd(ctx); err != nil { 9243 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:table: ", p), err) } 9244 return err 9245 } 9246 9247 func (p *IPCChainTesterGetTableRowsArgs) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { 9248 if err := oprot.WriteFieldBegin(ctx, "lower_bound", thrift.STRING, 6); err != nil { 9249 return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:lower_bound: ", p), err) } 9250 if err := oprot.WriteString(ctx, string(p.LowerBound)); err != nil { 9251 return thrift.PrependError(fmt.Sprintf("%T.lower_bound (6) field write error: ", p), err) } 9252 if err := oprot.WriteFieldEnd(ctx); err != nil { 9253 return thrift.PrependError(fmt.Sprintf("%T write field end error 6:lower_bound: ", p), err) } 9254 return err 9255 } 9256 9257 func (p *IPCChainTesterGetTableRowsArgs) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { 9258 if err := oprot.WriteFieldBegin(ctx, "upper_bound", thrift.STRING, 7); err != nil { 9259 return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:upper_bound: ", p), err) } 9260 if err := oprot.WriteString(ctx, string(p.UpperBound)); err != nil { 9261 return thrift.PrependError(fmt.Sprintf("%T.upper_bound (7) field write error: ", p), err) } 9262 if err := oprot.WriteFieldEnd(ctx); err != nil { 9263 return thrift.PrependError(fmt.Sprintf("%T write field end error 7:upper_bound: ", p), err) } 9264 return err 9265 } 9266 9267 func (p *IPCChainTesterGetTableRowsArgs) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { 9268 if err := oprot.WriteFieldBegin(ctx, "limit", thrift.I64, 8); err != nil { 9269 return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:limit: ", p), err) } 9270 if err := oprot.WriteI64(ctx, int64(p.Limit)); err != nil { 9271 return thrift.PrependError(fmt.Sprintf("%T.limit (8) field write error: ", p), err) } 9272 if err := oprot.WriteFieldEnd(ctx); err != nil { 9273 return thrift.PrependError(fmt.Sprintf("%T write field end error 8:limit: ", p), err) } 9274 return err 9275 } 9276 9277 func (p *IPCChainTesterGetTableRowsArgs) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { 9278 if err := oprot.WriteFieldBegin(ctx, "key_type", thrift.STRING, 9); err != nil { 9279 return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:key_type: ", p), err) } 9280 if err := oprot.WriteString(ctx, string(p.KeyType)); err != nil { 9281 return thrift.PrependError(fmt.Sprintf("%T.key_type (9) field write error: ", p), err) } 9282 if err := oprot.WriteFieldEnd(ctx); err != nil { 9283 return thrift.PrependError(fmt.Sprintf("%T write field end error 9:key_type: ", p), err) } 9284 return err 9285 } 9286 9287 func (p *IPCChainTesterGetTableRowsArgs) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { 9288 if err := oprot.WriteFieldBegin(ctx, "index_position", thrift.STRING, 10); err != nil { 9289 return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:index_position: ", p), err) } 9290 if err := oprot.WriteString(ctx, string(p.IndexPosition)); err != nil { 9291 return thrift.PrependError(fmt.Sprintf("%T.index_position (10) field write error: ", p), err) } 9292 if err := oprot.WriteFieldEnd(ctx); err != nil { 9293 return thrift.PrependError(fmt.Sprintf("%T write field end error 10:index_position: ", p), err) } 9294 return err 9295 } 9296 9297 func (p *IPCChainTesterGetTableRowsArgs) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { 9298 if err := oprot.WriteFieldBegin(ctx, "encode_type", thrift.STRING, 11); err != nil { 9299 return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:encode_type: ", p), err) } 9300 if err := oprot.WriteString(ctx, string(p.EncodeType)); err != nil { 9301 return thrift.PrependError(fmt.Sprintf("%T.encode_type (11) field write error: ", p), err) } 9302 if err := oprot.WriteFieldEnd(ctx); err != nil { 9303 return thrift.PrependError(fmt.Sprintf("%T write field end error 11:encode_type: ", p), err) } 9304 return err 9305 } 9306 9307 func (p *IPCChainTesterGetTableRowsArgs) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { 9308 if err := oprot.WriteFieldBegin(ctx, "reverse", thrift.BOOL, 12); err != nil { 9309 return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:reverse: ", p), err) } 9310 if err := oprot.WriteBool(ctx, bool(p.Reverse)); err != nil { 9311 return thrift.PrependError(fmt.Sprintf("%T.reverse (12) field write error: ", p), err) } 9312 if err := oprot.WriteFieldEnd(ctx); err != nil { 9313 return thrift.PrependError(fmt.Sprintf("%T write field end error 12:reverse: ", p), err) } 9314 return err 9315 } 9316 9317 func (p *IPCChainTesterGetTableRowsArgs) writeField13(ctx context.Context, oprot thrift.TProtocol) (err error) { 9318 if err := oprot.WriteFieldBegin(ctx, "show_payer", thrift.BOOL, 13); err != nil { 9319 return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:show_payer: ", p), err) } 9320 if err := oprot.WriteBool(ctx, bool(p.ShowPayer)); err != nil { 9321 return thrift.PrependError(fmt.Sprintf("%T.show_payer (13) field write error: ", p), err) } 9322 if err := oprot.WriteFieldEnd(ctx); err != nil { 9323 return thrift.PrependError(fmt.Sprintf("%T write field end error 13:show_payer: ", p), err) } 9324 return err 9325 } 9326 9327 func (p *IPCChainTesterGetTableRowsArgs) String() string { 9328 if p == nil { 9329 return "<nil>" 9330 } 9331 return fmt.Sprintf("IPCChainTesterGetTableRowsArgs(%+v)", *p) 9332 } 9333 9334 // Attributes: 9335 // - Success 9336 type IPCChainTesterGetTableRowsResult struct { 9337 Success *string `thrift:"success,0" db:"success" json:"success,omitempty"` 9338 } 9339 9340 func NewIPCChainTesterGetTableRowsResult() *IPCChainTesterGetTableRowsResult { 9341 return &IPCChainTesterGetTableRowsResult{} 9342 } 9343 9344 var IPCChainTesterGetTableRowsResult_Success_DEFAULT string 9345 func (p *IPCChainTesterGetTableRowsResult) GetSuccess() string { 9346 if !p.IsSetSuccess() { 9347 return IPCChainTesterGetTableRowsResult_Success_DEFAULT 9348 } 9349 return *p.Success 9350 } 9351 func (p *IPCChainTesterGetTableRowsResult) IsSetSuccess() bool { 9352 return p.Success != nil 9353 } 9354 9355 func (p *IPCChainTesterGetTableRowsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 9356 if _, err := iprot.ReadStructBegin(ctx); err != nil { 9357 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 9358 } 9359 9360 9361 for { 9362 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 9363 if err != nil { 9364 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 9365 } 9366 if fieldTypeId == thrift.STOP { break; } 9367 switch fieldId { 9368 case 0: 9369 if fieldTypeId == thrift.STRING { 9370 if err := p.ReadField0(ctx, iprot); err != nil { 9371 return err 9372 } 9373 } else { 9374 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 9375 return err 9376 } 9377 } 9378 default: 9379 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 9380 return err 9381 } 9382 } 9383 if err := iprot.ReadFieldEnd(ctx); err != nil { 9384 return err 9385 } 9386 } 9387 if err := iprot.ReadStructEnd(ctx); err != nil { 9388 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 9389 } 9390 return nil 9391 } 9392 9393 func (p *IPCChainTesterGetTableRowsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 9394 if v, err := iprot.ReadString(ctx); err != nil { 9395 return thrift.PrependError("error reading field 0: ", err) 9396 } else { 9397 p.Success = &v 9398 } 9399 return nil 9400 } 9401 9402 func (p *IPCChainTesterGetTableRowsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 9403 if err := oprot.WriteStructBegin(ctx, "get_table_rows_result"); err != nil { 9404 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 9405 if p != nil { 9406 if err := p.writeField0(ctx, oprot); err != nil { return err } 9407 } 9408 if err := oprot.WriteFieldStop(ctx); err != nil { 9409 return thrift.PrependError("write field stop error: ", err) } 9410 if err := oprot.WriteStructEnd(ctx); err != nil { 9411 return thrift.PrependError("write struct stop error: ", err) } 9412 return nil 9413 } 9414 9415 func (p *IPCChainTesterGetTableRowsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 9416 if p.IsSetSuccess() { 9417 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 9418 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 9419 if err := oprot.WriteString(ctx, string(*p.Success)); err != nil { 9420 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 9421 if err := oprot.WriteFieldEnd(ctx); err != nil { 9422 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 9423 } 9424 return err 9425 } 9426 9427 func (p *IPCChainTesterGetTableRowsResult) String() string { 9428 if p == nil { 9429 return "<nil>" 9430 } 9431 return fmt.Sprintf("IPCChainTesterGetTableRowsResult(%+v)", *p) 9432 } 9433 9434 9435 type PushActions interface { 9436 // Parameters: 9437 // - Actions 9438 PushActions(ctx context.Context, actions []*Action) (_r int32, _err error) 9439 } 9440 9441 type PushActionsClient struct { 9442 c thrift.TClient 9443 meta thrift.ResponseMeta 9444 } 9445 9446 func NewPushActionsClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *PushActionsClient { 9447 return &PushActionsClient{ 9448 c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), 9449 } 9450 } 9451 9452 func NewPushActionsClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *PushActionsClient { 9453 return &PushActionsClient{ 9454 c: thrift.NewTStandardClient(iprot, oprot), 9455 } 9456 } 9457 9458 func NewPushActionsClient(c thrift.TClient) *PushActionsClient { 9459 return &PushActionsClient{ 9460 c: c, 9461 } 9462 } 9463 9464 func (p *PushActionsClient) Client_() thrift.TClient { 9465 return p.c 9466 } 9467 9468 func (p *PushActionsClient) LastResponseMeta_() thrift.ResponseMeta { 9469 return p.meta 9470 } 9471 9472 func (p *PushActionsClient) SetLastResponseMeta_(meta thrift.ResponseMeta) { 9473 p.meta = meta 9474 } 9475 9476 // Parameters: 9477 // - Actions 9478 func (p *PushActionsClient) PushActions(ctx context.Context, actions []*Action) (_r int32, _err error) { 9479 var _args145 PushActionsPushActionsArgs 9480 _args145.Actions = actions 9481 var _result147 PushActionsPushActionsResult 9482 var _meta146 thrift.ResponseMeta 9483 _meta146, _err = p.Client_().Call(ctx, "push_actions", &_args145, &_result147) 9484 p.SetLastResponseMeta_(_meta146) 9485 if _err != nil { 9486 return 9487 } 9488 return _result147.GetSuccess(), nil 9489 } 9490 9491 type PushActionsProcessor struct { 9492 processorMap map[string]thrift.TProcessorFunction 9493 handler PushActions 9494 } 9495 9496 func (p *PushActionsProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { 9497 p.processorMap[key] = processor 9498 } 9499 9500 func (p *PushActionsProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { 9501 processor, ok = p.processorMap[key] 9502 return processor, ok 9503 } 9504 9505 func (p *PushActionsProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { 9506 return p.processorMap 9507 } 9508 9509 func NewPushActionsProcessor(handler PushActions) *PushActionsProcessor { 9510 9511 self148 := &PushActionsProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} 9512 self148.processorMap["push_actions"] = &pushActionsProcessorPushActions{handler:handler} 9513 return self148 9514 } 9515 9516 func (p *PushActionsProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 9517 name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) 9518 if err2 != nil { return false, thrift.WrapTException(err2) } 9519 if processor, ok := p.GetProcessorFunction(name); ok { 9520 return processor.Process(ctx, seqId, iprot, oprot) 9521 } 9522 iprot.Skip(ctx, thrift.STRUCT) 9523 iprot.ReadMessageEnd(ctx) 9524 x149 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) 9525 oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) 9526 x149.Write(ctx, oprot) 9527 oprot.WriteMessageEnd(ctx) 9528 oprot.Flush(ctx) 9529 return false, x149 9530 9531 } 9532 9533 type pushActionsProcessorPushActions struct { 9534 handler PushActions 9535 } 9536 9537 func (p *pushActionsProcessorPushActions) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 9538 args := PushActionsPushActionsArgs{} 9539 var err2 error 9540 if err2 = args.Read(ctx, iprot); err2 != nil { 9541 iprot.ReadMessageEnd(ctx) 9542 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 9543 oprot.WriteMessageBegin(ctx, "push_actions", thrift.EXCEPTION, seqId) 9544 x.Write(ctx, oprot) 9545 oprot.WriteMessageEnd(ctx) 9546 oprot.Flush(ctx) 9547 return false, thrift.WrapTException(err2) 9548 } 9549 iprot.ReadMessageEnd(ctx) 9550 9551 tickerCancel := func() {} 9552 // Start a goroutine to do server side connectivity check. 9553 if thrift.ServerConnectivityCheckInterval > 0 { 9554 var cancel context.CancelFunc 9555 ctx, cancel = context.WithCancel(ctx) 9556 defer cancel() 9557 var tickerCtx context.Context 9558 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 9559 defer tickerCancel() 9560 go func(ctx context.Context, cancel context.CancelFunc) { 9561 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 9562 defer ticker.Stop() 9563 for { 9564 select { 9565 case <-ctx.Done(): 9566 return 9567 case <-ticker.C: 9568 if !iprot.Transport().IsOpen() { 9569 cancel() 9570 return 9571 } 9572 } 9573 } 9574 }(tickerCtx, cancel) 9575 } 9576 9577 result := PushActionsPushActionsResult{} 9578 var retval int32 9579 if retval, err2 = p.handler.PushActions(ctx, args.Actions); err2 != nil { 9580 tickerCancel() 9581 if err2 == thrift.ErrAbandonRequest { 9582 return false, thrift.WrapTException(err2) 9583 } 9584 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing push_actions: " + err2.Error()) 9585 oprot.WriteMessageBegin(ctx, "push_actions", thrift.EXCEPTION, seqId) 9586 x.Write(ctx, oprot) 9587 oprot.WriteMessageEnd(ctx) 9588 oprot.Flush(ctx) 9589 return true, thrift.WrapTException(err2) 9590 } else { 9591 result.Success = &retval 9592 } 9593 tickerCancel() 9594 if err2 = oprot.WriteMessageBegin(ctx, "push_actions", thrift.REPLY, seqId); err2 != nil { 9595 err = thrift.WrapTException(err2) 9596 } 9597 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 9598 err = thrift.WrapTException(err2) 9599 } 9600 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 9601 err = thrift.WrapTException(err2) 9602 } 9603 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 9604 err = thrift.WrapTException(err2) 9605 } 9606 if err != nil { 9607 return 9608 } 9609 return true, err 9610 } 9611 9612 9613 // HELPER FUNCTIONS AND STRUCTURES 9614 9615 // Attributes: 9616 // - Actions 9617 type PushActionsPushActionsArgs struct { 9618 Actions []*Action `thrift:"actions,1" db:"actions" json:"actions"` 9619 } 9620 9621 func NewPushActionsPushActionsArgs() *PushActionsPushActionsArgs { 9622 return &PushActionsPushActionsArgs{} 9623 } 9624 9625 9626 func (p *PushActionsPushActionsArgs) GetActions() []*Action { 9627 return p.Actions 9628 } 9629 func (p *PushActionsPushActionsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 9630 if _, err := iprot.ReadStructBegin(ctx); err != nil { 9631 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 9632 } 9633 9634 9635 for { 9636 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 9637 if err != nil { 9638 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 9639 } 9640 if fieldTypeId == thrift.STOP { break; } 9641 switch fieldId { 9642 case 1: 9643 if fieldTypeId == thrift.LIST { 9644 if err := p.ReadField1(ctx, iprot); err != nil { 9645 return err 9646 } 9647 } else { 9648 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 9649 return err 9650 } 9651 } 9652 default: 9653 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 9654 return err 9655 } 9656 } 9657 if err := iprot.ReadFieldEnd(ctx); err != nil { 9658 return err 9659 } 9660 } 9661 if err := iprot.ReadStructEnd(ctx); err != nil { 9662 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 9663 } 9664 return nil 9665 } 9666 9667 func (p *PushActionsPushActionsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 9668 _, size, err := iprot.ReadListBegin(ctx) 9669 if err != nil { 9670 return thrift.PrependError("error reading list begin: ", err) 9671 } 9672 tSlice := make([]*Action, 0, size) 9673 p.Actions = tSlice 9674 for i := 0; i < size; i ++ { 9675 _elem150 := &Action{} 9676 if err := _elem150.Read(ctx, iprot); err != nil { 9677 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem150), err) 9678 } 9679 p.Actions = append(p.Actions, _elem150) 9680 } 9681 if err := iprot.ReadListEnd(ctx); err != nil { 9682 return thrift.PrependError("error reading list end: ", err) 9683 } 9684 return nil 9685 } 9686 9687 func (p *PushActionsPushActionsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 9688 if err := oprot.WriteStructBegin(ctx, "push_actions_args"); err != nil { 9689 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 9690 if p != nil { 9691 if err := p.writeField1(ctx, oprot); err != nil { return err } 9692 } 9693 if err := oprot.WriteFieldStop(ctx); err != nil { 9694 return thrift.PrependError("write field stop error: ", err) } 9695 if err := oprot.WriteStructEnd(ctx); err != nil { 9696 return thrift.PrependError("write struct stop error: ", err) } 9697 return nil 9698 } 9699 9700 func (p *PushActionsPushActionsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 9701 if err := oprot.WriteFieldBegin(ctx, "actions", thrift.LIST, 1); err != nil { 9702 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:actions: ", p), err) } 9703 if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Actions)); err != nil { 9704 return thrift.PrependError("error writing list begin: ", err) 9705 } 9706 for _, v := range p.Actions { 9707 if err := v.Write(ctx, oprot); err != nil { 9708 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) 9709 } 9710 } 9711 if err := oprot.WriteListEnd(ctx); err != nil { 9712 return thrift.PrependError("error writing list end: ", err) 9713 } 9714 if err := oprot.WriteFieldEnd(ctx); err != nil { 9715 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:actions: ", p), err) } 9716 return err 9717 } 9718 9719 func (p *PushActionsPushActionsArgs) String() string { 9720 if p == nil { 9721 return "<nil>" 9722 } 9723 return fmt.Sprintf("PushActionsPushActionsArgs(%+v)", *p) 9724 } 9725 9726 // Attributes: 9727 // - Success 9728 type PushActionsPushActionsResult struct { 9729 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 9730 } 9731 9732 func NewPushActionsPushActionsResult() *PushActionsPushActionsResult { 9733 return &PushActionsPushActionsResult{} 9734 } 9735 9736 var PushActionsPushActionsResult_Success_DEFAULT int32 9737 func (p *PushActionsPushActionsResult) GetSuccess() int32 { 9738 if !p.IsSetSuccess() { 9739 return PushActionsPushActionsResult_Success_DEFAULT 9740 } 9741 return *p.Success 9742 } 9743 func (p *PushActionsPushActionsResult) IsSetSuccess() bool { 9744 return p.Success != nil 9745 } 9746 9747 func (p *PushActionsPushActionsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 9748 if _, err := iprot.ReadStructBegin(ctx); err != nil { 9749 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 9750 } 9751 9752 9753 for { 9754 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 9755 if err != nil { 9756 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 9757 } 9758 if fieldTypeId == thrift.STOP { break; } 9759 switch fieldId { 9760 case 0: 9761 if fieldTypeId == thrift.I32 { 9762 if err := p.ReadField0(ctx, iprot); err != nil { 9763 return err 9764 } 9765 } else { 9766 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 9767 return err 9768 } 9769 } 9770 default: 9771 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 9772 return err 9773 } 9774 } 9775 if err := iprot.ReadFieldEnd(ctx); err != nil { 9776 return err 9777 } 9778 } 9779 if err := iprot.ReadStructEnd(ctx); err != nil { 9780 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 9781 } 9782 return nil 9783 } 9784 9785 func (p *PushActionsPushActionsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 9786 if v, err := iprot.ReadI32(ctx); err != nil { 9787 return thrift.PrependError("error reading field 0: ", err) 9788 } else { 9789 p.Success = &v 9790 } 9791 return nil 9792 } 9793 9794 func (p *PushActionsPushActionsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 9795 if err := oprot.WriteStructBegin(ctx, "push_actions_result"); err != nil { 9796 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 9797 if p != nil { 9798 if err := p.writeField0(ctx, oprot); err != nil { return err } 9799 } 9800 if err := oprot.WriteFieldStop(ctx); err != nil { 9801 return thrift.PrependError("write field stop error: ", err) } 9802 if err := oprot.WriteStructEnd(ctx); err != nil { 9803 return thrift.PrependError("write struct stop error: ", err) } 9804 return nil 9805 } 9806 9807 func (p *PushActionsPushActionsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 9808 if p.IsSetSuccess() { 9809 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 9810 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 9811 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 9812 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 9813 if err := oprot.WriteFieldEnd(ctx); err != nil { 9814 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 9815 } 9816 return err 9817 } 9818 9819 func (p *PushActionsPushActionsResult) String() string { 9820 if p == nil { 9821 return "<nil>" 9822 } 9823 return fmt.Sprintf("PushActionsPushActionsResult(%+v)", *p) 9824 } 9825 9826 9827 type ApplyRequest interface { 9828 // Parameters: 9829 // - Receiver 9830 // - FirstReceiver 9831 // - Action 9832 // - ChainTesterId 9833 ApplyRequest(ctx context.Context, receiver *Uint64, firstReceiver *Uint64, action *Uint64, chainTesterId int32) (_r int32, _err error) 9834 // Parameters: 9835 // - ChainTesterId 9836 ApplyEnd(ctx context.Context, chainTesterId int32) (_r int32, _err error) 9837 } 9838 9839 type ApplyRequestClient struct { 9840 c thrift.TClient 9841 meta thrift.ResponseMeta 9842 } 9843 9844 func NewApplyRequestClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *ApplyRequestClient { 9845 return &ApplyRequestClient{ 9846 c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), 9847 } 9848 } 9849 9850 func NewApplyRequestClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *ApplyRequestClient { 9851 return &ApplyRequestClient{ 9852 c: thrift.NewTStandardClient(iprot, oprot), 9853 } 9854 } 9855 9856 func NewApplyRequestClient(c thrift.TClient) *ApplyRequestClient { 9857 return &ApplyRequestClient{ 9858 c: c, 9859 } 9860 } 9861 9862 func (p *ApplyRequestClient) Client_() thrift.TClient { 9863 return p.c 9864 } 9865 9866 func (p *ApplyRequestClient) LastResponseMeta_() thrift.ResponseMeta { 9867 return p.meta 9868 } 9869 9870 func (p *ApplyRequestClient) SetLastResponseMeta_(meta thrift.ResponseMeta) { 9871 p.meta = meta 9872 } 9873 9874 // Parameters: 9875 // - Receiver 9876 // - FirstReceiver 9877 // - Action 9878 // - ChainTesterId 9879 func (p *ApplyRequestClient) ApplyRequest(ctx context.Context, receiver *Uint64, firstReceiver *Uint64, action *Uint64, chainTesterId int32) (_r int32, _err error) { 9880 var _args157 ApplyRequestApplyRequestArgs 9881 _args157.Receiver = receiver 9882 _args157.FirstReceiver = firstReceiver 9883 _args157.Action = action 9884 _args157.ChainTesterId = chainTesterId 9885 var _result159 ApplyRequestApplyRequestResult 9886 var _meta158 thrift.ResponseMeta 9887 _meta158, _err = p.Client_().Call(ctx, "apply_request", &_args157, &_result159) 9888 p.SetLastResponseMeta_(_meta158) 9889 if _err != nil { 9890 return 9891 } 9892 return _result159.GetSuccess(), nil 9893 } 9894 9895 // Parameters: 9896 // - ChainTesterId 9897 func (p *ApplyRequestClient) ApplyEnd(ctx context.Context, chainTesterId int32) (_r int32, _err error) { 9898 var _args160 ApplyRequestApplyEndArgs 9899 _args160.ChainTesterId = chainTesterId 9900 var _result162 ApplyRequestApplyEndResult 9901 var _meta161 thrift.ResponseMeta 9902 _meta161, _err = p.Client_().Call(ctx, "apply_end", &_args160, &_result162) 9903 p.SetLastResponseMeta_(_meta161) 9904 if _err != nil { 9905 return 9906 } 9907 return _result162.GetSuccess(), nil 9908 } 9909 9910 type ApplyRequestProcessor struct { 9911 processorMap map[string]thrift.TProcessorFunction 9912 handler ApplyRequest 9913 } 9914 9915 func (p *ApplyRequestProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { 9916 p.processorMap[key] = processor 9917 } 9918 9919 func (p *ApplyRequestProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { 9920 processor, ok = p.processorMap[key] 9921 return processor, ok 9922 } 9923 9924 func (p *ApplyRequestProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { 9925 return p.processorMap 9926 } 9927 9928 func NewApplyRequestProcessor(handler ApplyRequest) *ApplyRequestProcessor { 9929 9930 self163 := &ApplyRequestProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} 9931 self163.processorMap["apply_request"] = &applyRequestProcessorApplyRequest{handler:handler} 9932 self163.processorMap["apply_end"] = &applyRequestProcessorApplyEnd{handler:handler} 9933 return self163 9934 } 9935 9936 func (p *ApplyRequestProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 9937 name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) 9938 if err2 != nil { return false, thrift.WrapTException(err2) } 9939 if processor, ok := p.GetProcessorFunction(name); ok { 9940 return processor.Process(ctx, seqId, iprot, oprot) 9941 } 9942 iprot.Skip(ctx, thrift.STRUCT) 9943 iprot.ReadMessageEnd(ctx) 9944 x164 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) 9945 oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) 9946 x164.Write(ctx, oprot) 9947 oprot.WriteMessageEnd(ctx) 9948 oprot.Flush(ctx) 9949 return false, x164 9950 9951 } 9952 9953 type applyRequestProcessorApplyRequest struct { 9954 handler ApplyRequest 9955 } 9956 9957 func (p *applyRequestProcessorApplyRequest) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 9958 args := ApplyRequestApplyRequestArgs{} 9959 var err2 error 9960 if err2 = args.Read(ctx, iprot); err2 != nil { 9961 iprot.ReadMessageEnd(ctx) 9962 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 9963 oprot.WriteMessageBegin(ctx, "apply_request", thrift.EXCEPTION, seqId) 9964 x.Write(ctx, oprot) 9965 oprot.WriteMessageEnd(ctx) 9966 oprot.Flush(ctx) 9967 return false, thrift.WrapTException(err2) 9968 } 9969 iprot.ReadMessageEnd(ctx) 9970 9971 tickerCancel := func() {} 9972 // Start a goroutine to do server side connectivity check. 9973 if thrift.ServerConnectivityCheckInterval > 0 { 9974 var cancel context.CancelFunc 9975 ctx, cancel = context.WithCancel(ctx) 9976 defer cancel() 9977 var tickerCtx context.Context 9978 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 9979 defer tickerCancel() 9980 go func(ctx context.Context, cancel context.CancelFunc) { 9981 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 9982 defer ticker.Stop() 9983 for { 9984 select { 9985 case <-ctx.Done(): 9986 return 9987 case <-ticker.C: 9988 if !iprot.Transport().IsOpen() { 9989 cancel() 9990 return 9991 } 9992 } 9993 } 9994 }(tickerCtx, cancel) 9995 } 9996 9997 result := ApplyRequestApplyRequestResult{} 9998 var retval int32 9999 if retval, err2 = p.handler.ApplyRequest(ctx, args.Receiver, args.FirstReceiver, args.Action, args.ChainTesterId); err2 != nil { 10000 tickerCancel() 10001 if err2 == thrift.ErrAbandonRequest { 10002 return false, thrift.WrapTException(err2) 10003 } 10004 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing apply_request: " + err2.Error()) 10005 oprot.WriteMessageBegin(ctx, "apply_request", thrift.EXCEPTION, seqId) 10006 x.Write(ctx, oprot) 10007 oprot.WriteMessageEnd(ctx) 10008 oprot.Flush(ctx) 10009 return true, thrift.WrapTException(err2) 10010 } else { 10011 result.Success = &retval 10012 } 10013 tickerCancel() 10014 if err2 = oprot.WriteMessageBegin(ctx, "apply_request", thrift.REPLY, seqId); err2 != nil { 10015 err = thrift.WrapTException(err2) 10016 } 10017 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 10018 err = thrift.WrapTException(err2) 10019 } 10020 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 10021 err = thrift.WrapTException(err2) 10022 } 10023 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 10024 err = thrift.WrapTException(err2) 10025 } 10026 if err != nil { 10027 return 10028 } 10029 return true, err 10030 } 10031 10032 type applyRequestProcessorApplyEnd struct { 10033 handler ApplyRequest 10034 } 10035 10036 func (p *applyRequestProcessorApplyEnd) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 10037 args := ApplyRequestApplyEndArgs{} 10038 var err2 error 10039 if err2 = args.Read(ctx, iprot); err2 != nil { 10040 iprot.ReadMessageEnd(ctx) 10041 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 10042 oprot.WriteMessageBegin(ctx, "apply_end", thrift.EXCEPTION, seqId) 10043 x.Write(ctx, oprot) 10044 oprot.WriteMessageEnd(ctx) 10045 oprot.Flush(ctx) 10046 return false, thrift.WrapTException(err2) 10047 } 10048 iprot.ReadMessageEnd(ctx) 10049 10050 tickerCancel := func() {} 10051 // Start a goroutine to do server side connectivity check. 10052 if thrift.ServerConnectivityCheckInterval > 0 { 10053 var cancel context.CancelFunc 10054 ctx, cancel = context.WithCancel(ctx) 10055 defer cancel() 10056 var tickerCtx context.Context 10057 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 10058 defer tickerCancel() 10059 go func(ctx context.Context, cancel context.CancelFunc) { 10060 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 10061 defer ticker.Stop() 10062 for { 10063 select { 10064 case <-ctx.Done(): 10065 return 10066 case <-ticker.C: 10067 if !iprot.Transport().IsOpen() { 10068 cancel() 10069 return 10070 } 10071 } 10072 } 10073 }(tickerCtx, cancel) 10074 } 10075 10076 result := ApplyRequestApplyEndResult{} 10077 var retval int32 10078 if retval, err2 = p.handler.ApplyEnd(ctx, args.ChainTesterId); err2 != nil { 10079 tickerCancel() 10080 if err2 == thrift.ErrAbandonRequest { 10081 return false, thrift.WrapTException(err2) 10082 } 10083 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing apply_end: " + err2.Error()) 10084 oprot.WriteMessageBegin(ctx, "apply_end", thrift.EXCEPTION, seqId) 10085 x.Write(ctx, oprot) 10086 oprot.WriteMessageEnd(ctx) 10087 oprot.Flush(ctx) 10088 return true, thrift.WrapTException(err2) 10089 } else { 10090 result.Success = &retval 10091 } 10092 tickerCancel() 10093 if err2 = oprot.WriteMessageBegin(ctx, "apply_end", thrift.REPLY, seqId); err2 != nil { 10094 err = thrift.WrapTException(err2) 10095 } 10096 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 10097 err = thrift.WrapTException(err2) 10098 } 10099 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 10100 err = thrift.WrapTException(err2) 10101 } 10102 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 10103 err = thrift.WrapTException(err2) 10104 } 10105 if err != nil { 10106 return 10107 } 10108 return true, err 10109 } 10110 10111 10112 // HELPER FUNCTIONS AND STRUCTURES 10113 10114 // Attributes: 10115 // - Receiver 10116 // - FirstReceiver 10117 // - Action 10118 // - ChainTesterId 10119 type ApplyRequestApplyRequestArgs struct { 10120 Receiver *Uint64 `thrift:"receiver,1" db:"receiver" json:"receiver"` 10121 FirstReceiver *Uint64 `thrift:"firstReceiver,2" db:"firstReceiver" json:"firstReceiver"` 10122 Action *Uint64 `thrift:"action,3" db:"action" json:"action"` 10123 ChainTesterId int32 `thrift:"chainTesterId,4" db:"chainTesterId" json:"chainTesterId"` 10124 } 10125 10126 func NewApplyRequestApplyRequestArgs() *ApplyRequestApplyRequestArgs { 10127 return &ApplyRequestApplyRequestArgs{} 10128 } 10129 10130 var ApplyRequestApplyRequestArgs_Receiver_DEFAULT *Uint64 10131 func (p *ApplyRequestApplyRequestArgs) GetReceiver() *Uint64 { 10132 if !p.IsSetReceiver() { 10133 return ApplyRequestApplyRequestArgs_Receiver_DEFAULT 10134 } 10135 return p.Receiver 10136 } 10137 var ApplyRequestApplyRequestArgs_FirstReceiver_DEFAULT *Uint64 10138 func (p *ApplyRequestApplyRequestArgs) GetFirstReceiver() *Uint64 { 10139 if !p.IsSetFirstReceiver() { 10140 return ApplyRequestApplyRequestArgs_FirstReceiver_DEFAULT 10141 } 10142 return p.FirstReceiver 10143 } 10144 var ApplyRequestApplyRequestArgs_Action_DEFAULT *Uint64 10145 func (p *ApplyRequestApplyRequestArgs) GetAction() *Uint64 { 10146 if !p.IsSetAction() { 10147 return ApplyRequestApplyRequestArgs_Action_DEFAULT 10148 } 10149 return p.Action 10150 } 10151 10152 func (p *ApplyRequestApplyRequestArgs) GetChainTesterId() int32 { 10153 return p.ChainTesterId 10154 } 10155 func (p *ApplyRequestApplyRequestArgs) IsSetReceiver() bool { 10156 return p.Receiver != nil 10157 } 10158 10159 func (p *ApplyRequestApplyRequestArgs) IsSetFirstReceiver() bool { 10160 return p.FirstReceiver != nil 10161 } 10162 10163 func (p *ApplyRequestApplyRequestArgs) IsSetAction() bool { 10164 return p.Action != nil 10165 } 10166 10167 func (p *ApplyRequestApplyRequestArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 10168 if _, err := iprot.ReadStructBegin(ctx); err != nil { 10169 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 10170 } 10171 10172 10173 for { 10174 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 10175 if err != nil { 10176 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 10177 } 10178 if fieldTypeId == thrift.STOP { break; } 10179 switch fieldId { 10180 case 1: 10181 if fieldTypeId == thrift.STRUCT { 10182 if err := p.ReadField1(ctx, iprot); err != nil { 10183 return err 10184 } 10185 } else { 10186 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 10187 return err 10188 } 10189 } 10190 case 2: 10191 if fieldTypeId == thrift.STRUCT { 10192 if err := p.ReadField2(ctx, iprot); err != nil { 10193 return err 10194 } 10195 } else { 10196 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 10197 return err 10198 } 10199 } 10200 case 3: 10201 if fieldTypeId == thrift.STRUCT { 10202 if err := p.ReadField3(ctx, iprot); err != nil { 10203 return err 10204 } 10205 } else { 10206 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 10207 return err 10208 } 10209 } 10210 case 4: 10211 if fieldTypeId == thrift.I32 { 10212 if err := p.ReadField4(ctx, iprot); err != nil { 10213 return err 10214 } 10215 } else { 10216 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 10217 return err 10218 } 10219 } 10220 default: 10221 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 10222 return err 10223 } 10224 } 10225 if err := iprot.ReadFieldEnd(ctx); err != nil { 10226 return err 10227 } 10228 } 10229 if err := iprot.ReadStructEnd(ctx); err != nil { 10230 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 10231 } 10232 return nil 10233 } 10234 10235 func (p *ApplyRequestApplyRequestArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 10236 p.Receiver = &Uint64{} 10237 if err := p.Receiver.Read(ctx, iprot); err != nil { 10238 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Receiver), err) 10239 } 10240 return nil 10241 } 10242 10243 func (p *ApplyRequestApplyRequestArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 10244 p.FirstReceiver = &Uint64{} 10245 if err := p.FirstReceiver.Read(ctx, iprot); err != nil { 10246 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FirstReceiver), err) 10247 } 10248 return nil 10249 } 10250 10251 func (p *ApplyRequestApplyRequestArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 10252 p.Action = &Uint64{} 10253 if err := p.Action.Read(ctx, iprot); err != nil { 10254 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Action), err) 10255 } 10256 return nil 10257 } 10258 10259 func (p *ApplyRequestApplyRequestArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 10260 if v, err := iprot.ReadI32(ctx); err != nil { 10261 return thrift.PrependError("error reading field 4: ", err) 10262 } else { 10263 p.ChainTesterId = v 10264 } 10265 return nil 10266 } 10267 10268 func (p *ApplyRequestApplyRequestArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 10269 if err := oprot.WriteStructBegin(ctx, "apply_request_args"); err != nil { 10270 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 10271 if p != nil { 10272 if err := p.writeField1(ctx, oprot); err != nil { return err } 10273 if err := p.writeField2(ctx, oprot); err != nil { return err } 10274 if err := p.writeField3(ctx, oprot); err != nil { return err } 10275 if err := p.writeField4(ctx, oprot); err != nil { return err } 10276 } 10277 if err := oprot.WriteFieldStop(ctx); err != nil { 10278 return thrift.PrependError("write field stop error: ", err) } 10279 if err := oprot.WriteStructEnd(ctx); err != nil { 10280 return thrift.PrependError("write struct stop error: ", err) } 10281 return nil 10282 } 10283 10284 func (p *ApplyRequestApplyRequestArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 10285 if err := oprot.WriteFieldBegin(ctx, "receiver", thrift.STRUCT, 1); err != nil { 10286 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:receiver: ", p), err) } 10287 if err := p.Receiver.Write(ctx, oprot); err != nil { 10288 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Receiver), err) 10289 } 10290 if err := oprot.WriteFieldEnd(ctx); err != nil { 10291 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:receiver: ", p), err) } 10292 return err 10293 } 10294 10295 func (p *ApplyRequestApplyRequestArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 10296 if err := oprot.WriteFieldBegin(ctx, "firstReceiver", thrift.STRUCT, 2); err != nil { 10297 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:firstReceiver: ", p), err) } 10298 if err := p.FirstReceiver.Write(ctx, oprot); err != nil { 10299 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FirstReceiver), err) 10300 } 10301 if err := oprot.WriteFieldEnd(ctx); err != nil { 10302 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:firstReceiver: ", p), err) } 10303 return err 10304 } 10305 10306 func (p *ApplyRequestApplyRequestArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 10307 if err := oprot.WriteFieldBegin(ctx, "action", thrift.STRUCT, 3); err != nil { 10308 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:action: ", p), err) } 10309 if err := p.Action.Write(ctx, oprot); err != nil { 10310 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Action), err) 10311 } 10312 if err := oprot.WriteFieldEnd(ctx); err != nil { 10313 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:action: ", p), err) } 10314 return err 10315 } 10316 10317 func (p *ApplyRequestApplyRequestArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 10318 if err := oprot.WriteFieldBegin(ctx, "chainTesterId", thrift.I32, 4); err != nil { 10319 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:chainTesterId: ", p), err) } 10320 if err := oprot.WriteI32(ctx, int32(p.ChainTesterId)); err != nil { 10321 return thrift.PrependError(fmt.Sprintf("%T.chainTesterId (4) field write error: ", p), err) } 10322 if err := oprot.WriteFieldEnd(ctx); err != nil { 10323 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:chainTesterId: ", p), err) } 10324 return err 10325 } 10326 10327 func (p *ApplyRequestApplyRequestArgs) String() string { 10328 if p == nil { 10329 return "<nil>" 10330 } 10331 return fmt.Sprintf("ApplyRequestApplyRequestArgs(%+v)", *p) 10332 } 10333 10334 // Attributes: 10335 // - Success 10336 type ApplyRequestApplyRequestResult struct { 10337 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 10338 } 10339 10340 func NewApplyRequestApplyRequestResult() *ApplyRequestApplyRequestResult { 10341 return &ApplyRequestApplyRequestResult{} 10342 } 10343 10344 var ApplyRequestApplyRequestResult_Success_DEFAULT int32 10345 func (p *ApplyRequestApplyRequestResult) GetSuccess() int32 { 10346 if !p.IsSetSuccess() { 10347 return ApplyRequestApplyRequestResult_Success_DEFAULT 10348 } 10349 return *p.Success 10350 } 10351 func (p *ApplyRequestApplyRequestResult) IsSetSuccess() bool { 10352 return p.Success != nil 10353 } 10354 10355 func (p *ApplyRequestApplyRequestResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 10356 if _, err := iprot.ReadStructBegin(ctx); err != nil { 10357 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 10358 } 10359 10360 10361 for { 10362 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 10363 if err != nil { 10364 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 10365 } 10366 if fieldTypeId == thrift.STOP { break; } 10367 switch fieldId { 10368 case 0: 10369 if fieldTypeId == thrift.I32 { 10370 if err := p.ReadField0(ctx, iprot); err != nil { 10371 return err 10372 } 10373 } else { 10374 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 10375 return err 10376 } 10377 } 10378 default: 10379 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 10380 return err 10381 } 10382 } 10383 if err := iprot.ReadFieldEnd(ctx); err != nil { 10384 return err 10385 } 10386 } 10387 if err := iprot.ReadStructEnd(ctx); err != nil { 10388 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 10389 } 10390 return nil 10391 } 10392 10393 func (p *ApplyRequestApplyRequestResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 10394 if v, err := iprot.ReadI32(ctx); err != nil { 10395 return thrift.PrependError("error reading field 0: ", err) 10396 } else { 10397 p.Success = &v 10398 } 10399 return nil 10400 } 10401 10402 func (p *ApplyRequestApplyRequestResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 10403 if err := oprot.WriteStructBegin(ctx, "apply_request_result"); err != nil { 10404 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 10405 if p != nil { 10406 if err := p.writeField0(ctx, oprot); err != nil { return err } 10407 } 10408 if err := oprot.WriteFieldStop(ctx); err != nil { 10409 return thrift.PrependError("write field stop error: ", err) } 10410 if err := oprot.WriteStructEnd(ctx); err != nil { 10411 return thrift.PrependError("write struct stop error: ", err) } 10412 return nil 10413 } 10414 10415 func (p *ApplyRequestApplyRequestResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 10416 if p.IsSetSuccess() { 10417 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 10418 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 10419 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 10420 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 10421 if err := oprot.WriteFieldEnd(ctx); err != nil { 10422 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 10423 } 10424 return err 10425 } 10426 10427 func (p *ApplyRequestApplyRequestResult) String() string { 10428 if p == nil { 10429 return "<nil>" 10430 } 10431 return fmt.Sprintf("ApplyRequestApplyRequestResult(%+v)", *p) 10432 } 10433 10434 // Attributes: 10435 // - ChainTesterId 10436 type ApplyRequestApplyEndArgs struct { 10437 ChainTesterId int32 `thrift:"chainTesterId,1" db:"chainTesterId" json:"chainTesterId"` 10438 } 10439 10440 func NewApplyRequestApplyEndArgs() *ApplyRequestApplyEndArgs { 10441 return &ApplyRequestApplyEndArgs{} 10442 } 10443 10444 10445 func (p *ApplyRequestApplyEndArgs) GetChainTesterId() int32 { 10446 return p.ChainTesterId 10447 } 10448 func (p *ApplyRequestApplyEndArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 10449 if _, err := iprot.ReadStructBegin(ctx); err != nil { 10450 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 10451 } 10452 10453 10454 for { 10455 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 10456 if err != nil { 10457 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 10458 } 10459 if fieldTypeId == thrift.STOP { break; } 10460 switch fieldId { 10461 case 1: 10462 if fieldTypeId == thrift.I32 { 10463 if err := p.ReadField1(ctx, iprot); err != nil { 10464 return err 10465 } 10466 } else { 10467 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 10468 return err 10469 } 10470 } 10471 default: 10472 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 10473 return err 10474 } 10475 } 10476 if err := iprot.ReadFieldEnd(ctx); err != nil { 10477 return err 10478 } 10479 } 10480 if err := iprot.ReadStructEnd(ctx); err != nil { 10481 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 10482 } 10483 return nil 10484 } 10485 10486 func (p *ApplyRequestApplyEndArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 10487 if v, err := iprot.ReadI32(ctx); err != nil { 10488 return thrift.PrependError("error reading field 1: ", err) 10489 } else { 10490 p.ChainTesterId = v 10491 } 10492 return nil 10493 } 10494 10495 func (p *ApplyRequestApplyEndArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 10496 if err := oprot.WriteStructBegin(ctx, "apply_end_args"); err != nil { 10497 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 10498 if p != nil { 10499 if err := p.writeField1(ctx, oprot); err != nil { return err } 10500 } 10501 if err := oprot.WriteFieldStop(ctx); err != nil { 10502 return thrift.PrependError("write field stop error: ", err) } 10503 if err := oprot.WriteStructEnd(ctx); err != nil { 10504 return thrift.PrependError("write struct stop error: ", err) } 10505 return nil 10506 } 10507 10508 func (p *ApplyRequestApplyEndArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 10509 if err := oprot.WriteFieldBegin(ctx, "chainTesterId", thrift.I32, 1); err != nil { 10510 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:chainTesterId: ", p), err) } 10511 if err := oprot.WriteI32(ctx, int32(p.ChainTesterId)); err != nil { 10512 return thrift.PrependError(fmt.Sprintf("%T.chainTesterId (1) field write error: ", p), err) } 10513 if err := oprot.WriteFieldEnd(ctx); err != nil { 10514 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:chainTesterId: ", p), err) } 10515 return err 10516 } 10517 10518 func (p *ApplyRequestApplyEndArgs) String() string { 10519 if p == nil { 10520 return "<nil>" 10521 } 10522 return fmt.Sprintf("ApplyRequestApplyEndArgs(%+v)", *p) 10523 } 10524 10525 // Attributes: 10526 // - Success 10527 type ApplyRequestApplyEndResult struct { 10528 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 10529 } 10530 10531 func NewApplyRequestApplyEndResult() *ApplyRequestApplyEndResult { 10532 return &ApplyRequestApplyEndResult{} 10533 } 10534 10535 var ApplyRequestApplyEndResult_Success_DEFAULT int32 10536 func (p *ApplyRequestApplyEndResult) GetSuccess() int32 { 10537 if !p.IsSetSuccess() { 10538 return ApplyRequestApplyEndResult_Success_DEFAULT 10539 } 10540 return *p.Success 10541 } 10542 func (p *ApplyRequestApplyEndResult) IsSetSuccess() bool { 10543 return p.Success != nil 10544 } 10545 10546 func (p *ApplyRequestApplyEndResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 10547 if _, err := iprot.ReadStructBegin(ctx); err != nil { 10548 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 10549 } 10550 10551 10552 for { 10553 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 10554 if err != nil { 10555 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 10556 } 10557 if fieldTypeId == thrift.STOP { break; } 10558 switch fieldId { 10559 case 0: 10560 if fieldTypeId == thrift.I32 { 10561 if err := p.ReadField0(ctx, iprot); err != nil { 10562 return err 10563 } 10564 } else { 10565 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 10566 return err 10567 } 10568 } 10569 default: 10570 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 10571 return err 10572 } 10573 } 10574 if err := iprot.ReadFieldEnd(ctx); err != nil { 10575 return err 10576 } 10577 } 10578 if err := iprot.ReadStructEnd(ctx); err != nil { 10579 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 10580 } 10581 return nil 10582 } 10583 10584 func (p *ApplyRequestApplyEndResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 10585 if v, err := iprot.ReadI32(ctx); err != nil { 10586 return thrift.PrependError("error reading field 0: ", err) 10587 } else { 10588 p.Success = &v 10589 } 10590 return nil 10591 } 10592 10593 func (p *ApplyRequestApplyEndResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 10594 if err := oprot.WriteStructBegin(ctx, "apply_end_result"); err != nil { 10595 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 10596 if p != nil { 10597 if err := p.writeField0(ctx, oprot); err != nil { return err } 10598 } 10599 if err := oprot.WriteFieldStop(ctx); err != nil { 10600 return thrift.PrependError("write field stop error: ", err) } 10601 if err := oprot.WriteStructEnd(ctx); err != nil { 10602 return thrift.PrependError("write struct stop error: ", err) } 10603 return nil 10604 } 10605 10606 func (p *ApplyRequestApplyEndResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 10607 if p.IsSetSuccess() { 10608 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 10609 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 10610 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 10611 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 10612 if err := oprot.WriteFieldEnd(ctx); err != nil { 10613 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 10614 } 10615 return err 10616 } 10617 10618 func (p *ApplyRequestApplyEndResult) String() string { 10619 if p == nil { 10620 return "<nil>" 10621 } 10622 return fmt.Sprintf("ApplyRequestApplyEndResult(%+v)", *p) 10623 } 10624 10625 10626 type Apply interface { 10627 EndApply(ctx context.Context) (_r int32, _err error) 10628 GetActiveProducers(ctx context.Context) (_r []byte, _err error) 10629 // Parameters: 10630 // - Account 10631 GetResourceLimits(ctx context.Context, account *Uint64) (_r *GetResourceLimitsReturn, _err error) 10632 // Parameters: 10633 // - Account 10634 // - RAMBytes 10635 // - NetWeight 10636 // - CPUWeight 10637 SetResourceLimits(ctx context.Context, account *Uint64, ram_bytes int64, net_weight int64, cpu_weight int64) (_err error) 10638 // Parameters: 10639 // - ProducerData 10640 SetProposedProducers(ctx context.Context, producer_data []byte) (_r int64, _err error) 10641 // Parameters: 10642 // - ProducerDataFormat 10643 // - ProducerData 10644 SetProposedProducersEx(ctx context.Context, producer_data_format *Uint64, producer_data []byte) (_r int64, _err error) 10645 // Parameters: 10646 // - Account 10647 IsPrivileged(ctx context.Context, account *Uint64) (_r bool, _err error) 10648 // Parameters: 10649 // - Account 10650 // - IsPriv 10651 SetPrivileged(ctx context.Context, account *Uint64, is_priv bool) (_err error) 10652 // Parameters: 10653 // - Data 10654 SetBlockchainParametersPacked(ctx context.Context, data []byte) (_err error) 10655 GetBlockchainParametersPacked(ctx context.Context) (_r []byte, _err error) 10656 // Parameters: 10657 // - FeatureDigest 10658 PreactivateFeature(ctx context.Context, feature_digest []byte) (_err error) 10659 // Parameters: 10660 // - TrxData 10661 // - PubkeysData 10662 // - PermsData 10663 CheckTransactionAuthorization(ctx context.Context, trx_data []byte, pubkeys_data []byte, perms_data []byte) (_r int32, _err error) 10664 // Parameters: 10665 // - Account 10666 // - Permission 10667 // - PubkeysData 10668 // - PermsData 10669 // - DelayUs 10670 CheckPermissionAuthorization(ctx context.Context, account *Uint64, permission *Uint64, pubkeys_data []byte, perms_data []byte, delay_us *Uint64) (_r int32, _err error) 10671 // Parameters: 10672 // - Account 10673 // - Permission 10674 GetPermissionLastUsed(ctx context.Context, account *Uint64, permission *Uint64) (_r int64, _err error) 10675 // Parameters: 10676 // - Account 10677 GetAccountCreationTime(ctx context.Context, account *Uint64) (_r int64, _err error) 10678 // Parameters: 10679 // - Cstr 10680 Prints(ctx context.Context, cstr string) (_err error) 10681 // Parameters: 10682 // - Cstr 10683 PrintsL(ctx context.Context, cstr []byte) (_err error) 10684 // Parameters: 10685 // - N 10686 Printi(ctx context.Context, n int64) (_err error) 10687 // Parameters: 10688 // - N 10689 Printui(ctx context.Context, n *Uint64) (_err error) 10690 // Parameters: 10691 // - Value 10692 Printi128(ctx context.Context, value []byte) (_err error) 10693 // Parameters: 10694 // - Value 10695 Printui128(ctx context.Context, value []byte) (_err error) 10696 // Parameters: 10697 // - Value 10698 Printsf(ctx context.Context, value []byte) (_err error) 10699 // Parameters: 10700 // - Value 10701 Printdf(ctx context.Context, value []byte) (_err error) 10702 // Parameters: 10703 // - Value 10704 Printqf(ctx context.Context, value []byte) (_err error) 10705 // Parameters: 10706 // - Name 10707 Printn(ctx context.Context, name *Uint64) (_err error) 10708 // Parameters: 10709 // - Data 10710 Printhex(ctx context.Context, data []byte) (_err error) 10711 ActionDataSize(ctx context.Context) (_r int32, _err error) 10712 ReadActionData(ctx context.Context) (_r []byte, _err error) 10713 // Parameters: 10714 // - Name 10715 RequireRecipient(ctx context.Context, name *Uint64) (_err error) 10716 // Parameters: 10717 // - Name 10718 RequireAuth(ctx context.Context, name *Uint64) (_err error) 10719 // Parameters: 10720 // - Name 10721 HasAuth(ctx context.Context, name *Uint64) (_r bool, _err error) 10722 // Parameters: 10723 // - Name 10724 // - Permission 10725 RequireAuth2(ctx context.Context, name *Uint64, permission *Uint64) (_err error) 10726 // Parameters: 10727 // - Name 10728 IsAccount(ctx context.Context, name *Uint64) (_r bool, _err error) 10729 // Parameters: 10730 // - SerializedAction 10731 SendInline(ctx context.Context, serialized_action []byte) (_err error) 10732 // Parameters: 10733 // - SerializedData 10734 SendContextFreeInline(ctx context.Context, serialized_data []byte) (_err error) 10735 PublicationTime(ctx context.Context) (_r *Uint64, _err error) 10736 CurrentReceiver(ctx context.Context) (_r *Uint64, _err error) 10737 // Parameters: 10738 // - Test 10739 // - Msg 10740 EosioAssert(ctx context.Context, test bool, msg []byte) (_err error) 10741 // Parameters: 10742 // - Test 10743 // - Msg 10744 EosioAssertMessage(ctx context.Context, test bool, msg []byte) (_err error) 10745 // Parameters: 10746 // - Test 10747 // - Code 10748 EosioAssertCode(ctx context.Context, test bool, code *Uint64) (_err error) 10749 // Parameters: 10750 // - Code 10751 EosioExit(ctx context.Context, code int32) (_err error) 10752 CurrentTime(ctx context.Context) (_r *Uint64, _err error) 10753 // Parameters: 10754 // - FeatureDigest 10755 IsFeatureActivated(ctx context.Context, feature_digest []byte) (_r bool, _err error) 10756 GetSender(ctx context.Context) (_r *Uint64, _err error) 10757 // Parameters: 10758 // - Data 10759 // - Hash 10760 AssertSha256(ctx context.Context, data []byte, hash []byte) (_err error) 10761 // Parameters: 10762 // - Data 10763 // - Hash 10764 AssertSha1(ctx context.Context, data []byte, hash []byte) (_err error) 10765 // Parameters: 10766 // - Data 10767 // - Hash 10768 AssertSha512(ctx context.Context, data []byte, hash []byte) (_err error) 10769 // Parameters: 10770 // - Data 10771 // - Hash 10772 AssertRipemd160(ctx context.Context, data []byte, hash []byte) (_err error) 10773 // Parameters: 10774 // - Data 10775 Sha256(ctx context.Context, data []byte) (_r []byte, _err error) 10776 // Parameters: 10777 // - Data 10778 Sha1(ctx context.Context, data []byte) (_r []byte, _err error) 10779 // Parameters: 10780 // - Data 10781 Sha512(ctx context.Context, data []byte) (_r []byte, _err error) 10782 // Parameters: 10783 // - Data 10784 Ripemd160(ctx context.Context, data []byte) (_r []byte, _err error) 10785 // Parameters: 10786 // - Digest 10787 // - Sig 10788 RecoverKey(ctx context.Context, digest []byte, sig []byte) (_r []byte, _err error) 10789 // Parameters: 10790 // - Digest 10791 // - Sig 10792 // - Pub 10793 AssertRecoverKey(ctx context.Context, digest []byte, sig []byte, pub []byte) (_err error) 10794 // Parameters: 10795 // - SenderID 10796 // - Payer 10797 // - SerializedTransaction 10798 // - ReplaceExisting 10799 SendDeferred(ctx context.Context, sender_id []byte, payer *Uint64, serialized_transaction []byte, replace_existing int32) (_err error) 10800 // Parameters: 10801 // - SenderID 10802 CancelDeferred(ctx context.Context, sender_id []byte) (_r int32, _err error) 10803 ReadTransaction(ctx context.Context) (_r []byte, _err error) 10804 TransactionSize(ctx context.Context) (_r int32, _err error) 10805 TaposBlockNum(ctx context.Context) (_r int32, _err error) 10806 TaposBlockPrefix(ctx context.Context) (_r int32, _err error) 10807 Expiration(ctx context.Context) (_r int64, _err error) 10808 // Parameters: 10809 // - _type 10810 // - Index 10811 GetAction(ctx context.Context, _type int32, index int32) (_r []byte, _err error) 10812 // Parameters: 10813 // - Index 10814 GetContextFreeData(ctx context.Context, index int32) (_r []byte, _err error) 10815 // Parameters: 10816 // - Scope 10817 // - Table 10818 // - Payer 10819 // - ID 10820 // - Data 10821 DbStoreI64(ctx context.Context, scope *Uint64, table *Uint64, payer *Uint64, id *Uint64, data []byte) (_r int32, _err error) 10822 // Parameters: 10823 // - Iterator 10824 // - Payer 10825 // - Data 10826 DbUpdateI64(ctx context.Context, iterator int32, payer *Uint64, data []byte) (_err error) 10827 // Parameters: 10828 // - Iterator 10829 DbRemoveI64(ctx context.Context, iterator int32) (_err error) 10830 // Parameters: 10831 // - Iterator 10832 DbGetI64(ctx context.Context, iterator int32) (_r []byte, _err error) 10833 // Parameters: 10834 // - Iterator 10835 DbNextI64(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) 10836 // Parameters: 10837 // - Iterator 10838 DbPreviousI64(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) 10839 // Parameters: 10840 // - Code 10841 // - Scope 10842 // - Table 10843 // - ID 10844 DbFindI64(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, id *Uint64) (_r int32, _err error) 10845 // Parameters: 10846 // - Code 10847 // - Scope 10848 // - Table 10849 // - ID 10850 DbLowerboundI64(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, id *Uint64) (_r int32, _err error) 10851 // Parameters: 10852 // - Code 10853 // - Scope 10854 // - Table 10855 // - ID 10856 DbUpperboundI64(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, id *Uint64) (_r int32, _err error) 10857 // Parameters: 10858 // - Code 10859 // - Scope 10860 // - Table 10861 DbEndI64(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64) (_r int32, _err error) 10862 // Parameters: 10863 // - Scope 10864 // - Table 10865 // - Payer 10866 // - ID 10867 // - Secondary 10868 DbIdx64Store(ctx context.Context, scope *Uint64, table *Uint64, payer *Uint64, id *Uint64, secondary *Uint64) (_r int32, _err error) 10869 // Parameters: 10870 // - Iterator 10871 // - Payer 10872 // - Secondary 10873 DbIdx64Update(ctx context.Context, iterator int32, payer *Uint64, secondary *Uint64) (_err error) 10874 // Parameters: 10875 // - Iterator 10876 DbIdx64Remove(ctx context.Context, iterator int32) (_err error) 10877 // Parameters: 10878 // - Iterator 10879 DbIdx64Next(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) 10880 // Parameters: 10881 // - Iteratory 10882 DbIdx64Previous(ctx context.Context, iteratory int32) (_r *NextPreviousReturn, _err error) 10883 // Parameters: 10884 // - Code 10885 // - Scope 10886 // - Table 10887 // - Primary 10888 DbIdx64FindPrimary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, primary *Uint64) (_r *FindPrimaryReturn, _err error) 10889 // Parameters: 10890 // - Code 10891 // - Scope 10892 // - Table 10893 // - Secondary 10894 DbIdx64FindSecondary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary *Uint64) (_r *FindSecondaryReturn, _err error) 10895 // Parameters: 10896 // - Code 10897 // - Scope 10898 // - Table 10899 // - Secondary 10900 // - Primary 10901 DbIdx64Lowerbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary *Uint64, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) 10902 // Parameters: 10903 // - Code 10904 // - Scope 10905 // - Table 10906 // - Secondary 10907 // - Primary 10908 DbIdx64Upperbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary *Uint64, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) 10909 // Parameters: 10910 // - Code 10911 // - Scope 10912 // - Table 10913 DbIdx64End(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64) (_r int32, _err error) 10914 // Parameters: 10915 // - Scope 10916 // - Table 10917 // - Payer 10918 // - ID 10919 // - Secondary 10920 DbIdx128Store(ctx context.Context, scope *Uint64, table *Uint64, payer *Uint64, id *Uint64, secondary []byte) (_r int32, _err error) 10921 // Parameters: 10922 // - Iterator 10923 // - Payer 10924 // - Secondary 10925 DbIdx128Update(ctx context.Context, iterator int32, payer *Uint64, secondary []byte) (_err error) 10926 // Parameters: 10927 // - Iterator 10928 DbIdx128Remove(ctx context.Context, iterator int32) (_err error) 10929 // Parameters: 10930 // - Iterator 10931 DbIdx128Next(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) 10932 // Parameters: 10933 // - Iterator 10934 DbIdx128Previous(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) 10935 // Parameters: 10936 // - Code 10937 // - Scope 10938 // - Table 10939 // - Primary 10940 DbIdx128FindPrimary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, primary *Uint64) (_r *FindPrimaryReturn, _err error) 10941 // Parameters: 10942 // - Code 10943 // - Scope 10944 // - Table 10945 // - Secondary 10946 DbIdx128FindSecondary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte) (_r *FindSecondaryReturn, _err error) 10947 // Parameters: 10948 // - Code 10949 // - Scope 10950 // - Table 10951 // - Secondary 10952 // - Primary 10953 DbIdx128Lowerbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) 10954 // Parameters: 10955 // - Code 10956 // - Scope 10957 // - Table 10958 // - Secondary 10959 // - Primary 10960 DbIdx128Upperbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) 10961 // Parameters: 10962 // - Code 10963 // - Scope 10964 // - Table 10965 DbIdx128End(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64) (_r int32, _err error) 10966 // Parameters: 10967 // - Scope 10968 // - Table 10969 // - Payer 10970 // - ID 10971 // - Data 10972 DbIdx256Store(ctx context.Context, scope *Uint64, table *Uint64, payer *Uint64, id *Uint64, data []byte) (_r int32, _err error) 10973 // Parameters: 10974 // - Iterator 10975 // - Payer 10976 // - Data 10977 DbIdx256Update(ctx context.Context, iterator int32, payer *Uint64, data []byte) (_err error) 10978 // Parameters: 10979 // - Iterator 10980 DbIdx256Remove(ctx context.Context, iterator int32) (_err error) 10981 // Parameters: 10982 // - Iterator 10983 DbIdx256Next(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) 10984 // Parameters: 10985 // - Iterator 10986 DbIdx256Previous(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) 10987 // Parameters: 10988 // - Code 10989 // - Scope 10990 // - Table 10991 // - Primary 10992 DbIdx256FindPrimary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, primary *Uint64) (_r *FindPrimaryReturn, _err error) 10993 // Parameters: 10994 // - Code 10995 // - Scope 10996 // - Table 10997 // - Data 10998 DbIdx256FindSecondary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, data []byte) (_r *FindSecondaryReturn, _err error) 10999 // Parameters: 11000 // - Code 11001 // - Scope 11002 // - Table 11003 // - Data 11004 // - Primary 11005 DbIdx256Lowerbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, data []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) 11006 // Parameters: 11007 // - Code 11008 // - Scope 11009 // - Table 11010 // - Data 11011 // - Primary 11012 DbIdx256Upperbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, data []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) 11013 // Parameters: 11014 // - Code 11015 // - Scope 11016 // - Table 11017 DbIdx256End(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64) (_r int32, _err error) 11018 // Parameters: 11019 // - Scope 11020 // - Table 11021 // - Payer 11022 // - ID 11023 // - Secondary 11024 DbIdxDoubleStore(ctx context.Context, scope *Uint64, table *Uint64, payer *Uint64, id *Uint64, secondary []byte) (_r int32, _err error) 11025 // Parameters: 11026 // - Iterator 11027 // - Payer 11028 // - Secondary 11029 DbIdxDoubleUpdate(ctx context.Context, iterator int32, payer *Uint64, secondary []byte) (_err error) 11030 // Parameters: 11031 // - Iterator 11032 DbIdxDoubleRemove(ctx context.Context, iterator int32) (_err error) 11033 // Parameters: 11034 // - Iterator 11035 DbIdxDoubleNext(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) 11036 // Parameters: 11037 // - Iterator 11038 DbIdxDoublePrevious(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) 11039 // Parameters: 11040 // - Code 11041 // - Scope 11042 // - Table 11043 // - Primary 11044 DbIdxDoubleFindPrimary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, primary *Uint64) (_r *FindPrimaryReturn, _err error) 11045 // Parameters: 11046 // - Code 11047 // - Scope 11048 // - Table 11049 // - Secondary 11050 DbIdxDoubleFindSecondary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte) (_r *FindSecondaryReturn, _err error) 11051 // Parameters: 11052 // - Code 11053 // - Scope 11054 // - Table 11055 // - Secondary 11056 // - Primary 11057 DbIdxDoubleLowerbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) 11058 // Parameters: 11059 // - Code 11060 // - Scope 11061 // - Table 11062 // - Secondary 11063 // - Primary 11064 DbIdxDoubleUpperbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) 11065 // Parameters: 11066 // - Code 11067 // - Scope 11068 // - Table 11069 DbIdxDoubleEnd(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64) (_r int32, _err error) 11070 // Parameters: 11071 // - Scope 11072 // - Table 11073 // - Payer 11074 // - ID 11075 // - Secondary 11076 DbIdxLongDoubleStore(ctx context.Context, scope *Uint64, table *Uint64, payer *Uint64, id *Uint64, secondary []byte) (_r int32, _err error) 11077 // Parameters: 11078 // - Iterator 11079 // - Payer 11080 // - Secondary 11081 DbIdxLongDoubleUpdate(ctx context.Context, iterator int32, payer *Uint64, secondary []byte) (_err error) 11082 // Parameters: 11083 // - Iterator 11084 DbIdxLongDoubleRemove(ctx context.Context, iterator int32) (_err error) 11085 // Parameters: 11086 // - Iterator 11087 DbIdxLongDoubleNext(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) 11088 // Parameters: 11089 // - Iterator 11090 DbIdxLongDoublePrevious(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) 11091 // Parameters: 11092 // - Code 11093 // - Scope 11094 // - Table 11095 // - Primary 11096 DbIdxLongDoubleFindPrimary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, primary *Uint64) (_r *FindPrimaryReturn, _err error) 11097 // Parameters: 11098 // - Code 11099 // - Scope 11100 // - Table 11101 // - Secondary 11102 DbIdxLongDoubleFindSecondary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte) (_r *FindSecondaryReturn, _err error) 11103 // Parameters: 11104 // - Code 11105 // - Scope 11106 // - Table 11107 // - Secondary 11108 // - Primary 11109 DbIdxLongDoubleLowerbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) 11110 // Parameters: 11111 // - Code 11112 // - Scope 11113 // - Table 11114 // - Secondary 11115 // - Primary 11116 DbIdxLongDoubleUpperbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) 11117 // Parameters: 11118 // - Code 11119 // - Scope 11120 // - Table 11121 DbIdxLongDoubleEnd(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64) (_r int32, _err error) 11122 // Parameters: 11123 // - Data 11124 SetActionReturnValue(ctx context.Context, data []byte) (_err error) 11125 // Parameters: 11126 // - Account 11127 // - StructVersion 11128 GetCodeHash(ctx context.Context, account *Uint64, struct_version int64) (_r []byte, _err error) 11129 GetBlockNum(ctx context.Context) (_r int64, _err error) 11130 // Parameters: 11131 // - Data 11132 // - Keccak 11133 Sha3(ctx context.Context, data []byte, keccak int32) (_r []byte, _err error) 11134 // Parameters: 11135 // - Rounds 11136 // - State 11137 // - Msg 11138 // - T0Offset 11139 // - T1Offset 11140 // - Final 11141 Blake2F(ctx context.Context, rounds int64, state []byte, msg []byte, t0_offset []byte, t1_offset []byte, final int32) (_r []byte, _err error) 11142 // Parameters: 11143 // - Sig 11144 // - Dig 11145 K1Recover(ctx context.Context, sig []byte, dig []byte) (_r []byte, _err error) 11146 // Parameters: 11147 // - Op1 11148 // - Op2 11149 AltBn128Add(ctx context.Context, op1 []byte, op2 []byte) (_r []byte, _err error) 11150 // Parameters: 11151 // - G1 11152 // - Scalar 11153 AltBn128Mul(ctx context.Context, g1 []byte, scalar []byte) (_r []byte, _err error) 11154 // Parameters: 11155 // - Pairs 11156 AltBn128Pair(ctx context.Context, pairs []byte) (_r int32, _err error) 11157 // Parameters: 11158 // - Base 11159 // - Exp 11160 // - Mod 11161 ModExp(ctx context.Context, base []byte, exp []byte, mod []byte) (_r []byte, _err error) 11162 } 11163 11164 type ApplyClient struct { 11165 c thrift.TClient 11166 meta thrift.ResponseMeta 11167 } 11168 11169 func NewApplyClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *ApplyClient { 11170 return &ApplyClient{ 11171 c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), 11172 } 11173 } 11174 11175 func NewApplyClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *ApplyClient { 11176 return &ApplyClient{ 11177 c: thrift.NewTStandardClient(iprot, oprot), 11178 } 11179 } 11180 11181 func NewApplyClient(c thrift.TClient) *ApplyClient { 11182 return &ApplyClient{ 11183 c: c, 11184 } 11185 } 11186 11187 func (p *ApplyClient) Client_() thrift.TClient { 11188 return p.c 11189 } 11190 11191 func (p *ApplyClient) LastResponseMeta_() thrift.ResponseMeta { 11192 return p.meta 11193 } 11194 11195 func (p *ApplyClient) SetLastResponseMeta_(meta thrift.ResponseMeta) { 11196 p.meta = meta 11197 } 11198 11199 func (p *ApplyClient) EndApply(ctx context.Context) (_r int32, _err error) { 11200 var _args185 ApplyEndApplyArgs 11201 var _result187 ApplyEndApplyResult 11202 var _meta186 thrift.ResponseMeta 11203 _meta186, _err = p.Client_().Call(ctx, "end_apply", &_args185, &_result187) 11204 p.SetLastResponseMeta_(_meta186) 11205 if _err != nil { 11206 return 11207 } 11208 return _result187.GetSuccess(), nil 11209 } 11210 11211 func (p *ApplyClient) GetActiveProducers(ctx context.Context) (_r []byte, _err error) { 11212 var _args188 ApplyGetActiveProducersArgs 11213 var _result190 ApplyGetActiveProducersResult 11214 var _meta189 thrift.ResponseMeta 11215 _meta189, _err = p.Client_().Call(ctx, "get_active_producers", &_args188, &_result190) 11216 p.SetLastResponseMeta_(_meta189) 11217 if _err != nil { 11218 return 11219 } 11220 return _result190.GetSuccess(), nil 11221 } 11222 11223 // Parameters: 11224 // - Account 11225 func (p *ApplyClient) GetResourceLimits(ctx context.Context, account *Uint64) (_r *GetResourceLimitsReturn, _err error) { 11226 var _args191 ApplyGetResourceLimitsArgs 11227 _args191.Account = account 11228 var _result193 ApplyGetResourceLimitsResult 11229 var _meta192 thrift.ResponseMeta 11230 _meta192, _err = p.Client_().Call(ctx, "get_resource_limits", &_args191, &_result193) 11231 p.SetLastResponseMeta_(_meta192) 11232 if _err != nil { 11233 return 11234 } 11235 if _ret194 := _result193.GetSuccess(); _ret194 != nil { 11236 return _ret194, nil 11237 } 11238 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "get_resource_limits failed: unknown result") 11239 } 11240 11241 // Parameters: 11242 // - Account 11243 // - RAMBytes 11244 // - NetWeight 11245 // - CPUWeight 11246 func (p *ApplyClient) SetResourceLimits(ctx context.Context, account *Uint64, ram_bytes int64, net_weight int64, cpu_weight int64) (_err error) { 11247 var _args195 ApplySetResourceLimitsArgs 11248 _args195.Account = account 11249 _args195.RAMBytes = ram_bytes 11250 _args195.NetWeight = net_weight 11251 _args195.CPUWeight = cpu_weight 11252 var _result197 ApplySetResourceLimitsResult 11253 var _meta196 thrift.ResponseMeta 11254 _meta196, _err = p.Client_().Call(ctx, "set_resource_limits", &_args195, &_result197) 11255 p.SetLastResponseMeta_(_meta196) 11256 if _err != nil { 11257 return 11258 } 11259 return nil 11260 } 11261 11262 // Parameters: 11263 // - ProducerData 11264 func (p *ApplyClient) SetProposedProducers(ctx context.Context, producer_data []byte) (_r int64, _err error) { 11265 var _args198 ApplySetProposedProducersArgs 11266 _args198.ProducerData = producer_data 11267 var _result200 ApplySetProposedProducersResult 11268 var _meta199 thrift.ResponseMeta 11269 _meta199, _err = p.Client_().Call(ctx, "set_proposed_producers", &_args198, &_result200) 11270 p.SetLastResponseMeta_(_meta199) 11271 if _err != nil { 11272 return 11273 } 11274 return _result200.GetSuccess(), nil 11275 } 11276 11277 // Parameters: 11278 // - ProducerDataFormat 11279 // - ProducerData 11280 func (p *ApplyClient) SetProposedProducersEx(ctx context.Context, producer_data_format *Uint64, producer_data []byte) (_r int64, _err error) { 11281 var _args201 ApplySetProposedProducersExArgs 11282 _args201.ProducerDataFormat = producer_data_format 11283 _args201.ProducerData = producer_data 11284 var _result203 ApplySetProposedProducersExResult 11285 var _meta202 thrift.ResponseMeta 11286 _meta202, _err = p.Client_().Call(ctx, "set_proposed_producers_ex", &_args201, &_result203) 11287 p.SetLastResponseMeta_(_meta202) 11288 if _err != nil { 11289 return 11290 } 11291 return _result203.GetSuccess(), nil 11292 } 11293 11294 // Parameters: 11295 // - Account 11296 func (p *ApplyClient) IsPrivileged(ctx context.Context, account *Uint64) (_r bool, _err error) { 11297 var _args204 ApplyIsPrivilegedArgs 11298 _args204.Account = account 11299 var _result206 ApplyIsPrivilegedResult 11300 var _meta205 thrift.ResponseMeta 11301 _meta205, _err = p.Client_().Call(ctx, "is_privileged", &_args204, &_result206) 11302 p.SetLastResponseMeta_(_meta205) 11303 if _err != nil { 11304 return 11305 } 11306 return _result206.GetSuccess(), nil 11307 } 11308 11309 // Parameters: 11310 // - Account 11311 // - IsPriv 11312 func (p *ApplyClient) SetPrivileged(ctx context.Context, account *Uint64, is_priv bool) (_err error) { 11313 var _args207 ApplySetPrivilegedArgs 11314 _args207.Account = account 11315 _args207.IsPriv = is_priv 11316 var _result209 ApplySetPrivilegedResult 11317 var _meta208 thrift.ResponseMeta 11318 _meta208, _err = p.Client_().Call(ctx, "set_privileged", &_args207, &_result209) 11319 p.SetLastResponseMeta_(_meta208) 11320 if _err != nil { 11321 return 11322 } 11323 return nil 11324 } 11325 11326 // Parameters: 11327 // - Data 11328 func (p *ApplyClient) SetBlockchainParametersPacked(ctx context.Context, data []byte) (_err error) { 11329 var _args210 ApplySetBlockchainParametersPackedArgs 11330 _args210.Data = data 11331 var _result212 ApplySetBlockchainParametersPackedResult 11332 var _meta211 thrift.ResponseMeta 11333 _meta211, _err = p.Client_().Call(ctx, "set_blockchain_parameters_packed", &_args210, &_result212) 11334 p.SetLastResponseMeta_(_meta211) 11335 if _err != nil { 11336 return 11337 } 11338 return nil 11339 } 11340 11341 func (p *ApplyClient) GetBlockchainParametersPacked(ctx context.Context) (_r []byte, _err error) { 11342 var _args213 ApplyGetBlockchainParametersPackedArgs 11343 var _result215 ApplyGetBlockchainParametersPackedResult 11344 var _meta214 thrift.ResponseMeta 11345 _meta214, _err = p.Client_().Call(ctx, "get_blockchain_parameters_packed", &_args213, &_result215) 11346 p.SetLastResponseMeta_(_meta214) 11347 if _err != nil { 11348 return 11349 } 11350 return _result215.GetSuccess(), nil 11351 } 11352 11353 // Parameters: 11354 // - FeatureDigest 11355 func (p *ApplyClient) PreactivateFeature(ctx context.Context, feature_digest []byte) (_err error) { 11356 var _args216 ApplyPreactivateFeatureArgs 11357 _args216.FeatureDigest = feature_digest 11358 var _result218 ApplyPreactivateFeatureResult 11359 var _meta217 thrift.ResponseMeta 11360 _meta217, _err = p.Client_().Call(ctx, "preactivate_feature", &_args216, &_result218) 11361 p.SetLastResponseMeta_(_meta217) 11362 if _err != nil { 11363 return 11364 } 11365 return nil 11366 } 11367 11368 // Parameters: 11369 // - TrxData 11370 // - PubkeysData 11371 // - PermsData 11372 func (p *ApplyClient) CheckTransactionAuthorization(ctx context.Context, trx_data []byte, pubkeys_data []byte, perms_data []byte) (_r int32, _err error) { 11373 var _args219 ApplyCheckTransactionAuthorizationArgs 11374 _args219.TrxData = trx_data 11375 _args219.PubkeysData = pubkeys_data 11376 _args219.PermsData = perms_data 11377 var _result221 ApplyCheckTransactionAuthorizationResult 11378 var _meta220 thrift.ResponseMeta 11379 _meta220, _err = p.Client_().Call(ctx, "check_transaction_authorization", &_args219, &_result221) 11380 p.SetLastResponseMeta_(_meta220) 11381 if _err != nil { 11382 return 11383 } 11384 return _result221.GetSuccess(), nil 11385 } 11386 11387 // Parameters: 11388 // - Account 11389 // - Permission 11390 // - PubkeysData 11391 // - PermsData 11392 // - DelayUs 11393 func (p *ApplyClient) CheckPermissionAuthorization(ctx context.Context, account *Uint64, permission *Uint64, pubkeys_data []byte, perms_data []byte, delay_us *Uint64) (_r int32, _err error) { 11394 var _args222 ApplyCheckPermissionAuthorizationArgs 11395 _args222.Account = account 11396 _args222.Permission = permission 11397 _args222.PubkeysData = pubkeys_data 11398 _args222.PermsData = perms_data 11399 _args222.DelayUs = delay_us 11400 var _result224 ApplyCheckPermissionAuthorizationResult 11401 var _meta223 thrift.ResponseMeta 11402 _meta223, _err = p.Client_().Call(ctx, "check_permission_authorization", &_args222, &_result224) 11403 p.SetLastResponseMeta_(_meta223) 11404 if _err != nil { 11405 return 11406 } 11407 return _result224.GetSuccess(), nil 11408 } 11409 11410 // Parameters: 11411 // - Account 11412 // - Permission 11413 func (p *ApplyClient) GetPermissionLastUsed(ctx context.Context, account *Uint64, permission *Uint64) (_r int64, _err error) { 11414 var _args225 ApplyGetPermissionLastUsedArgs 11415 _args225.Account = account 11416 _args225.Permission = permission 11417 var _result227 ApplyGetPermissionLastUsedResult 11418 var _meta226 thrift.ResponseMeta 11419 _meta226, _err = p.Client_().Call(ctx, "get_permission_last_used", &_args225, &_result227) 11420 p.SetLastResponseMeta_(_meta226) 11421 if _err != nil { 11422 return 11423 } 11424 return _result227.GetSuccess(), nil 11425 } 11426 11427 // Parameters: 11428 // - Account 11429 func (p *ApplyClient) GetAccountCreationTime(ctx context.Context, account *Uint64) (_r int64, _err error) { 11430 var _args228 ApplyGetAccountCreationTimeArgs 11431 _args228.Account = account 11432 var _result230 ApplyGetAccountCreationTimeResult 11433 var _meta229 thrift.ResponseMeta 11434 _meta229, _err = p.Client_().Call(ctx, "get_account_creation_time", &_args228, &_result230) 11435 p.SetLastResponseMeta_(_meta229) 11436 if _err != nil { 11437 return 11438 } 11439 return _result230.GetSuccess(), nil 11440 } 11441 11442 // Parameters: 11443 // - Cstr 11444 func (p *ApplyClient) Prints(ctx context.Context, cstr string) (_err error) { 11445 var _args231 ApplyPrintsArgs 11446 _args231.Cstr = cstr 11447 var _result233 ApplyPrintsResult 11448 var _meta232 thrift.ResponseMeta 11449 _meta232, _err = p.Client_().Call(ctx, "prints", &_args231, &_result233) 11450 p.SetLastResponseMeta_(_meta232) 11451 if _err != nil { 11452 return 11453 } 11454 return nil 11455 } 11456 11457 // Parameters: 11458 // - Cstr 11459 func (p *ApplyClient) PrintsL(ctx context.Context, cstr []byte) (_err error) { 11460 var _args234 ApplyPrintsLArgs 11461 _args234.Cstr = cstr 11462 var _result236 ApplyPrintsLResult 11463 var _meta235 thrift.ResponseMeta 11464 _meta235, _err = p.Client_().Call(ctx, "prints_l", &_args234, &_result236) 11465 p.SetLastResponseMeta_(_meta235) 11466 if _err != nil { 11467 return 11468 } 11469 return nil 11470 } 11471 11472 // Parameters: 11473 // - N 11474 func (p *ApplyClient) Printi(ctx context.Context, n int64) (_err error) { 11475 var _args237 ApplyPrintiArgs 11476 _args237.N = n 11477 var _result239 ApplyPrintiResult 11478 var _meta238 thrift.ResponseMeta 11479 _meta238, _err = p.Client_().Call(ctx, "printi", &_args237, &_result239) 11480 p.SetLastResponseMeta_(_meta238) 11481 if _err != nil { 11482 return 11483 } 11484 return nil 11485 } 11486 11487 // Parameters: 11488 // - N 11489 func (p *ApplyClient) Printui(ctx context.Context, n *Uint64) (_err error) { 11490 var _args240 ApplyPrintuiArgs 11491 _args240.N = n 11492 var _result242 ApplyPrintuiResult 11493 var _meta241 thrift.ResponseMeta 11494 _meta241, _err = p.Client_().Call(ctx, "printui", &_args240, &_result242) 11495 p.SetLastResponseMeta_(_meta241) 11496 if _err != nil { 11497 return 11498 } 11499 return nil 11500 } 11501 11502 // Parameters: 11503 // - Value 11504 func (p *ApplyClient) Printi128(ctx context.Context, value []byte) (_err error) { 11505 var _args243 ApplyPrinti128Args 11506 _args243.Value = value 11507 var _result245 ApplyPrinti128Result 11508 var _meta244 thrift.ResponseMeta 11509 _meta244, _err = p.Client_().Call(ctx, "printi128", &_args243, &_result245) 11510 p.SetLastResponseMeta_(_meta244) 11511 if _err != nil { 11512 return 11513 } 11514 return nil 11515 } 11516 11517 // Parameters: 11518 // - Value 11519 func (p *ApplyClient) Printui128(ctx context.Context, value []byte) (_err error) { 11520 var _args246 ApplyPrintui128Args 11521 _args246.Value = value 11522 var _result248 ApplyPrintui128Result 11523 var _meta247 thrift.ResponseMeta 11524 _meta247, _err = p.Client_().Call(ctx, "printui128", &_args246, &_result248) 11525 p.SetLastResponseMeta_(_meta247) 11526 if _err != nil { 11527 return 11528 } 11529 return nil 11530 } 11531 11532 // Parameters: 11533 // - Value 11534 func (p *ApplyClient) Printsf(ctx context.Context, value []byte) (_err error) { 11535 var _args249 ApplyPrintsfArgs 11536 _args249.Value = value 11537 var _result251 ApplyPrintsfResult 11538 var _meta250 thrift.ResponseMeta 11539 _meta250, _err = p.Client_().Call(ctx, "printsf", &_args249, &_result251) 11540 p.SetLastResponseMeta_(_meta250) 11541 if _err != nil { 11542 return 11543 } 11544 return nil 11545 } 11546 11547 // Parameters: 11548 // - Value 11549 func (p *ApplyClient) Printdf(ctx context.Context, value []byte) (_err error) { 11550 var _args252 ApplyPrintdfArgs 11551 _args252.Value = value 11552 var _result254 ApplyPrintdfResult 11553 var _meta253 thrift.ResponseMeta 11554 _meta253, _err = p.Client_().Call(ctx, "printdf", &_args252, &_result254) 11555 p.SetLastResponseMeta_(_meta253) 11556 if _err != nil { 11557 return 11558 } 11559 return nil 11560 } 11561 11562 // Parameters: 11563 // - Value 11564 func (p *ApplyClient) Printqf(ctx context.Context, value []byte) (_err error) { 11565 var _args255 ApplyPrintqfArgs 11566 _args255.Value = value 11567 var _result257 ApplyPrintqfResult 11568 var _meta256 thrift.ResponseMeta 11569 _meta256, _err = p.Client_().Call(ctx, "printqf", &_args255, &_result257) 11570 p.SetLastResponseMeta_(_meta256) 11571 if _err != nil { 11572 return 11573 } 11574 return nil 11575 } 11576 11577 // Parameters: 11578 // - Name 11579 func (p *ApplyClient) Printn(ctx context.Context, name *Uint64) (_err error) { 11580 var _args258 ApplyPrintnArgs 11581 _args258.Name = name 11582 var _result260 ApplyPrintnResult 11583 var _meta259 thrift.ResponseMeta 11584 _meta259, _err = p.Client_().Call(ctx, "printn", &_args258, &_result260) 11585 p.SetLastResponseMeta_(_meta259) 11586 if _err != nil { 11587 return 11588 } 11589 return nil 11590 } 11591 11592 // Parameters: 11593 // - Data 11594 func (p *ApplyClient) Printhex(ctx context.Context, data []byte) (_err error) { 11595 var _args261 ApplyPrinthexArgs 11596 _args261.Data = data 11597 var _result263 ApplyPrinthexResult 11598 var _meta262 thrift.ResponseMeta 11599 _meta262, _err = p.Client_().Call(ctx, "printhex", &_args261, &_result263) 11600 p.SetLastResponseMeta_(_meta262) 11601 if _err != nil { 11602 return 11603 } 11604 return nil 11605 } 11606 11607 func (p *ApplyClient) ActionDataSize(ctx context.Context) (_r int32, _err error) { 11608 var _args264 ApplyActionDataSizeArgs 11609 var _result266 ApplyActionDataSizeResult 11610 var _meta265 thrift.ResponseMeta 11611 _meta265, _err = p.Client_().Call(ctx, "action_data_size", &_args264, &_result266) 11612 p.SetLastResponseMeta_(_meta265) 11613 if _err != nil { 11614 return 11615 } 11616 return _result266.GetSuccess(), nil 11617 } 11618 11619 func (p *ApplyClient) ReadActionData(ctx context.Context) (_r []byte, _err error) { 11620 var _args267 ApplyReadActionDataArgs 11621 var _result269 ApplyReadActionDataResult 11622 var _meta268 thrift.ResponseMeta 11623 _meta268, _err = p.Client_().Call(ctx, "read_action_data", &_args267, &_result269) 11624 p.SetLastResponseMeta_(_meta268) 11625 if _err != nil { 11626 return 11627 } 11628 return _result269.GetSuccess(), nil 11629 } 11630 11631 // Parameters: 11632 // - Name 11633 func (p *ApplyClient) RequireRecipient(ctx context.Context, name *Uint64) (_err error) { 11634 var _args270 ApplyRequireRecipientArgs 11635 _args270.Name = name 11636 var _result272 ApplyRequireRecipientResult 11637 var _meta271 thrift.ResponseMeta 11638 _meta271, _err = p.Client_().Call(ctx, "require_recipient", &_args270, &_result272) 11639 p.SetLastResponseMeta_(_meta271) 11640 if _err != nil { 11641 return 11642 } 11643 return nil 11644 } 11645 11646 // Parameters: 11647 // - Name 11648 func (p *ApplyClient) RequireAuth(ctx context.Context, name *Uint64) (_err error) { 11649 var _args273 ApplyRequireAuthArgs 11650 _args273.Name = name 11651 var _result275 ApplyRequireAuthResult 11652 var _meta274 thrift.ResponseMeta 11653 _meta274, _err = p.Client_().Call(ctx, "require_auth", &_args273, &_result275) 11654 p.SetLastResponseMeta_(_meta274) 11655 if _err != nil { 11656 return 11657 } 11658 return nil 11659 } 11660 11661 // Parameters: 11662 // - Name 11663 func (p *ApplyClient) HasAuth(ctx context.Context, name *Uint64) (_r bool, _err error) { 11664 var _args276 ApplyHasAuthArgs 11665 _args276.Name = name 11666 var _result278 ApplyHasAuthResult 11667 var _meta277 thrift.ResponseMeta 11668 _meta277, _err = p.Client_().Call(ctx, "has_auth", &_args276, &_result278) 11669 p.SetLastResponseMeta_(_meta277) 11670 if _err != nil { 11671 return 11672 } 11673 return _result278.GetSuccess(), nil 11674 } 11675 11676 // Parameters: 11677 // - Name 11678 // - Permission 11679 func (p *ApplyClient) RequireAuth2(ctx context.Context, name *Uint64, permission *Uint64) (_err error) { 11680 var _args279 ApplyRequireAuth2Args 11681 _args279.Name = name 11682 _args279.Permission = permission 11683 var _result281 ApplyRequireAuth2Result 11684 var _meta280 thrift.ResponseMeta 11685 _meta280, _err = p.Client_().Call(ctx, "require_auth2", &_args279, &_result281) 11686 p.SetLastResponseMeta_(_meta280) 11687 if _err != nil { 11688 return 11689 } 11690 return nil 11691 } 11692 11693 // Parameters: 11694 // - Name 11695 func (p *ApplyClient) IsAccount(ctx context.Context, name *Uint64) (_r bool, _err error) { 11696 var _args282 ApplyIsAccountArgs 11697 _args282.Name = name 11698 var _result284 ApplyIsAccountResult 11699 var _meta283 thrift.ResponseMeta 11700 _meta283, _err = p.Client_().Call(ctx, "is_account", &_args282, &_result284) 11701 p.SetLastResponseMeta_(_meta283) 11702 if _err != nil { 11703 return 11704 } 11705 return _result284.GetSuccess(), nil 11706 } 11707 11708 // Parameters: 11709 // - SerializedAction 11710 func (p *ApplyClient) SendInline(ctx context.Context, serialized_action []byte) (_err error) { 11711 var _args285 ApplySendInlineArgs 11712 _args285.SerializedAction = serialized_action 11713 var _result287 ApplySendInlineResult 11714 var _meta286 thrift.ResponseMeta 11715 _meta286, _err = p.Client_().Call(ctx, "send_inline", &_args285, &_result287) 11716 p.SetLastResponseMeta_(_meta286) 11717 if _err != nil { 11718 return 11719 } 11720 return nil 11721 } 11722 11723 // Parameters: 11724 // - SerializedData 11725 func (p *ApplyClient) SendContextFreeInline(ctx context.Context, serialized_data []byte) (_err error) { 11726 var _args288 ApplySendContextFreeInlineArgs 11727 _args288.SerializedData = serialized_data 11728 var _result290 ApplySendContextFreeInlineResult 11729 var _meta289 thrift.ResponseMeta 11730 _meta289, _err = p.Client_().Call(ctx, "send_context_free_inline", &_args288, &_result290) 11731 p.SetLastResponseMeta_(_meta289) 11732 if _err != nil { 11733 return 11734 } 11735 return nil 11736 } 11737 11738 func (p *ApplyClient) PublicationTime(ctx context.Context) (_r *Uint64, _err error) { 11739 var _args291 ApplyPublicationTimeArgs 11740 var _result293 ApplyPublicationTimeResult 11741 var _meta292 thrift.ResponseMeta 11742 _meta292, _err = p.Client_().Call(ctx, "publication_time", &_args291, &_result293) 11743 p.SetLastResponseMeta_(_meta292) 11744 if _err != nil { 11745 return 11746 } 11747 if _ret294 := _result293.GetSuccess(); _ret294 != nil { 11748 return _ret294, nil 11749 } 11750 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "publication_time failed: unknown result") 11751 } 11752 11753 func (p *ApplyClient) CurrentReceiver(ctx context.Context) (_r *Uint64, _err error) { 11754 var _args295 ApplyCurrentReceiverArgs 11755 var _result297 ApplyCurrentReceiverResult 11756 var _meta296 thrift.ResponseMeta 11757 _meta296, _err = p.Client_().Call(ctx, "current_receiver", &_args295, &_result297) 11758 p.SetLastResponseMeta_(_meta296) 11759 if _err != nil { 11760 return 11761 } 11762 if _ret298 := _result297.GetSuccess(); _ret298 != nil { 11763 return _ret298, nil 11764 } 11765 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "current_receiver failed: unknown result") 11766 } 11767 11768 // Parameters: 11769 // - Test 11770 // - Msg 11771 func (p *ApplyClient) EosioAssert(ctx context.Context, test bool, msg []byte) (_err error) { 11772 var _args299 ApplyEosioAssertArgs 11773 _args299.Test = test 11774 _args299.Msg = msg 11775 var _result301 ApplyEosioAssertResult 11776 var _meta300 thrift.ResponseMeta 11777 _meta300, _err = p.Client_().Call(ctx, "eosio_assert", &_args299, &_result301) 11778 p.SetLastResponseMeta_(_meta300) 11779 if _err != nil { 11780 return 11781 } 11782 return nil 11783 } 11784 11785 // Parameters: 11786 // - Test 11787 // - Msg 11788 func (p *ApplyClient) EosioAssertMessage(ctx context.Context, test bool, msg []byte) (_err error) { 11789 var _args302 ApplyEosioAssertMessageArgs 11790 _args302.Test = test 11791 _args302.Msg = msg 11792 var _result304 ApplyEosioAssertMessageResult 11793 var _meta303 thrift.ResponseMeta 11794 _meta303, _err = p.Client_().Call(ctx, "eosio_assert_message", &_args302, &_result304) 11795 p.SetLastResponseMeta_(_meta303) 11796 if _err != nil { 11797 return 11798 } 11799 return nil 11800 } 11801 11802 // Parameters: 11803 // - Test 11804 // - Code 11805 func (p *ApplyClient) EosioAssertCode(ctx context.Context, test bool, code *Uint64) (_err error) { 11806 var _args305 ApplyEosioAssertCodeArgs 11807 _args305.Test = test 11808 _args305.Code = code 11809 var _result307 ApplyEosioAssertCodeResult 11810 var _meta306 thrift.ResponseMeta 11811 _meta306, _err = p.Client_().Call(ctx, "eosio_assert_code", &_args305, &_result307) 11812 p.SetLastResponseMeta_(_meta306) 11813 if _err != nil { 11814 return 11815 } 11816 return nil 11817 } 11818 11819 // Parameters: 11820 // - Code 11821 func (p *ApplyClient) EosioExit(ctx context.Context, code int32) (_err error) { 11822 var _args308 ApplyEosioExitArgs 11823 _args308.Code = code 11824 var _result310 ApplyEosioExitResult 11825 var _meta309 thrift.ResponseMeta 11826 _meta309, _err = p.Client_().Call(ctx, "eosio_exit", &_args308, &_result310) 11827 p.SetLastResponseMeta_(_meta309) 11828 if _err != nil { 11829 return 11830 } 11831 return nil 11832 } 11833 11834 func (p *ApplyClient) CurrentTime(ctx context.Context) (_r *Uint64, _err error) { 11835 var _args311 ApplyCurrentTimeArgs 11836 var _result313 ApplyCurrentTimeResult 11837 var _meta312 thrift.ResponseMeta 11838 _meta312, _err = p.Client_().Call(ctx, "current_time", &_args311, &_result313) 11839 p.SetLastResponseMeta_(_meta312) 11840 if _err != nil { 11841 return 11842 } 11843 if _ret314 := _result313.GetSuccess(); _ret314 != nil { 11844 return _ret314, nil 11845 } 11846 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "current_time failed: unknown result") 11847 } 11848 11849 // Parameters: 11850 // - FeatureDigest 11851 func (p *ApplyClient) IsFeatureActivated(ctx context.Context, feature_digest []byte) (_r bool, _err error) { 11852 var _args315 ApplyIsFeatureActivatedArgs 11853 _args315.FeatureDigest = feature_digest 11854 var _result317 ApplyIsFeatureActivatedResult 11855 var _meta316 thrift.ResponseMeta 11856 _meta316, _err = p.Client_().Call(ctx, "is_feature_activated", &_args315, &_result317) 11857 p.SetLastResponseMeta_(_meta316) 11858 if _err != nil { 11859 return 11860 } 11861 return _result317.GetSuccess(), nil 11862 } 11863 11864 func (p *ApplyClient) GetSender(ctx context.Context) (_r *Uint64, _err error) { 11865 var _args318 ApplyGetSenderArgs 11866 var _result320 ApplyGetSenderResult 11867 var _meta319 thrift.ResponseMeta 11868 _meta319, _err = p.Client_().Call(ctx, "get_sender", &_args318, &_result320) 11869 p.SetLastResponseMeta_(_meta319) 11870 if _err != nil { 11871 return 11872 } 11873 if _ret321 := _result320.GetSuccess(); _ret321 != nil { 11874 return _ret321, nil 11875 } 11876 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "get_sender failed: unknown result") 11877 } 11878 11879 // Parameters: 11880 // - Data 11881 // - Hash 11882 func (p *ApplyClient) AssertSha256(ctx context.Context, data []byte, hash []byte) (_err error) { 11883 var _args322 ApplyAssertSha256Args 11884 _args322.Data = data 11885 _args322.Hash = hash 11886 var _result324 ApplyAssertSha256Result 11887 var _meta323 thrift.ResponseMeta 11888 _meta323, _err = p.Client_().Call(ctx, "assert_sha256", &_args322, &_result324) 11889 p.SetLastResponseMeta_(_meta323) 11890 if _err != nil { 11891 return 11892 } 11893 return nil 11894 } 11895 11896 // Parameters: 11897 // - Data 11898 // - Hash 11899 func (p *ApplyClient) AssertSha1(ctx context.Context, data []byte, hash []byte) (_err error) { 11900 var _args325 ApplyAssertSha1Args 11901 _args325.Data = data 11902 _args325.Hash = hash 11903 var _result327 ApplyAssertSha1Result 11904 var _meta326 thrift.ResponseMeta 11905 _meta326, _err = p.Client_().Call(ctx, "assert_sha1", &_args325, &_result327) 11906 p.SetLastResponseMeta_(_meta326) 11907 if _err != nil { 11908 return 11909 } 11910 return nil 11911 } 11912 11913 // Parameters: 11914 // - Data 11915 // - Hash 11916 func (p *ApplyClient) AssertSha512(ctx context.Context, data []byte, hash []byte) (_err error) { 11917 var _args328 ApplyAssertSha512Args 11918 _args328.Data = data 11919 _args328.Hash = hash 11920 var _result330 ApplyAssertSha512Result 11921 var _meta329 thrift.ResponseMeta 11922 _meta329, _err = p.Client_().Call(ctx, "assert_sha512", &_args328, &_result330) 11923 p.SetLastResponseMeta_(_meta329) 11924 if _err != nil { 11925 return 11926 } 11927 return nil 11928 } 11929 11930 // Parameters: 11931 // - Data 11932 // - Hash 11933 func (p *ApplyClient) AssertRipemd160(ctx context.Context, data []byte, hash []byte) (_err error) { 11934 var _args331 ApplyAssertRipemd160Args 11935 _args331.Data = data 11936 _args331.Hash = hash 11937 var _result333 ApplyAssertRipemd160Result 11938 var _meta332 thrift.ResponseMeta 11939 _meta332, _err = p.Client_().Call(ctx, "assert_ripemd160", &_args331, &_result333) 11940 p.SetLastResponseMeta_(_meta332) 11941 if _err != nil { 11942 return 11943 } 11944 return nil 11945 } 11946 11947 // Parameters: 11948 // - Data 11949 func (p *ApplyClient) Sha256(ctx context.Context, data []byte) (_r []byte, _err error) { 11950 var _args334 ApplySha256Args 11951 _args334.Data = data 11952 var _result336 ApplySha256Result 11953 var _meta335 thrift.ResponseMeta 11954 _meta335, _err = p.Client_().Call(ctx, "sha256", &_args334, &_result336) 11955 p.SetLastResponseMeta_(_meta335) 11956 if _err != nil { 11957 return 11958 } 11959 return _result336.GetSuccess(), nil 11960 } 11961 11962 // Parameters: 11963 // - Data 11964 func (p *ApplyClient) Sha1(ctx context.Context, data []byte) (_r []byte, _err error) { 11965 var _args337 ApplySha1Args 11966 _args337.Data = data 11967 var _result339 ApplySha1Result 11968 var _meta338 thrift.ResponseMeta 11969 _meta338, _err = p.Client_().Call(ctx, "sha1", &_args337, &_result339) 11970 p.SetLastResponseMeta_(_meta338) 11971 if _err != nil { 11972 return 11973 } 11974 return _result339.GetSuccess(), nil 11975 } 11976 11977 // Parameters: 11978 // - Data 11979 func (p *ApplyClient) Sha512(ctx context.Context, data []byte) (_r []byte, _err error) { 11980 var _args340 ApplySha512Args 11981 _args340.Data = data 11982 var _result342 ApplySha512Result 11983 var _meta341 thrift.ResponseMeta 11984 _meta341, _err = p.Client_().Call(ctx, "sha512", &_args340, &_result342) 11985 p.SetLastResponseMeta_(_meta341) 11986 if _err != nil { 11987 return 11988 } 11989 return _result342.GetSuccess(), nil 11990 } 11991 11992 // Parameters: 11993 // - Data 11994 func (p *ApplyClient) Ripemd160(ctx context.Context, data []byte) (_r []byte, _err error) { 11995 var _args343 ApplyRipemd160Args 11996 _args343.Data = data 11997 var _result345 ApplyRipemd160Result 11998 var _meta344 thrift.ResponseMeta 11999 _meta344, _err = p.Client_().Call(ctx, "ripemd160", &_args343, &_result345) 12000 p.SetLastResponseMeta_(_meta344) 12001 if _err != nil { 12002 return 12003 } 12004 return _result345.GetSuccess(), nil 12005 } 12006 12007 // Parameters: 12008 // - Digest 12009 // - Sig 12010 func (p *ApplyClient) RecoverKey(ctx context.Context, digest []byte, sig []byte) (_r []byte, _err error) { 12011 var _args346 ApplyRecoverKeyArgs 12012 _args346.Digest = digest 12013 _args346.Sig = sig 12014 var _result348 ApplyRecoverKeyResult 12015 var _meta347 thrift.ResponseMeta 12016 _meta347, _err = p.Client_().Call(ctx, "recover_key", &_args346, &_result348) 12017 p.SetLastResponseMeta_(_meta347) 12018 if _err != nil { 12019 return 12020 } 12021 return _result348.GetSuccess(), nil 12022 } 12023 12024 // Parameters: 12025 // - Digest 12026 // - Sig 12027 // - Pub 12028 func (p *ApplyClient) AssertRecoverKey(ctx context.Context, digest []byte, sig []byte, pub []byte) (_err error) { 12029 var _args349 ApplyAssertRecoverKeyArgs 12030 _args349.Digest = digest 12031 _args349.Sig = sig 12032 _args349.Pub = pub 12033 var _result351 ApplyAssertRecoverKeyResult 12034 var _meta350 thrift.ResponseMeta 12035 _meta350, _err = p.Client_().Call(ctx, "assert_recover_key", &_args349, &_result351) 12036 p.SetLastResponseMeta_(_meta350) 12037 if _err != nil { 12038 return 12039 } 12040 return nil 12041 } 12042 12043 // Parameters: 12044 // - SenderID 12045 // - Payer 12046 // - SerializedTransaction 12047 // - ReplaceExisting 12048 func (p *ApplyClient) SendDeferred(ctx context.Context, sender_id []byte, payer *Uint64, serialized_transaction []byte, replace_existing int32) (_err error) { 12049 var _args352 ApplySendDeferredArgs 12050 _args352.SenderID = sender_id 12051 _args352.Payer = payer 12052 _args352.SerializedTransaction = serialized_transaction 12053 _args352.ReplaceExisting = replace_existing 12054 var _result354 ApplySendDeferredResult 12055 var _meta353 thrift.ResponseMeta 12056 _meta353, _err = p.Client_().Call(ctx, "send_deferred", &_args352, &_result354) 12057 p.SetLastResponseMeta_(_meta353) 12058 if _err != nil { 12059 return 12060 } 12061 return nil 12062 } 12063 12064 // Parameters: 12065 // - SenderID 12066 func (p *ApplyClient) CancelDeferred(ctx context.Context, sender_id []byte) (_r int32, _err error) { 12067 var _args355 ApplyCancelDeferredArgs 12068 _args355.SenderID = sender_id 12069 var _result357 ApplyCancelDeferredResult 12070 var _meta356 thrift.ResponseMeta 12071 _meta356, _err = p.Client_().Call(ctx, "cancel_deferred", &_args355, &_result357) 12072 p.SetLastResponseMeta_(_meta356) 12073 if _err != nil { 12074 return 12075 } 12076 return _result357.GetSuccess(), nil 12077 } 12078 12079 func (p *ApplyClient) ReadTransaction(ctx context.Context) (_r []byte, _err error) { 12080 var _args358 ApplyReadTransactionArgs 12081 var _result360 ApplyReadTransactionResult 12082 var _meta359 thrift.ResponseMeta 12083 _meta359, _err = p.Client_().Call(ctx, "read_transaction", &_args358, &_result360) 12084 p.SetLastResponseMeta_(_meta359) 12085 if _err != nil { 12086 return 12087 } 12088 return _result360.GetSuccess(), nil 12089 } 12090 12091 func (p *ApplyClient) TransactionSize(ctx context.Context) (_r int32, _err error) { 12092 var _args361 ApplyTransactionSizeArgs 12093 var _result363 ApplyTransactionSizeResult 12094 var _meta362 thrift.ResponseMeta 12095 _meta362, _err = p.Client_().Call(ctx, "transaction_size", &_args361, &_result363) 12096 p.SetLastResponseMeta_(_meta362) 12097 if _err != nil { 12098 return 12099 } 12100 return _result363.GetSuccess(), nil 12101 } 12102 12103 func (p *ApplyClient) TaposBlockNum(ctx context.Context) (_r int32, _err error) { 12104 var _args364 ApplyTaposBlockNumArgs 12105 var _result366 ApplyTaposBlockNumResult 12106 var _meta365 thrift.ResponseMeta 12107 _meta365, _err = p.Client_().Call(ctx, "tapos_block_num", &_args364, &_result366) 12108 p.SetLastResponseMeta_(_meta365) 12109 if _err != nil { 12110 return 12111 } 12112 return _result366.GetSuccess(), nil 12113 } 12114 12115 func (p *ApplyClient) TaposBlockPrefix(ctx context.Context) (_r int32, _err error) { 12116 var _args367 ApplyTaposBlockPrefixArgs 12117 var _result369 ApplyTaposBlockPrefixResult 12118 var _meta368 thrift.ResponseMeta 12119 _meta368, _err = p.Client_().Call(ctx, "tapos_block_prefix", &_args367, &_result369) 12120 p.SetLastResponseMeta_(_meta368) 12121 if _err != nil { 12122 return 12123 } 12124 return _result369.GetSuccess(), nil 12125 } 12126 12127 func (p *ApplyClient) Expiration(ctx context.Context) (_r int64, _err error) { 12128 var _args370 ApplyExpirationArgs 12129 var _result372 ApplyExpirationResult 12130 var _meta371 thrift.ResponseMeta 12131 _meta371, _err = p.Client_().Call(ctx, "expiration", &_args370, &_result372) 12132 p.SetLastResponseMeta_(_meta371) 12133 if _err != nil { 12134 return 12135 } 12136 return _result372.GetSuccess(), nil 12137 } 12138 12139 // Parameters: 12140 // - _type 12141 // - Index 12142 func (p *ApplyClient) GetAction(ctx context.Context, _type int32, index int32) (_r []byte, _err error) { 12143 var _args373 ApplyGetActionArgs 12144 _args373._type = _type 12145 _args373.Index = index 12146 var _result375 ApplyGetActionResult 12147 var _meta374 thrift.ResponseMeta 12148 _meta374, _err = p.Client_().Call(ctx, "get_action", &_args373, &_result375) 12149 p.SetLastResponseMeta_(_meta374) 12150 if _err != nil { 12151 return 12152 } 12153 return _result375.GetSuccess(), nil 12154 } 12155 12156 // Parameters: 12157 // - Index 12158 func (p *ApplyClient) GetContextFreeData(ctx context.Context, index int32) (_r []byte, _err error) { 12159 var _args376 ApplyGetContextFreeDataArgs 12160 _args376.Index = index 12161 var _result378 ApplyGetContextFreeDataResult 12162 var _meta377 thrift.ResponseMeta 12163 _meta377, _err = p.Client_().Call(ctx, "get_context_free_data", &_args376, &_result378) 12164 p.SetLastResponseMeta_(_meta377) 12165 if _err != nil { 12166 return 12167 } 12168 return _result378.GetSuccess(), nil 12169 } 12170 12171 // Parameters: 12172 // - Scope 12173 // - Table 12174 // - Payer 12175 // - ID 12176 // - Data 12177 func (p *ApplyClient) DbStoreI64(ctx context.Context, scope *Uint64, table *Uint64, payer *Uint64, id *Uint64, data []byte) (_r int32, _err error) { 12178 var _args379 ApplyDbStoreI64Args 12179 _args379.Scope = scope 12180 _args379.Table = table 12181 _args379.Payer = payer 12182 _args379.ID = id 12183 _args379.Data = data 12184 var _result381 ApplyDbStoreI64Result 12185 var _meta380 thrift.ResponseMeta 12186 _meta380, _err = p.Client_().Call(ctx, "db_store_i64", &_args379, &_result381) 12187 p.SetLastResponseMeta_(_meta380) 12188 if _err != nil { 12189 return 12190 } 12191 return _result381.GetSuccess(), nil 12192 } 12193 12194 // Parameters: 12195 // - Iterator 12196 // - Payer 12197 // - Data 12198 func (p *ApplyClient) DbUpdateI64(ctx context.Context, iterator int32, payer *Uint64, data []byte) (_err error) { 12199 var _args382 ApplyDbUpdateI64Args 12200 _args382.Iterator = iterator 12201 _args382.Payer = payer 12202 _args382.Data = data 12203 var _result384 ApplyDbUpdateI64Result 12204 var _meta383 thrift.ResponseMeta 12205 _meta383, _err = p.Client_().Call(ctx, "db_update_i64", &_args382, &_result384) 12206 p.SetLastResponseMeta_(_meta383) 12207 if _err != nil { 12208 return 12209 } 12210 return nil 12211 } 12212 12213 // Parameters: 12214 // - Iterator 12215 func (p *ApplyClient) DbRemoveI64(ctx context.Context, iterator int32) (_err error) { 12216 var _args385 ApplyDbRemoveI64Args 12217 _args385.Iterator = iterator 12218 var _result387 ApplyDbRemoveI64Result 12219 var _meta386 thrift.ResponseMeta 12220 _meta386, _err = p.Client_().Call(ctx, "db_remove_i64", &_args385, &_result387) 12221 p.SetLastResponseMeta_(_meta386) 12222 if _err != nil { 12223 return 12224 } 12225 return nil 12226 } 12227 12228 // Parameters: 12229 // - Iterator 12230 func (p *ApplyClient) DbGetI64(ctx context.Context, iterator int32) (_r []byte, _err error) { 12231 var _args388 ApplyDbGetI64Args 12232 _args388.Iterator = iterator 12233 var _result390 ApplyDbGetI64Result 12234 var _meta389 thrift.ResponseMeta 12235 _meta389, _err = p.Client_().Call(ctx, "db_get_i64", &_args388, &_result390) 12236 p.SetLastResponseMeta_(_meta389) 12237 if _err != nil { 12238 return 12239 } 12240 return _result390.GetSuccess(), nil 12241 } 12242 12243 // Parameters: 12244 // - Iterator 12245 func (p *ApplyClient) DbNextI64(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) { 12246 var _args391 ApplyDbNextI64Args 12247 _args391.Iterator = iterator 12248 var _result393 ApplyDbNextI64Result 12249 var _meta392 thrift.ResponseMeta 12250 _meta392, _err = p.Client_().Call(ctx, "db_next_i64", &_args391, &_result393) 12251 p.SetLastResponseMeta_(_meta392) 12252 if _err != nil { 12253 return 12254 } 12255 if _ret394 := _result393.GetSuccess(); _ret394 != nil { 12256 return _ret394, nil 12257 } 12258 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_next_i64 failed: unknown result") 12259 } 12260 12261 // Parameters: 12262 // - Iterator 12263 func (p *ApplyClient) DbPreviousI64(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) { 12264 var _args395 ApplyDbPreviousI64Args 12265 _args395.Iterator = iterator 12266 var _result397 ApplyDbPreviousI64Result 12267 var _meta396 thrift.ResponseMeta 12268 _meta396, _err = p.Client_().Call(ctx, "db_previous_i64", &_args395, &_result397) 12269 p.SetLastResponseMeta_(_meta396) 12270 if _err != nil { 12271 return 12272 } 12273 if _ret398 := _result397.GetSuccess(); _ret398 != nil { 12274 return _ret398, nil 12275 } 12276 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_previous_i64 failed: unknown result") 12277 } 12278 12279 // Parameters: 12280 // - Code 12281 // - Scope 12282 // - Table 12283 // - ID 12284 func (p *ApplyClient) DbFindI64(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, id *Uint64) (_r int32, _err error) { 12285 var _args399 ApplyDbFindI64Args 12286 _args399.Code = code 12287 _args399.Scope = scope 12288 _args399.Table = table 12289 _args399.ID = id 12290 var _result401 ApplyDbFindI64Result 12291 var _meta400 thrift.ResponseMeta 12292 _meta400, _err = p.Client_().Call(ctx, "db_find_i64", &_args399, &_result401) 12293 p.SetLastResponseMeta_(_meta400) 12294 if _err != nil { 12295 return 12296 } 12297 return _result401.GetSuccess(), nil 12298 } 12299 12300 // Parameters: 12301 // - Code 12302 // - Scope 12303 // - Table 12304 // - ID 12305 func (p *ApplyClient) DbLowerboundI64(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, id *Uint64) (_r int32, _err error) { 12306 var _args402 ApplyDbLowerboundI64Args 12307 _args402.Code = code 12308 _args402.Scope = scope 12309 _args402.Table = table 12310 _args402.ID = id 12311 var _result404 ApplyDbLowerboundI64Result 12312 var _meta403 thrift.ResponseMeta 12313 _meta403, _err = p.Client_().Call(ctx, "db_lowerbound_i64", &_args402, &_result404) 12314 p.SetLastResponseMeta_(_meta403) 12315 if _err != nil { 12316 return 12317 } 12318 return _result404.GetSuccess(), nil 12319 } 12320 12321 // Parameters: 12322 // - Code 12323 // - Scope 12324 // - Table 12325 // - ID 12326 func (p *ApplyClient) DbUpperboundI64(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, id *Uint64) (_r int32, _err error) { 12327 var _args405 ApplyDbUpperboundI64Args 12328 _args405.Code = code 12329 _args405.Scope = scope 12330 _args405.Table = table 12331 _args405.ID = id 12332 var _result407 ApplyDbUpperboundI64Result 12333 var _meta406 thrift.ResponseMeta 12334 _meta406, _err = p.Client_().Call(ctx, "db_upperbound_i64", &_args405, &_result407) 12335 p.SetLastResponseMeta_(_meta406) 12336 if _err != nil { 12337 return 12338 } 12339 return _result407.GetSuccess(), nil 12340 } 12341 12342 // Parameters: 12343 // - Code 12344 // - Scope 12345 // - Table 12346 func (p *ApplyClient) DbEndI64(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64) (_r int32, _err error) { 12347 var _args408 ApplyDbEndI64Args 12348 _args408.Code = code 12349 _args408.Scope = scope 12350 _args408.Table = table 12351 var _result410 ApplyDbEndI64Result 12352 var _meta409 thrift.ResponseMeta 12353 _meta409, _err = p.Client_().Call(ctx, "db_end_i64", &_args408, &_result410) 12354 p.SetLastResponseMeta_(_meta409) 12355 if _err != nil { 12356 return 12357 } 12358 return _result410.GetSuccess(), nil 12359 } 12360 12361 // Parameters: 12362 // - Scope 12363 // - Table 12364 // - Payer 12365 // - ID 12366 // - Secondary 12367 func (p *ApplyClient) DbIdx64Store(ctx context.Context, scope *Uint64, table *Uint64, payer *Uint64, id *Uint64, secondary *Uint64) (_r int32, _err error) { 12368 var _args411 ApplyDbIdx64StoreArgs 12369 _args411.Scope = scope 12370 _args411.Table = table 12371 _args411.Payer = payer 12372 _args411.ID = id 12373 _args411.Secondary = secondary 12374 var _result413 ApplyDbIdx64StoreResult 12375 var _meta412 thrift.ResponseMeta 12376 _meta412, _err = p.Client_().Call(ctx, "db_idx64_store", &_args411, &_result413) 12377 p.SetLastResponseMeta_(_meta412) 12378 if _err != nil { 12379 return 12380 } 12381 return _result413.GetSuccess(), nil 12382 } 12383 12384 // Parameters: 12385 // - Iterator 12386 // - Payer 12387 // - Secondary 12388 func (p *ApplyClient) DbIdx64Update(ctx context.Context, iterator int32, payer *Uint64, secondary *Uint64) (_err error) { 12389 var _args414 ApplyDbIdx64UpdateArgs 12390 _args414.Iterator = iterator 12391 _args414.Payer = payer 12392 _args414.Secondary = secondary 12393 var _result416 ApplyDbIdx64UpdateResult 12394 var _meta415 thrift.ResponseMeta 12395 _meta415, _err = p.Client_().Call(ctx, "db_idx64_update", &_args414, &_result416) 12396 p.SetLastResponseMeta_(_meta415) 12397 if _err != nil { 12398 return 12399 } 12400 return nil 12401 } 12402 12403 // Parameters: 12404 // - Iterator 12405 func (p *ApplyClient) DbIdx64Remove(ctx context.Context, iterator int32) (_err error) { 12406 var _args417 ApplyDbIdx64RemoveArgs 12407 _args417.Iterator = iterator 12408 var _result419 ApplyDbIdx64RemoveResult 12409 var _meta418 thrift.ResponseMeta 12410 _meta418, _err = p.Client_().Call(ctx, "db_idx64_remove", &_args417, &_result419) 12411 p.SetLastResponseMeta_(_meta418) 12412 if _err != nil { 12413 return 12414 } 12415 return nil 12416 } 12417 12418 // Parameters: 12419 // - Iterator 12420 func (p *ApplyClient) DbIdx64Next(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) { 12421 var _args420 ApplyDbIdx64NextArgs 12422 _args420.Iterator = iterator 12423 var _result422 ApplyDbIdx64NextResult 12424 var _meta421 thrift.ResponseMeta 12425 _meta421, _err = p.Client_().Call(ctx, "db_idx64_next", &_args420, &_result422) 12426 p.SetLastResponseMeta_(_meta421) 12427 if _err != nil { 12428 return 12429 } 12430 if _ret423 := _result422.GetSuccess(); _ret423 != nil { 12431 return _ret423, nil 12432 } 12433 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx64_next failed: unknown result") 12434 } 12435 12436 // Parameters: 12437 // - Iteratory 12438 func (p *ApplyClient) DbIdx64Previous(ctx context.Context, iteratory int32) (_r *NextPreviousReturn, _err error) { 12439 var _args424 ApplyDbIdx64PreviousArgs 12440 _args424.Iteratory = iteratory 12441 var _result426 ApplyDbIdx64PreviousResult 12442 var _meta425 thrift.ResponseMeta 12443 _meta425, _err = p.Client_().Call(ctx, "db_idx64_previous", &_args424, &_result426) 12444 p.SetLastResponseMeta_(_meta425) 12445 if _err != nil { 12446 return 12447 } 12448 if _ret427 := _result426.GetSuccess(); _ret427 != nil { 12449 return _ret427, nil 12450 } 12451 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx64_previous failed: unknown result") 12452 } 12453 12454 // Parameters: 12455 // - Code 12456 // - Scope 12457 // - Table 12458 // - Primary 12459 func (p *ApplyClient) DbIdx64FindPrimary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, primary *Uint64) (_r *FindPrimaryReturn, _err error) { 12460 var _args428 ApplyDbIdx64FindPrimaryArgs 12461 _args428.Code = code 12462 _args428.Scope = scope 12463 _args428.Table = table 12464 _args428.Primary = primary 12465 var _result430 ApplyDbIdx64FindPrimaryResult 12466 var _meta429 thrift.ResponseMeta 12467 _meta429, _err = p.Client_().Call(ctx, "db_idx64_find_primary", &_args428, &_result430) 12468 p.SetLastResponseMeta_(_meta429) 12469 if _err != nil { 12470 return 12471 } 12472 if _ret431 := _result430.GetSuccess(); _ret431 != nil { 12473 return _ret431, nil 12474 } 12475 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx64_find_primary failed: unknown result") 12476 } 12477 12478 // Parameters: 12479 // - Code 12480 // - Scope 12481 // - Table 12482 // - Secondary 12483 func (p *ApplyClient) DbIdx64FindSecondary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary *Uint64) (_r *FindSecondaryReturn, _err error) { 12484 var _args432 ApplyDbIdx64FindSecondaryArgs 12485 _args432.Code = code 12486 _args432.Scope = scope 12487 _args432.Table = table 12488 _args432.Secondary = secondary 12489 var _result434 ApplyDbIdx64FindSecondaryResult 12490 var _meta433 thrift.ResponseMeta 12491 _meta433, _err = p.Client_().Call(ctx, "db_idx64_find_secondary", &_args432, &_result434) 12492 p.SetLastResponseMeta_(_meta433) 12493 if _err != nil { 12494 return 12495 } 12496 if _ret435 := _result434.GetSuccess(); _ret435 != nil { 12497 return _ret435, nil 12498 } 12499 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx64_find_secondary failed: unknown result") 12500 } 12501 12502 // Parameters: 12503 // - Code 12504 // - Scope 12505 // - Table 12506 // - Secondary 12507 // - Primary 12508 func (p *ApplyClient) DbIdx64Lowerbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary *Uint64, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) { 12509 var _args436 ApplyDbIdx64LowerboundArgs 12510 _args436.Code = code 12511 _args436.Scope = scope 12512 _args436.Table = table 12513 _args436.Secondary = secondary 12514 _args436.Primary = primary 12515 var _result438 ApplyDbIdx64LowerboundResult 12516 var _meta437 thrift.ResponseMeta 12517 _meta437, _err = p.Client_().Call(ctx, "db_idx64_lowerbound", &_args436, &_result438) 12518 p.SetLastResponseMeta_(_meta437) 12519 if _err != nil { 12520 return 12521 } 12522 if _ret439 := _result438.GetSuccess(); _ret439 != nil { 12523 return _ret439, nil 12524 } 12525 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx64_lowerbound failed: unknown result") 12526 } 12527 12528 // Parameters: 12529 // - Code 12530 // - Scope 12531 // - Table 12532 // - Secondary 12533 // - Primary 12534 func (p *ApplyClient) DbIdx64Upperbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary *Uint64, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) { 12535 var _args440 ApplyDbIdx64UpperboundArgs 12536 _args440.Code = code 12537 _args440.Scope = scope 12538 _args440.Table = table 12539 _args440.Secondary = secondary 12540 _args440.Primary = primary 12541 var _result442 ApplyDbIdx64UpperboundResult 12542 var _meta441 thrift.ResponseMeta 12543 _meta441, _err = p.Client_().Call(ctx, "db_idx64_upperbound", &_args440, &_result442) 12544 p.SetLastResponseMeta_(_meta441) 12545 if _err != nil { 12546 return 12547 } 12548 if _ret443 := _result442.GetSuccess(); _ret443 != nil { 12549 return _ret443, nil 12550 } 12551 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx64_upperbound failed: unknown result") 12552 } 12553 12554 // Parameters: 12555 // - Code 12556 // - Scope 12557 // - Table 12558 func (p *ApplyClient) DbIdx64End(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64) (_r int32, _err error) { 12559 var _args444 ApplyDbIdx64EndArgs 12560 _args444.Code = code 12561 _args444.Scope = scope 12562 _args444.Table = table 12563 var _result446 ApplyDbIdx64EndResult 12564 var _meta445 thrift.ResponseMeta 12565 _meta445, _err = p.Client_().Call(ctx, "db_idx64_end", &_args444, &_result446) 12566 p.SetLastResponseMeta_(_meta445) 12567 if _err != nil { 12568 return 12569 } 12570 return _result446.GetSuccess(), nil 12571 } 12572 12573 // Parameters: 12574 // - Scope 12575 // - Table 12576 // - Payer 12577 // - ID 12578 // - Secondary 12579 func (p *ApplyClient) DbIdx128Store(ctx context.Context, scope *Uint64, table *Uint64, payer *Uint64, id *Uint64, secondary []byte) (_r int32, _err error) { 12580 var _args447 ApplyDbIdx128StoreArgs 12581 _args447.Scope = scope 12582 _args447.Table = table 12583 _args447.Payer = payer 12584 _args447.ID = id 12585 _args447.Secondary = secondary 12586 var _result449 ApplyDbIdx128StoreResult 12587 var _meta448 thrift.ResponseMeta 12588 _meta448, _err = p.Client_().Call(ctx, "db_idx128_store", &_args447, &_result449) 12589 p.SetLastResponseMeta_(_meta448) 12590 if _err != nil { 12591 return 12592 } 12593 return _result449.GetSuccess(), nil 12594 } 12595 12596 // Parameters: 12597 // - Iterator 12598 // - Payer 12599 // - Secondary 12600 func (p *ApplyClient) DbIdx128Update(ctx context.Context, iterator int32, payer *Uint64, secondary []byte) (_err error) { 12601 var _args450 ApplyDbIdx128UpdateArgs 12602 _args450.Iterator = iterator 12603 _args450.Payer = payer 12604 _args450.Secondary = secondary 12605 var _result452 ApplyDbIdx128UpdateResult 12606 var _meta451 thrift.ResponseMeta 12607 _meta451, _err = p.Client_().Call(ctx, "db_idx128_update", &_args450, &_result452) 12608 p.SetLastResponseMeta_(_meta451) 12609 if _err != nil { 12610 return 12611 } 12612 return nil 12613 } 12614 12615 // Parameters: 12616 // - Iterator 12617 func (p *ApplyClient) DbIdx128Remove(ctx context.Context, iterator int32) (_err error) { 12618 var _args453 ApplyDbIdx128RemoveArgs 12619 _args453.Iterator = iterator 12620 var _result455 ApplyDbIdx128RemoveResult 12621 var _meta454 thrift.ResponseMeta 12622 _meta454, _err = p.Client_().Call(ctx, "db_idx128_remove", &_args453, &_result455) 12623 p.SetLastResponseMeta_(_meta454) 12624 if _err != nil { 12625 return 12626 } 12627 return nil 12628 } 12629 12630 // Parameters: 12631 // - Iterator 12632 func (p *ApplyClient) DbIdx128Next(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) { 12633 var _args456 ApplyDbIdx128NextArgs 12634 _args456.Iterator = iterator 12635 var _result458 ApplyDbIdx128NextResult 12636 var _meta457 thrift.ResponseMeta 12637 _meta457, _err = p.Client_().Call(ctx, "db_idx128_next", &_args456, &_result458) 12638 p.SetLastResponseMeta_(_meta457) 12639 if _err != nil { 12640 return 12641 } 12642 if _ret459 := _result458.GetSuccess(); _ret459 != nil { 12643 return _ret459, nil 12644 } 12645 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx128_next failed: unknown result") 12646 } 12647 12648 // Parameters: 12649 // - Iterator 12650 func (p *ApplyClient) DbIdx128Previous(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) { 12651 var _args460 ApplyDbIdx128PreviousArgs 12652 _args460.Iterator = iterator 12653 var _result462 ApplyDbIdx128PreviousResult 12654 var _meta461 thrift.ResponseMeta 12655 _meta461, _err = p.Client_().Call(ctx, "db_idx128_previous", &_args460, &_result462) 12656 p.SetLastResponseMeta_(_meta461) 12657 if _err != nil { 12658 return 12659 } 12660 if _ret463 := _result462.GetSuccess(); _ret463 != nil { 12661 return _ret463, nil 12662 } 12663 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx128_previous failed: unknown result") 12664 } 12665 12666 // Parameters: 12667 // - Code 12668 // - Scope 12669 // - Table 12670 // - Primary 12671 func (p *ApplyClient) DbIdx128FindPrimary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, primary *Uint64) (_r *FindPrimaryReturn, _err error) { 12672 var _args464 ApplyDbIdx128FindPrimaryArgs 12673 _args464.Code = code 12674 _args464.Scope = scope 12675 _args464.Table = table 12676 _args464.Primary = primary 12677 var _result466 ApplyDbIdx128FindPrimaryResult 12678 var _meta465 thrift.ResponseMeta 12679 _meta465, _err = p.Client_().Call(ctx, "db_idx128_find_primary", &_args464, &_result466) 12680 p.SetLastResponseMeta_(_meta465) 12681 if _err != nil { 12682 return 12683 } 12684 if _ret467 := _result466.GetSuccess(); _ret467 != nil { 12685 return _ret467, nil 12686 } 12687 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx128_find_primary failed: unknown result") 12688 } 12689 12690 // Parameters: 12691 // - Code 12692 // - Scope 12693 // - Table 12694 // - Secondary 12695 func (p *ApplyClient) DbIdx128FindSecondary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte) (_r *FindSecondaryReturn, _err error) { 12696 var _args468 ApplyDbIdx128FindSecondaryArgs 12697 _args468.Code = code 12698 _args468.Scope = scope 12699 _args468.Table = table 12700 _args468.Secondary = secondary 12701 var _result470 ApplyDbIdx128FindSecondaryResult 12702 var _meta469 thrift.ResponseMeta 12703 _meta469, _err = p.Client_().Call(ctx, "db_idx128_find_secondary", &_args468, &_result470) 12704 p.SetLastResponseMeta_(_meta469) 12705 if _err != nil { 12706 return 12707 } 12708 if _ret471 := _result470.GetSuccess(); _ret471 != nil { 12709 return _ret471, nil 12710 } 12711 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx128_find_secondary failed: unknown result") 12712 } 12713 12714 // Parameters: 12715 // - Code 12716 // - Scope 12717 // - Table 12718 // - Secondary 12719 // - Primary 12720 func (p *ApplyClient) DbIdx128Lowerbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) { 12721 var _args472 ApplyDbIdx128LowerboundArgs 12722 _args472.Code = code 12723 _args472.Scope = scope 12724 _args472.Table = table 12725 _args472.Secondary = secondary 12726 _args472.Primary = primary 12727 var _result474 ApplyDbIdx128LowerboundResult 12728 var _meta473 thrift.ResponseMeta 12729 _meta473, _err = p.Client_().Call(ctx, "db_idx128_lowerbound", &_args472, &_result474) 12730 p.SetLastResponseMeta_(_meta473) 12731 if _err != nil { 12732 return 12733 } 12734 if _ret475 := _result474.GetSuccess(); _ret475 != nil { 12735 return _ret475, nil 12736 } 12737 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx128_lowerbound failed: unknown result") 12738 } 12739 12740 // Parameters: 12741 // - Code 12742 // - Scope 12743 // - Table 12744 // - Secondary 12745 // - Primary 12746 func (p *ApplyClient) DbIdx128Upperbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) { 12747 var _args476 ApplyDbIdx128UpperboundArgs 12748 _args476.Code = code 12749 _args476.Scope = scope 12750 _args476.Table = table 12751 _args476.Secondary = secondary 12752 _args476.Primary = primary 12753 var _result478 ApplyDbIdx128UpperboundResult 12754 var _meta477 thrift.ResponseMeta 12755 _meta477, _err = p.Client_().Call(ctx, "db_idx128_upperbound", &_args476, &_result478) 12756 p.SetLastResponseMeta_(_meta477) 12757 if _err != nil { 12758 return 12759 } 12760 if _ret479 := _result478.GetSuccess(); _ret479 != nil { 12761 return _ret479, nil 12762 } 12763 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx128_upperbound failed: unknown result") 12764 } 12765 12766 // Parameters: 12767 // - Code 12768 // - Scope 12769 // - Table 12770 func (p *ApplyClient) DbIdx128End(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64) (_r int32, _err error) { 12771 var _args480 ApplyDbIdx128EndArgs 12772 _args480.Code = code 12773 _args480.Scope = scope 12774 _args480.Table = table 12775 var _result482 ApplyDbIdx128EndResult 12776 var _meta481 thrift.ResponseMeta 12777 _meta481, _err = p.Client_().Call(ctx, "db_idx128_end", &_args480, &_result482) 12778 p.SetLastResponseMeta_(_meta481) 12779 if _err != nil { 12780 return 12781 } 12782 return _result482.GetSuccess(), nil 12783 } 12784 12785 // Parameters: 12786 // - Scope 12787 // - Table 12788 // - Payer 12789 // - ID 12790 // - Data 12791 func (p *ApplyClient) DbIdx256Store(ctx context.Context, scope *Uint64, table *Uint64, payer *Uint64, id *Uint64, data []byte) (_r int32, _err error) { 12792 var _args483 ApplyDbIdx256StoreArgs 12793 _args483.Scope = scope 12794 _args483.Table = table 12795 _args483.Payer = payer 12796 _args483.ID = id 12797 _args483.Data = data 12798 var _result485 ApplyDbIdx256StoreResult 12799 var _meta484 thrift.ResponseMeta 12800 _meta484, _err = p.Client_().Call(ctx, "db_idx256_store", &_args483, &_result485) 12801 p.SetLastResponseMeta_(_meta484) 12802 if _err != nil { 12803 return 12804 } 12805 return _result485.GetSuccess(), nil 12806 } 12807 12808 // Parameters: 12809 // - Iterator 12810 // - Payer 12811 // - Data 12812 func (p *ApplyClient) DbIdx256Update(ctx context.Context, iterator int32, payer *Uint64, data []byte) (_err error) { 12813 var _args486 ApplyDbIdx256UpdateArgs 12814 _args486.Iterator = iterator 12815 _args486.Payer = payer 12816 _args486.Data = data 12817 var _result488 ApplyDbIdx256UpdateResult 12818 var _meta487 thrift.ResponseMeta 12819 _meta487, _err = p.Client_().Call(ctx, "db_idx256_update", &_args486, &_result488) 12820 p.SetLastResponseMeta_(_meta487) 12821 if _err != nil { 12822 return 12823 } 12824 return nil 12825 } 12826 12827 // Parameters: 12828 // - Iterator 12829 func (p *ApplyClient) DbIdx256Remove(ctx context.Context, iterator int32) (_err error) { 12830 var _args489 ApplyDbIdx256RemoveArgs 12831 _args489.Iterator = iterator 12832 var _result491 ApplyDbIdx256RemoveResult 12833 var _meta490 thrift.ResponseMeta 12834 _meta490, _err = p.Client_().Call(ctx, "db_idx256_remove", &_args489, &_result491) 12835 p.SetLastResponseMeta_(_meta490) 12836 if _err != nil { 12837 return 12838 } 12839 return nil 12840 } 12841 12842 // Parameters: 12843 // - Iterator 12844 func (p *ApplyClient) DbIdx256Next(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) { 12845 var _args492 ApplyDbIdx256NextArgs 12846 _args492.Iterator = iterator 12847 var _result494 ApplyDbIdx256NextResult 12848 var _meta493 thrift.ResponseMeta 12849 _meta493, _err = p.Client_().Call(ctx, "db_idx256_next", &_args492, &_result494) 12850 p.SetLastResponseMeta_(_meta493) 12851 if _err != nil { 12852 return 12853 } 12854 if _ret495 := _result494.GetSuccess(); _ret495 != nil { 12855 return _ret495, nil 12856 } 12857 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx256_next failed: unknown result") 12858 } 12859 12860 // Parameters: 12861 // - Iterator 12862 func (p *ApplyClient) DbIdx256Previous(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) { 12863 var _args496 ApplyDbIdx256PreviousArgs 12864 _args496.Iterator = iterator 12865 var _result498 ApplyDbIdx256PreviousResult 12866 var _meta497 thrift.ResponseMeta 12867 _meta497, _err = p.Client_().Call(ctx, "db_idx256_previous", &_args496, &_result498) 12868 p.SetLastResponseMeta_(_meta497) 12869 if _err != nil { 12870 return 12871 } 12872 if _ret499 := _result498.GetSuccess(); _ret499 != nil { 12873 return _ret499, nil 12874 } 12875 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx256_previous failed: unknown result") 12876 } 12877 12878 // Parameters: 12879 // - Code 12880 // - Scope 12881 // - Table 12882 // - Primary 12883 func (p *ApplyClient) DbIdx256FindPrimary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, primary *Uint64) (_r *FindPrimaryReturn, _err error) { 12884 var _args500 ApplyDbIdx256FindPrimaryArgs 12885 _args500.Code = code 12886 _args500.Scope = scope 12887 _args500.Table = table 12888 _args500.Primary = primary 12889 var _result502 ApplyDbIdx256FindPrimaryResult 12890 var _meta501 thrift.ResponseMeta 12891 _meta501, _err = p.Client_().Call(ctx, "db_idx256_find_primary", &_args500, &_result502) 12892 p.SetLastResponseMeta_(_meta501) 12893 if _err != nil { 12894 return 12895 } 12896 if _ret503 := _result502.GetSuccess(); _ret503 != nil { 12897 return _ret503, nil 12898 } 12899 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx256_find_primary failed: unknown result") 12900 } 12901 12902 // Parameters: 12903 // - Code 12904 // - Scope 12905 // - Table 12906 // - Data 12907 func (p *ApplyClient) DbIdx256FindSecondary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, data []byte) (_r *FindSecondaryReturn, _err error) { 12908 var _args504 ApplyDbIdx256FindSecondaryArgs 12909 _args504.Code = code 12910 _args504.Scope = scope 12911 _args504.Table = table 12912 _args504.Data = data 12913 var _result506 ApplyDbIdx256FindSecondaryResult 12914 var _meta505 thrift.ResponseMeta 12915 _meta505, _err = p.Client_().Call(ctx, "db_idx256_find_secondary", &_args504, &_result506) 12916 p.SetLastResponseMeta_(_meta505) 12917 if _err != nil { 12918 return 12919 } 12920 if _ret507 := _result506.GetSuccess(); _ret507 != nil { 12921 return _ret507, nil 12922 } 12923 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx256_find_secondary failed: unknown result") 12924 } 12925 12926 // Parameters: 12927 // - Code 12928 // - Scope 12929 // - Table 12930 // - Data 12931 // - Primary 12932 func (p *ApplyClient) DbIdx256Lowerbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, data []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) { 12933 var _args508 ApplyDbIdx256LowerboundArgs 12934 _args508.Code = code 12935 _args508.Scope = scope 12936 _args508.Table = table 12937 _args508.Data = data 12938 _args508.Primary = primary 12939 var _result510 ApplyDbIdx256LowerboundResult 12940 var _meta509 thrift.ResponseMeta 12941 _meta509, _err = p.Client_().Call(ctx, "db_idx256_lowerbound", &_args508, &_result510) 12942 p.SetLastResponseMeta_(_meta509) 12943 if _err != nil { 12944 return 12945 } 12946 if _ret511 := _result510.GetSuccess(); _ret511 != nil { 12947 return _ret511, nil 12948 } 12949 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx256_lowerbound failed: unknown result") 12950 } 12951 12952 // Parameters: 12953 // - Code 12954 // - Scope 12955 // - Table 12956 // - Data 12957 // - Primary 12958 func (p *ApplyClient) DbIdx256Upperbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, data []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) { 12959 var _args512 ApplyDbIdx256UpperboundArgs 12960 _args512.Code = code 12961 _args512.Scope = scope 12962 _args512.Table = table 12963 _args512.Data = data 12964 _args512.Primary = primary 12965 var _result514 ApplyDbIdx256UpperboundResult 12966 var _meta513 thrift.ResponseMeta 12967 _meta513, _err = p.Client_().Call(ctx, "db_idx256_upperbound", &_args512, &_result514) 12968 p.SetLastResponseMeta_(_meta513) 12969 if _err != nil { 12970 return 12971 } 12972 if _ret515 := _result514.GetSuccess(); _ret515 != nil { 12973 return _ret515, nil 12974 } 12975 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx256_upperbound failed: unknown result") 12976 } 12977 12978 // Parameters: 12979 // - Code 12980 // - Scope 12981 // - Table 12982 func (p *ApplyClient) DbIdx256End(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64) (_r int32, _err error) { 12983 var _args516 ApplyDbIdx256EndArgs 12984 _args516.Code = code 12985 _args516.Scope = scope 12986 _args516.Table = table 12987 var _result518 ApplyDbIdx256EndResult 12988 var _meta517 thrift.ResponseMeta 12989 _meta517, _err = p.Client_().Call(ctx, "db_idx256_end", &_args516, &_result518) 12990 p.SetLastResponseMeta_(_meta517) 12991 if _err != nil { 12992 return 12993 } 12994 return _result518.GetSuccess(), nil 12995 } 12996 12997 // Parameters: 12998 // - Scope 12999 // - Table 13000 // - Payer 13001 // - ID 13002 // - Secondary 13003 func (p *ApplyClient) DbIdxDoubleStore(ctx context.Context, scope *Uint64, table *Uint64, payer *Uint64, id *Uint64, secondary []byte) (_r int32, _err error) { 13004 var _args519 ApplyDbIdxDoubleStoreArgs 13005 _args519.Scope = scope 13006 _args519.Table = table 13007 _args519.Payer = payer 13008 _args519.ID = id 13009 _args519.Secondary = secondary 13010 var _result521 ApplyDbIdxDoubleStoreResult 13011 var _meta520 thrift.ResponseMeta 13012 _meta520, _err = p.Client_().Call(ctx, "db_idx_double_store", &_args519, &_result521) 13013 p.SetLastResponseMeta_(_meta520) 13014 if _err != nil { 13015 return 13016 } 13017 return _result521.GetSuccess(), nil 13018 } 13019 13020 // Parameters: 13021 // - Iterator 13022 // - Payer 13023 // - Secondary 13024 func (p *ApplyClient) DbIdxDoubleUpdate(ctx context.Context, iterator int32, payer *Uint64, secondary []byte) (_err error) { 13025 var _args522 ApplyDbIdxDoubleUpdateArgs 13026 _args522.Iterator = iterator 13027 _args522.Payer = payer 13028 _args522.Secondary = secondary 13029 var _result524 ApplyDbIdxDoubleUpdateResult 13030 var _meta523 thrift.ResponseMeta 13031 _meta523, _err = p.Client_().Call(ctx, "db_idx_double_update", &_args522, &_result524) 13032 p.SetLastResponseMeta_(_meta523) 13033 if _err != nil { 13034 return 13035 } 13036 return nil 13037 } 13038 13039 // Parameters: 13040 // - Iterator 13041 func (p *ApplyClient) DbIdxDoubleRemove(ctx context.Context, iterator int32) (_err error) { 13042 var _args525 ApplyDbIdxDoubleRemoveArgs 13043 _args525.Iterator = iterator 13044 var _result527 ApplyDbIdxDoubleRemoveResult 13045 var _meta526 thrift.ResponseMeta 13046 _meta526, _err = p.Client_().Call(ctx, "db_idx_double_remove", &_args525, &_result527) 13047 p.SetLastResponseMeta_(_meta526) 13048 if _err != nil { 13049 return 13050 } 13051 return nil 13052 } 13053 13054 // Parameters: 13055 // - Iterator 13056 func (p *ApplyClient) DbIdxDoubleNext(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) { 13057 var _args528 ApplyDbIdxDoubleNextArgs 13058 _args528.Iterator = iterator 13059 var _result530 ApplyDbIdxDoubleNextResult 13060 var _meta529 thrift.ResponseMeta 13061 _meta529, _err = p.Client_().Call(ctx, "db_idx_double_next", &_args528, &_result530) 13062 p.SetLastResponseMeta_(_meta529) 13063 if _err != nil { 13064 return 13065 } 13066 if _ret531 := _result530.GetSuccess(); _ret531 != nil { 13067 return _ret531, nil 13068 } 13069 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx_double_next failed: unknown result") 13070 } 13071 13072 // Parameters: 13073 // - Iterator 13074 func (p *ApplyClient) DbIdxDoublePrevious(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) { 13075 var _args532 ApplyDbIdxDoublePreviousArgs 13076 _args532.Iterator = iterator 13077 var _result534 ApplyDbIdxDoublePreviousResult 13078 var _meta533 thrift.ResponseMeta 13079 _meta533, _err = p.Client_().Call(ctx, "db_idx_double_previous", &_args532, &_result534) 13080 p.SetLastResponseMeta_(_meta533) 13081 if _err != nil { 13082 return 13083 } 13084 if _ret535 := _result534.GetSuccess(); _ret535 != nil { 13085 return _ret535, nil 13086 } 13087 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx_double_previous failed: unknown result") 13088 } 13089 13090 // Parameters: 13091 // - Code 13092 // - Scope 13093 // - Table 13094 // - Primary 13095 func (p *ApplyClient) DbIdxDoubleFindPrimary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, primary *Uint64) (_r *FindPrimaryReturn, _err error) { 13096 var _args536 ApplyDbIdxDoubleFindPrimaryArgs 13097 _args536.Code = code 13098 _args536.Scope = scope 13099 _args536.Table = table 13100 _args536.Primary = primary 13101 var _result538 ApplyDbIdxDoubleFindPrimaryResult 13102 var _meta537 thrift.ResponseMeta 13103 _meta537, _err = p.Client_().Call(ctx, "db_idx_double_find_primary", &_args536, &_result538) 13104 p.SetLastResponseMeta_(_meta537) 13105 if _err != nil { 13106 return 13107 } 13108 if _ret539 := _result538.GetSuccess(); _ret539 != nil { 13109 return _ret539, nil 13110 } 13111 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx_double_find_primary failed: unknown result") 13112 } 13113 13114 // Parameters: 13115 // - Code 13116 // - Scope 13117 // - Table 13118 // - Secondary 13119 func (p *ApplyClient) DbIdxDoubleFindSecondary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte) (_r *FindSecondaryReturn, _err error) { 13120 var _args540 ApplyDbIdxDoubleFindSecondaryArgs 13121 _args540.Code = code 13122 _args540.Scope = scope 13123 _args540.Table = table 13124 _args540.Secondary = secondary 13125 var _result542 ApplyDbIdxDoubleFindSecondaryResult 13126 var _meta541 thrift.ResponseMeta 13127 _meta541, _err = p.Client_().Call(ctx, "db_idx_double_find_secondary", &_args540, &_result542) 13128 p.SetLastResponseMeta_(_meta541) 13129 if _err != nil { 13130 return 13131 } 13132 if _ret543 := _result542.GetSuccess(); _ret543 != nil { 13133 return _ret543, nil 13134 } 13135 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx_double_find_secondary failed: unknown result") 13136 } 13137 13138 // Parameters: 13139 // - Code 13140 // - Scope 13141 // - Table 13142 // - Secondary 13143 // - Primary 13144 func (p *ApplyClient) DbIdxDoubleLowerbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) { 13145 var _args544 ApplyDbIdxDoubleLowerboundArgs 13146 _args544.Code = code 13147 _args544.Scope = scope 13148 _args544.Table = table 13149 _args544.Secondary = secondary 13150 _args544.Primary = primary 13151 var _result546 ApplyDbIdxDoubleLowerboundResult 13152 var _meta545 thrift.ResponseMeta 13153 _meta545, _err = p.Client_().Call(ctx, "db_idx_double_lowerbound", &_args544, &_result546) 13154 p.SetLastResponseMeta_(_meta545) 13155 if _err != nil { 13156 return 13157 } 13158 if _ret547 := _result546.GetSuccess(); _ret547 != nil { 13159 return _ret547, nil 13160 } 13161 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx_double_lowerbound failed: unknown result") 13162 } 13163 13164 // Parameters: 13165 // - Code 13166 // - Scope 13167 // - Table 13168 // - Secondary 13169 // - Primary 13170 func (p *ApplyClient) DbIdxDoubleUpperbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) { 13171 var _args548 ApplyDbIdxDoubleUpperboundArgs 13172 _args548.Code = code 13173 _args548.Scope = scope 13174 _args548.Table = table 13175 _args548.Secondary = secondary 13176 _args548.Primary = primary 13177 var _result550 ApplyDbIdxDoubleUpperboundResult 13178 var _meta549 thrift.ResponseMeta 13179 _meta549, _err = p.Client_().Call(ctx, "db_idx_double_upperbound", &_args548, &_result550) 13180 p.SetLastResponseMeta_(_meta549) 13181 if _err != nil { 13182 return 13183 } 13184 if _ret551 := _result550.GetSuccess(); _ret551 != nil { 13185 return _ret551, nil 13186 } 13187 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx_double_upperbound failed: unknown result") 13188 } 13189 13190 // Parameters: 13191 // - Code 13192 // - Scope 13193 // - Table 13194 func (p *ApplyClient) DbIdxDoubleEnd(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64) (_r int32, _err error) { 13195 var _args552 ApplyDbIdxDoubleEndArgs 13196 _args552.Code = code 13197 _args552.Scope = scope 13198 _args552.Table = table 13199 var _result554 ApplyDbIdxDoubleEndResult 13200 var _meta553 thrift.ResponseMeta 13201 _meta553, _err = p.Client_().Call(ctx, "db_idx_double_end", &_args552, &_result554) 13202 p.SetLastResponseMeta_(_meta553) 13203 if _err != nil { 13204 return 13205 } 13206 return _result554.GetSuccess(), nil 13207 } 13208 13209 // Parameters: 13210 // - Scope 13211 // - Table 13212 // - Payer 13213 // - ID 13214 // - Secondary 13215 func (p *ApplyClient) DbIdxLongDoubleStore(ctx context.Context, scope *Uint64, table *Uint64, payer *Uint64, id *Uint64, secondary []byte) (_r int32, _err error) { 13216 var _args555 ApplyDbIdxLongDoubleStoreArgs 13217 _args555.Scope = scope 13218 _args555.Table = table 13219 _args555.Payer = payer 13220 _args555.ID = id 13221 _args555.Secondary = secondary 13222 var _result557 ApplyDbIdxLongDoubleStoreResult 13223 var _meta556 thrift.ResponseMeta 13224 _meta556, _err = p.Client_().Call(ctx, "db_idx_long_double_store", &_args555, &_result557) 13225 p.SetLastResponseMeta_(_meta556) 13226 if _err != nil { 13227 return 13228 } 13229 return _result557.GetSuccess(), nil 13230 } 13231 13232 // Parameters: 13233 // - Iterator 13234 // - Payer 13235 // - Secondary 13236 func (p *ApplyClient) DbIdxLongDoubleUpdate(ctx context.Context, iterator int32, payer *Uint64, secondary []byte) (_err error) { 13237 var _args558 ApplyDbIdxLongDoubleUpdateArgs 13238 _args558.Iterator = iterator 13239 _args558.Payer = payer 13240 _args558.Secondary = secondary 13241 var _result560 ApplyDbIdxLongDoubleUpdateResult 13242 var _meta559 thrift.ResponseMeta 13243 _meta559, _err = p.Client_().Call(ctx, "db_idx_long_double_update", &_args558, &_result560) 13244 p.SetLastResponseMeta_(_meta559) 13245 if _err != nil { 13246 return 13247 } 13248 return nil 13249 } 13250 13251 // Parameters: 13252 // - Iterator 13253 func (p *ApplyClient) DbIdxLongDoubleRemove(ctx context.Context, iterator int32) (_err error) { 13254 var _args561 ApplyDbIdxLongDoubleRemoveArgs 13255 _args561.Iterator = iterator 13256 var _result563 ApplyDbIdxLongDoubleRemoveResult 13257 var _meta562 thrift.ResponseMeta 13258 _meta562, _err = p.Client_().Call(ctx, "db_idx_long_double_remove", &_args561, &_result563) 13259 p.SetLastResponseMeta_(_meta562) 13260 if _err != nil { 13261 return 13262 } 13263 return nil 13264 } 13265 13266 // Parameters: 13267 // - Iterator 13268 func (p *ApplyClient) DbIdxLongDoubleNext(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) { 13269 var _args564 ApplyDbIdxLongDoubleNextArgs 13270 _args564.Iterator = iterator 13271 var _result566 ApplyDbIdxLongDoubleNextResult 13272 var _meta565 thrift.ResponseMeta 13273 _meta565, _err = p.Client_().Call(ctx, "db_idx_long_double_next", &_args564, &_result566) 13274 p.SetLastResponseMeta_(_meta565) 13275 if _err != nil { 13276 return 13277 } 13278 if _ret567 := _result566.GetSuccess(); _ret567 != nil { 13279 return _ret567, nil 13280 } 13281 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx_long_double_next failed: unknown result") 13282 } 13283 13284 // Parameters: 13285 // - Iterator 13286 func (p *ApplyClient) DbIdxLongDoublePrevious(ctx context.Context, iterator int32) (_r *NextPreviousReturn, _err error) { 13287 var _args568 ApplyDbIdxLongDoublePreviousArgs 13288 _args568.Iterator = iterator 13289 var _result570 ApplyDbIdxLongDoublePreviousResult 13290 var _meta569 thrift.ResponseMeta 13291 _meta569, _err = p.Client_().Call(ctx, "db_idx_long_double_previous", &_args568, &_result570) 13292 p.SetLastResponseMeta_(_meta569) 13293 if _err != nil { 13294 return 13295 } 13296 if _ret571 := _result570.GetSuccess(); _ret571 != nil { 13297 return _ret571, nil 13298 } 13299 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx_long_double_previous failed: unknown result") 13300 } 13301 13302 // Parameters: 13303 // - Code 13304 // - Scope 13305 // - Table 13306 // - Primary 13307 func (p *ApplyClient) DbIdxLongDoubleFindPrimary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, primary *Uint64) (_r *FindPrimaryReturn, _err error) { 13308 var _args572 ApplyDbIdxLongDoubleFindPrimaryArgs 13309 _args572.Code = code 13310 _args572.Scope = scope 13311 _args572.Table = table 13312 _args572.Primary = primary 13313 var _result574 ApplyDbIdxLongDoubleFindPrimaryResult 13314 var _meta573 thrift.ResponseMeta 13315 _meta573, _err = p.Client_().Call(ctx, "db_idx_long_double_find_primary", &_args572, &_result574) 13316 p.SetLastResponseMeta_(_meta573) 13317 if _err != nil { 13318 return 13319 } 13320 if _ret575 := _result574.GetSuccess(); _ret575 != nil { 13321 return _ret575, nil 13322 } 13323 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx_long_double_find_primary failed: unknown result") 13324 } 13325 13326 // Parameters: 13327 // - Code 13328 // - Scope 13329 // - Table 13330 // - Secondary 13331 func (p *ApplyClient) DbIdxLongDoubleFindSecondary(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte) (_r *FindSecondaryReturn, _err error) { 13332 var _args576 ApplyDbIdxLongDoubleFindSecondaryArgs 13333 _args576.Code = code 13334 _args576.Scope = scope 13335 _args576.Table = table 13336 _args576.Secondary = secondary 13337 var _result578 ApplyDbIdxLongDoubleFindSecondaryResult 13338 var _meta577 thrift.ResponseMeta 13339 _meta577, _err = p.Client_().Call(ctx, "db_idx_long_double_find_secondary", &_args576, &_result578) 13340 p.SetLastResponseMeta_(_meta577) 13341 if _err != nil { 13342 return 13343 } 13344 if _ret579 := _result578.GetSuccess(); _ret579 != nil { 13345 return _ret579, nil 13346 } 13347 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx_long_double_find_secondary failed: unknown result") 13348 } 13349 13350 // Parameters: 13351 // - Code 13352 // - Scope 13353 // - Table 13354 // - Secondary 13355 // - Primary 13356 func (p *ApplyClient) DbIdxLongDoubleLowerbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) { 13357 var _args580 ApplyDbIdxLongDoubleLowerboundArgs 13358 _args580.Code = code 13359 _args580.Scope = scope 13360 _args580.Table = table 13361 _args580.Secondary = secondary 13362 _args580.Primary = primary 13363 var _result582 ApplyDbIdxLongDoubleLowerboundResult 13364 var _meta581 thrift.ResponseMeta 13365 _meta581, _err = p.Client_().Call(ctx, "db_idx_long_double_lowerbound", &_args580, &_result582) 13366 p.SetLastResponseMeta_(_meta581) 13367 if _err != nil { 13368 return 13369 } 13370 if _ret583 := _result582.GetSuccess(); _ret583 != nil { 13371 return _ret583, nil 13372 } 13373 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx_long_double_lowerbound failed: unknown result") 13374 } 13375 13376 // Parameters: 13377 // - Code 13378 // - Scope 13379 // - Table 13380 // - Secondary 13381 // - Primary 13382 func (p *ApplyClient) DbIdxLongDoubleUpperbound(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64, secondary []byte, primary *Uint64) (_r *LowerBoundUpperBoundReturn, _err error) { 13383 var _args584 ApplyDbIdxLongDoubleUpperboundArgs 13384 _args584.Code = code 13385 _args584.Scope = scope 13386 _args584.Table = table 13387 _args584.Secondary = secondary 13388 _args584.Primary = primary 13389 var _result586 ApplyDbIdxLongDoubleUpperboundResult 13390 var _meta585 thrift.ResponseMeta 13391 _meta585, _err = p.Client_().Call(ctx, "db_idx_long_double_upperbound", &_args584, &_result586) 13392 p.SetLastResponseMeta_(_meta585) 13393 if _err != nil { 13394 return 13395 } 13396 if _ret587 := _result586.GetSuccess(); _ret587 != nil { 13397 return _ret587, nil 13398 } 13399 return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "db_idx_long_double_upperbound failed: unknown result") 13400 } 13401 13402 // Parameters: 13403 // - Code 13404 // - Scope 13405 // - Table 13406 func (p *ApplyClient) DbIdxLongDoubleEnd(ctx context.Context, code *Uint64, scope *Uint64, table *Uint64) (_r int32, _err error) { 13407 var _args588 ApplyDbIdxLongDoubleEndArgs 13408 _args588.Code = code 13409 _args588.Scope = scope 13410 _args588.Table = table 13411 var _result590 ApplyDbIdxLongDoubleEndResult 13412 var _meta589 thrift.ResponseMeta 13413 _meta589, _err = p.Client_().Call(ctx, "db_idx_long_double_end", &_args588, &_result590) 13414 p.SetLastResponseMeta_(_meta589) 13415 if _err != nil { 13416 return 13417 } 13418 return _result590.GetSuccess(), nil 13419 } 13420 13421 // Parameters: 13422 // - Data 13423 func (p *ApplyClient) SetActionReturnValue(ctx context.Context, data []byte) (_err error) { 13424 var _args591 ApplySetActionReturnValueArgs 13425 _args591.Data = data 13426 var _result593 ApplySetActionReturnValueResult 13427 var _meta592 thrift.ResponseMeta 13428 _meta592, _err = p.Client_().Call(ctx, "set_action_return_value", &_args591, &_result593) 13429 p.SetLastResponseMeta_(_meta592) 13430 if _err != nil { 13431 return 13432 } 13433 return nil 13434 } 13435 13436 // Parameters: 13437 // - Account 13438 // - StructVersion 13439 func (p *ApplyClient) GetCodeHash(ctx context.Context, account *Uint64, struct_version int64) (_r []byte, _err error) { 13440 var _args594 ApplyGetCodeHashArgs 13441 _args594.Account = account 13442 _args594.StructVersion = struct_version 13443 var _result596 ApplyGetCodeHashResult 13444 var _meta595 thrift.ResponseMeta 13445 _meta595, _err = p.Client_().Call(ctx, "get_code_hash", &_args594, &_result596) 13446 p.SetLastResponseMeta_(_meta595) 13447 if _err != nil { 13448 return 13449 } 13450 return _result596.GetSuccess(), nil 13451 } 13452 13453 func (p *ApplyClient) GetBlockNum(ctx context.Context) (_r int64, _err error) { 13454 var _args597 ApplyGetBlockNumArgs 13455 var _result599 ApplyGetBlockNumResult 13456 var _meta598 thrift.ResponseMeta 13457 _meta598, _err = p.Client_().Call(ctx, "get_block_num", &_args597, &_result599) 13458 p.SetLastResponseMeta_(_meta598) 13459 if _err != nil { 13460 return 13461 } 13462 return _result599.GetSuccess(), nil 13463 } 13464 13465 // Parameters: 13466 // - Data 13467 // - Keccak 13468 func (p *ApplyClient) Sha3(ctx context.Context, data []byte, keccak int32) (_r []byte, _err error) { 13469 var _args600 ApplySha3Args 13470 _args600.Data = data 13471 _args600.Keccak = keccak 13472 var _result602 ApplySha3Result 13473 var _meta601 thrift.ResponseMeta 13474 _meta601, _err = p.Client_().Call(ctx, "sha3", &_args600, &_result602) 13475 p.SetLastResponseMeta_(_meta601) 13476 if _err != nil { 13477 return 13478 } 13479 return _result602.GetSuccess(), nil 13480 } 13481 13482 // Parameters: 13483 // - Rounds 13484 // - State 13485 // - Msg 13486 // - T0Offset 13487 // - T1Offset 13488 // - Final 13489 func (p *ApplyClient) Blake2F(ctx context.Context, rounds int64, state []byte, msg []byte, t0_offset []byte, t1_offset []byte, final int32) (_r []byte, _err error) { 13490 var _args603 ApplyBlake2FArgs 13491 _args603.Rounds = rounds 13492 _args603.State = state 13493 _args603.Msg = msg 13494 _args603.T0Offset = t0_offset 13495 _args603.T1Offset = t1_offset 13496 _args603.Final = final 13497 var _result605 ApplyBlake2FResult 13498 var _meta604 thrift.ResponseMeta 13499 _meta604, _err = p.Client_().Call(ctx, "blake2_f", &_args603, &_result605) 13500 p.SetLastResponseMeta_(_meta604) 13501 if _err != nil { 13502 return 13503 } 13504 return _result605.GetSuccess(), nil 13505 } 13506 13507 // Parameters: 13508 // - Sig 13509 // - Dig 13510 func (p *ApplyClient) K1Recover(ctx context.Context, sig []byte, dig []byte) (_r []byte, _err error) { 13511 var _args606 ApplyK1RecoverArgs 13512 _args606.Sig = sig 13513 _args606.Dig = dig 13514 var _result608 ApplyK1RecoverResult 13515 var _meta607 thrift.ResponseMeta 13516 _meta607, _err = p.Client_().Call(ctx, "k1_recover", &_args606, &_result608) 13517 p.SetLastResponseMeta_(_meta607) 13518 if _err != nil { 13519 return 13520 } 13521 return _result608.GetSuccess(), nil 13522 } 13523 13524 // Parameters: 13525 // - Op1 13526 // - Op2 13527 func (p *ApplyClient) AltBn128Add(ctx context.Context, op1 []byte, op2 []byte) (_r []byte, _err error) { 13528 var _args609 ApplyAltBn128AddArgs 13529 _args609.Op1 = op1 13530 _args609.Op2 = op2 13531 var _result611 ApplyAltBn128AddResult 13532 var _meta610 thrift.ResponseMeta 13533 _meta610, _err = p.Client_().Call(ctx, "alt_bn128_add", &_args609, &_result611) 13534 p.SetLastResponseMeta_(_meta610) 13535 if _err != nil { 13536 return 13537 } 13538 return _result611.GetSuccess(), nil 13539 } 13540 13541 // Parameters: 13542 // - G1 13543 // - Scalar 13544 func (p *ApplyClient) AltBn128Mul(ctx context.Context, g1 []byte, scalar []byte) (_r []byte, _err error) { 13545 var _args612 ApplyAltBn128MulArgs 13546 _args612.G1 = g1 13547 _args612.Scalar = scalar 13548 var _result614 ApplyAltBn128MulResult 13549 var _meta613 thrift.ResponseMeta 13550 _meta613, _err = p.Client_().Call(ctx, "alt_bn128_mul", &_args612, &_result614) 13551 p.SetLastResponseMeta_(_meta613) 13552 if _err != nil { 13553 return 13554 } 13555 return _result614.GetSuccess(), nil 13556 } 13557 13558 // Parameters: 13559 // - Pairs 13560 func (p *ApplyClient) AltBn128Pair(ctx context.Context, pairs []byte) (_r int32, _err error) { 13561 var _args615 ApplyAltBn128PairArgs 13562 _args615.Pairs = pairs 13563 var _result617 ApplyAltBn128PairResult 13564 var _meta616 thrift.ResponseMeta 13565 _meta616, _err = p.Client_().Call(ctx, "alt_bn128_pair", &_args615, &_result617) 13566 p.SetLastResponseMeta_(_meta616) 13567 if _err != nil { 13568 return 13569 } 13570 return _result617.GetSuccess(), nil 13571 } 13572 13573 // Parameters: 13574 // - Base 13575 // - Exp 13576 // - Mod 13577 func (p *ApplyClient) ModExp(ctx context.Context, base []byte, exp []byte, mod []byte) (_r []byte, _err error) { 13578 var _args618 ApplyModExpArgs 13579 _args618.Base = base 13580 _args618.Exp = exp 13581 _args618.Mod = mod 13582 var _result620 ApplyModExpResult 13583 var _meta619 thrift.ResponseMeta 13584 _meta619, _err = p.Client_().Call(ctx, "mod_exp", &_args618, &_result620) 13585 p.SetLastResponseMeta_(_meta619) 13586 if _err != nil { 13587 return 13588 } 13589 return _result620.GetSuccess(), nil 13590 } 13591 13592 type ApplyProcessor struct { 13593 processorMap map[string]thrift.TProcessorFunction 13594 handler Apply 13595 } 13596 13597 func (p *ApplyProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { 13598 p.processorMap[key] = processor 13599 } 13600 13601 func (p *ApplyProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { 13602 processor, ok = p.processorMap[key] 13603 return processor, ok 13604 } 13605 13606 func (p *ApplyProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { 13607 return p.processorMap 13608 } 13609 13610 func NewApplyProcessor(handler Apply) *ApplyProcessor { 13611 13612 self621 := &ApplyProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} 13613 self621.processorMap["end_apply"] = &applyProcessorEndApply{handler:handler} 13614 self621.processorMap["get_active_producers"] = &applyProcessorGetActiveProducers{handler:handler} 13615 self621.processorMap["get_resource_limits"] = &applyProcessorGetResourceLimits{handler:handler} 13616 self621.processorMap["set_resource_limits"] = &applyProcessorSetResourceLimits{handler:handler} 13617 self621.processorMap["set_proposed_producers"] = &applyProcessorSetProposedProducers{handler:handler} 13618 self621.processorMap["set_proposed_producers_ex"] = &applyProcessorSetProposedProducersEx{handler:handler} 13619 self621.processorMap["is_privileged"] = &applyProcessorIsPrivileged{handler:handler} 13620 self621.processorMap["set_privileged"] = &applyProcessorSetPrivileged{handler:handler} 13621 self621.processorMap["set_blockchain_parameters_packed"] = &applyProcessorSetBlockchainParametersPacked{handler:handler} 13622 self621.processorMap["get_blockchain_parameters_packed"] = &applyProcessorGetBlockchainParametersPacked{handler:handler} 13623 self621.processorMap["preactivate_feature"] = &applyProcessorPreactivateFeature{handler:handler} 13624 self621.processorMap["check_transaction_authorization"] = &applyProcessorCheckTransactionAuthorization{handler:handler} 13625 self621.processorMap["check_permission_authorization"] = &applyProcessorCheckPermissionAuthorization{handler:handler} 13626 self621.processorMap["get_permission_last_used"] = &applyProcessorGetPermissionLastUsed{handler:handler} 13627 self621.processorMap["get_account_creation_time"] = &applyProcessorGetAccountCreationTime{handler:handler} 13628 self621.processorMap["prints"] = &applyProcessorPrints{handler:handler} 13629 self621.processorMap["prints_l"] = &applyProcessorPrintsL{handler:handler} 13630 self621.processorMap["printi"] = &applyProcessorPrinti{handler:handler} 13631 self621.processorMap["printui"] = &applyProcessorPrintui{handler:handler} 13632 self621.processorMap["printi128"] = &applyProcessorPrinti128{handler:handler} 13633 self621.processorMap["printui128"] = &applyProcessorPrintui128{handler:handler} 13634 self621.processorMap["printsf"] = &applyProcessorPrintsf{handler:handler} 13635 self621.processorMap["printdf"] = &applyProcessorPrintdf{handler:handler} 13636 self621.processorMap["printqf"] = &applyProcessorPrintqf{handler:handler} 13637 self621.processorMap["printn"] = &applyProcessorPrintn{handler:handler} 13638 self621.processorMap["printhex"] = &applyProcessorPrinthex{handler:handler} 13639 self621.processorMap["action_data_size"] = &applyProcessorActionDataSize{handler:handler} 13640 self621.processorMap["read_action_data"] = &applyProcessorReadActionData{handler:handler} 13641 self621.processorMap["require_recipient"] = &applyProcessorRequireRecipient{handler:handler} 13642 self621.processorMap["require_auth"] = &applyProcessorRequireAuth{handler:handler} 13643 self621.processorMap["has_auth"] = &applyProcessorHasAuth{handler:handler} 13644 self621.processorMap["require_auth2"] = &applyProcessorRequireAuth2{handler:handler} 13645 self621.processorMap["is_account"] = &applyProcessorIsAccount{handler:handler} 13646 self621.processorMap["send_inline"] = &applyProcessorSendInline{handler:handler} 13647 self621.processorMap["send_context_free_inline"] = &applyProcessorSendContextFreeInline{handler:handler} 13648 self621.processorMap["publication_time"] = &applyProcessorPublicationTime{handler:handler} 13649 self621.processorMap["current_receiver"] = &applyProcessorCurrentReceiver{handler:handler} 13650 self621.processorMap["eosio_assert"] = &applyProcessorEosioAssert{handler:handler} 13651 self621.processorMap["eosio_assert_message"] = &applyProcessorEosioAssertMessage{handler:handler} 13652 self621.processorMap["eosio_assert_code"] = &applyProcessorEosioAssertCode{handler:handler} 13653 self621.processorMap["eosio_exit"] = &applyProcessorEosioExit{handler:handler} 13654 self621.processorMap["current_time"] = &applyProcessorCurrentTime{handler:handler} 13655 self621.processorMap["is_feature_activated"] = &applyProcessorIsFeatureActivated{handler:handler} 13656 self621.processorMap["get_sender"] = &applyProcessorGetSender{handler:handler} 13657 self621.processorMap["assert_sha256"] = &applyProcessorAssertSha256{handler:handler} 13658 self621.processorMap["assert_sha1"] = &applyProcessorAssertSha1{handler:handler} 13659 self621.processorMap["assert_sha512"] = &applyProcessorAssertSha512{handler:handler} 13660 self621.processorMap["assert_ripemd160"] = &applyProcessorAssertRipemd160{handler:handler} 13661 self621.processorMap["sha256"] = &applyProcessorSha256{handler:handler} 13662 self621.processorMap["sha1"] = &applyProcessorSha1{handler:handler} 13663 self621.processorMap["sha512"] = &applyProcessorSha512{handler:handler} 13664 self621.processorMap["ripemd160"] = &applyProcessorRipemd160{handler:handler} 13665 self621.processorMap["recover_key"] = &applyProcessorRecoverKey{handler:handler} 13666 self621.processorMap["assert_recover_key"] = &applyProcessorAssertRecoverKey{handler:handler} 13667 self621.processorMap["send_deferred"] = &applyProcessorSendDeferred{handler:handler} 13668 self621.processorMap["cancel_deferred"] = &applyProcessorCancelDeferred{handler:handler} 13669 self621.processorMap["read_transaction"] = &applyProcessorReadTransaction{handler:handler} 13670 self621.processorMap["transaction_size"] = &applyProcessorTransactionSize{handler:handler} 13671 self621.processorMap["tapos_block_num"] = &applyProcessorTaposBlockNum{handler:handler} 13672 self621.processorMap["tapos_block_prefix"] = &applyProcessorTaposBlockPrefix{handler:handler} 13673 self621.processorMap["expiration"] = &applyProcessorExpiration{handler:handler} 13674 self621.processorMap["get_action"] = &applyProcessorGetAction{handler:handler} 13675 self621.processorMap["get_context_free_data"] = &applyProcessorGetContextFreeData{handler:handler} 13676 self621.processorMap["db_store_i64"] = &applyProcessorDbStoreI64{handler:handler} 13677 self621.processorMap["db_update_i64"] = &applyProcessorDbUpdateI64{handler:handler} 13678 self621.processorMap["db_remove_i64"] = &applyProcessorDbRemoveI64{handler:handler} 13679 self621.processorMap["db_get_i64"] = &applyProcessorDbGetI64{handler:handler} 13680 self621.processorMap["db_next_i64"] = &applyProcessorDbNextI64{handler:handler} 13681 self621.processorMap["db_previous_i64"] = &applyProcessorDbPreviousI64{handler:handler} 13682 self621.processorMap["db_find_i64"] = &applyProcessorDbFindI64{handler:handler} 13683 self621.processorMap["db_lowerbound_i64"] = &applyProcessorDbLowerboundI64{handler:handler} 13684 self621.processorMap["db_upperbound_i64"] = &applyProcessorDbUpperboundI64{handler:handler} 13685 self621.processorMap["db_end_i64"] = &applyProcessorDbEndI64{handler:handler} 13686 self621.processorMap["db_idx64_store"] = &applyProcessorDbIdx64Store{handler:handler} 13687 self621.processorMap["db_idx64_update"] = &applyProcessorDbIdx64Update{handler:handler} 13688 self621.processorMap["db_idx64_remove"] = &applyProcessorDbIdx64Remove{handler:handler} 13689 self621.processorMap["db_idx64_next"] = &applyProcessorDbIdx64Next{handler:handler} 13690 self621.processorMap["db_idx64_previous"] = &applyProcessorDbIdx64Previous{handler:handler} 13691 self621.processorMap["db_idx64_find_primary"] = &applyProcessorDbIdx64FindPrimary{handler:handler} 13692 self621.processorMap["db_idx64_find_secondary"] = &applyProcessorDbIdx64FindSecondary{handler:handler} 13693 self621.processorMap["db_idx64_lowerbound"] = &applyProcessorDbIdx64Lowerbound{handler:handler} 13694 self621.processorMap["db_idx64_upperbound"] = &applyProcessorDbIdx64Upperbound{handler:handler} 13695 self621.processorMap["db_idx64_end"] = &applyProcessorDbIdx64End{handler:handler} 13696 self621.processorMap["db_idx128_store"] = &applyProcessorDbIdx128Store{handler:handler} 13697 self621.processorMap["db_idx128_update"] = &applyProcessorDbIdx128Update{handler:handler} 13698 self621.processorMap["db_idx128_remove"] = &applyProcessorDbIdx128Remove{handler:handler} 13699 self621.processorMap["db_idx128_next"] = &applyProcessorDbIdx128Next{handler:handler} 13700 self621.processorMap["db_idx128_previous"] = &applyProcessorDbIdx128Previous{handler:handler} 13701 self621.processorMap["db_idx128_find_primary"] = &applyProcessorDbIdx128FindPrimary{handler:handler} 13702 self621.processorMap["db_idx128_find_secondary"] = &applyProcessorDbIdx128FindSecondary{handler:handler} 13703 self621.processorMap["db_idx128_lowerbound"] = &applyProcessorDbIdx128Lowerbound{handler:handler} 13704 self621.processorMap["db_idx128_upperbound"] = &applyProcessorDbIdx128Upperbound{handler:handler} 13705 self621.processorMap["db_idx128_end"] = &applyProcessorDbIdx128End{handler:handler} 13706 self621.processorMap["db_idx256_store"] = &applyProcessorDbIdx256Store{handler:handler} 13707 self621.processorMap["db_idx256_update"] = &applyProcessorDbIdx256Update{handler:handler} 13708 self621.processorMap["db_idx256_remove"] = &applyProcessorDbIdx256Remove{handler:handler} 13709 self621.processorMap["db_idx256_next"] = &applyProcessorDbIdx256Next{handler:handler} 13710 self621.processorMap["db_idx256_previous"] = &applyProcessorDbIdx256Previous{handler:handler} 13711 self621.processorMap["db_idx256_find_primary"] = &applyProcessorDbIdx256FindPrimary{handler:handler} 13712 self621.processorMap["db_idx256_find_secondary"] = &applyProcessorDbIdx256FindSecondary{handler:handler} 13713 self621.processorMap["db_idx256_lowerbound"] = &applyProcessorDbIdx256Lowerbound{handler:handler} 13714 self621.processorMap["db_idx256_upperbound"] = &applyProcessorDbIdx256Upperbound{handler:handler} 13715 self621.processorMap["db_idx256_end"] = &applyProcessorDbIdx256End{handler:handler} 13716 self621.processorMap["db_idx_double_store"] = &applyProcessorDbIdxDoubleStore{handler:handler} 13717 self621.processorMap["db_idx_double_update"] = &applyProcessorDbIdxDoubleUpdate{handler:handler} 13718 self621.processorMap["db_idx_double_remove"] = &applyProcessorDbIdxDoubleRemove{handler:handler} 13719 self621.processorMap["db_idx_double_next"] = &applyProcessorDbIdxDoubleNext{handler:handler} 13720 self621.processorMap["db_idx_double_previous"] = &applyProcessorDbIdxDoublePrevious{handler:handler} 13721 self621.processorMap["db_idx_double_find_primary"] = &applyProcessorDbIdxDoubleFindPrimary{handler:handler} 13722 self621.processorMap["db_idx_double_find_secondary"] = &applyProcessorDbIdxDoubleFindSecondary{handler:handler} 13723 self621.processorMap["db_idx_double_lowerbound"] = &applyProcessorDbIdxDoubleLowerbound{handler:handler} 13724 self621.processorMap["db_idx_double_upperbound"] = &applyProcessorDbIdxDoubleUpperbound{handler:handler} 13725 self621.processorMap["db_idx_double_end"] = &applyProcessorDbIdxDoubleEnd{handler:handler} 13726 self621.processorMap["db_idx_long_double_store"] = &applyProcessorDbIdxLongDoubleStore{handler:handler} 13727 self621.processorMap["db_idx_long_double_update"] = &applyProcessorDbIdxLongDoubleUpdate{handler:handler} 13728 self621.processorMap["db_idx_long_double_remove"] = &applyProcessorDbIdxLongDoubleRemove{handler:handler} 13729 self621.processorMap["db_idx_long_double_next"] = &applyProcessorDbIdxLongDoubleNext{handler:handler} 13730 self621.processorMap["db_idx_long_double_previous"] = &applyProcessorDbIdxLongDoublePrevious{handler:handler} 13731 self621.processorMap["db_idx_long_double_find_primary"] = &applyProcessorDbIdxLongDoubleFindPrimary{handler:handler} 13732 self621.processorMap["db_idx_long_double_find_secondary"] = &applyProcessorDbIdxLongDoubleFindSecondary{handler:handler} 13733 self621.processorMap["db_idx_long_double_lowerbound"] = &applyProcessorDbIdxLongDoubleLowerbound{handler:handler} 13734 self621.processorMap["db_idx_long_double_upperbound"] = &applyProcessorDbIdxLongDoubleUpperbound{handler:handler} 13735 self621.processorMap["db_idx_long_double_end"] = &applyProcessorDbIdxLongDoubleEnd{handler:handler} 13736 self621.processorMap["set_action_return_value"] = &applyProcessorSetActionReturnValue{handler:handler} 13737 self621.processorMap["get_code_hash"] = &applyProcessorGetCodeHash{handler:handler} 13738 self621.processorMap["get_block_num"] = &applyProcessorGetBlockNum{handler:handler} 13739 self621.processorMap["sha3"] = &applyProcessorSha3{handler:handler} 13740 self621.processorMap["blake2_f"] = &applyProcessorBlake2F{handler:handler} 13741 self621.processorMap["k1_recover"] = &applyProcessorK1Recover{handler:handler} 13742 self621.processorMap["alt_bn128_add"] = &applyProcessorAltBn128Add{handler:handler} 13743 self621.processorMap["alt_bn128_mul"] = &applyProcessorAltBn128Mul{handler:handler} 13744 self621.processorMap["alt_bn128_pair"] = &applyProcessorAltBn128Pair{handler:handler} 13745 self621.processorMap["mod_exp"] = &applyProcessorModExp{handler:handler} 13746 return self621 13747 } 13748 13749 func (p *ApplyProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 13750 name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) 13751 if err2 != nil { return false, thrift.WrapTException(err2) } 13752 if processor, ok := p.GetProcessorFunction(name); ok { 13753 return processor.Process(ctx, seqId, iprot, oprot) 13754 } 13755 iprot.Skip(ctx, thrift.STRUCT) 13756 iprot.ReadMessageEnd(ctx) 13757 x622 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) 13758 oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) 13759 x622.Write(ctx, oprot) 13760 oprot.WriteMessageEnd(ctx) 13761 oprot.Flush(ctx) 13762 return false, x622 13763 13764 } 13765 13766 type applyProcessorEndApply struct { 13767 handler Apply 13768 } 13769 13770 func (p *applyProcessorEndApply) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 13771 args := ApplyEndApplyArgs{} 13772 var err2 error 13773 if err2 = args.Read(ctx, iprot); err2 != nil { 13774 iprot.ReadMessageEnd(ctx) 13775 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 13776 oprot.WriteMessageBegin(ctx, "end_apply", thrift.EXCEPTION, seqId) 13777 x.Write(ctx, oprot) 13778 oprot.WriteMessageEnd(ctx) 13779 oprot.Flush(ctx) 13780 return false, thrift.WrapTException(err2) 13781 } 13782 iprot.ReadMessageEnd(ctx) 13783 13784 tickerCancel := func() {} 13785 // Start a goroutine to do server side connectivity check. 13786 if thrift.ServerConnectivityCheckInterval > 0 { 13787 var cancel context.CancelFunc 13788 ctx, cancel = context.WithCancel(ctx) 13789 defer cancel() 13790 var tickerCtx context.Context 13791 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 13792 defer tickerCancel() 13793 go func(ctx context.Context, cancel context.CancelFunc) { 13794 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 13795 defer ticker.Stop() 13796 for { 13797 select { 13798 case <-ctx.Done(): 13799 return 13800 case <-ticker.C: 13801 if !iprot.Transport().IsOpen() { 13802 cancel() 13803 return 13804 } 13805 } 13806 } 13807 }(tickerCtx, cancel) 13808 } 13809 13810 result := ApplyEndApplyResult{} 13811 var retval int32 13812 if retval, err2 = p.handler.EndApply(ctx); err2 != nil { 13813 tickerCancel() 13814 if err2 == thrift.ErrAbandonRequest { 13815 return false, thrift.WrapTException(err2) 13816 } 13817 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing end_apply: " + err2.Error()) 13818 oprot.WriteMessageBegin(ctx, "end_apply", thrift.EXCEPTION, seqId) 13819 x.Write(ctx, oprot) 13820 oprot.WriteMessageEnd(ctx) 13821 oprot.Flush(ctx) 13822 return true, thrift.WrapTException(err2) 13823 } else { 13824 result.Success = &retval 13825 } 13826 tickerCancel() 13827 if err2 = oprot.WriteMessageBegin(ctx, "end_apply", thrift.REPLY, seqId); err2 != nil { 13828 err = thrift.WrapTException(err2) 13829 } 13830 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 13831 err = thrift.WrapTException(err2) 13832 } 13833 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 13834 err = thrift.WrapTException(err2) 13835 } 13836 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 13837 err = thrift.WrapTException(err2) 13838 } 13839 if err != nil { 13840 return 13841 } 13842 return true, err 13843 } 13844 13845 type applyProcessorGetActiveProducers struct { 13846 handler Apply 13847 } 13848 13849 func (p *applyProcessorGetActiveProducers) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 13850 args := ApplyGetActiveProducersArgs{} 13851 var err2 error 13852 if err2 = args.Read(ctx, iprot); err2 != nil { 13853 iprot.ReadMessageEnd(ctx) 13854 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 13855 oprot.WriteMessageBegin(ctx, "get_active_producers", thrift.EXCEPTION, seqId) 13856 x.Write(ctx, oprot) 13857 oprot.WriteMessageEnd(ctx) 13858 oprot.Flush(ctx) 13859 return false, thrift.WrapTException(err2) 13860 } 13861 iprot.ReadMessageEnd(ctx) 13862 13863 tickerCancel := func() {} 13864 // Start a goroutine to do server side connectivity check. 13865 if thrift.ServerConnectivityCheckInterval > 0 { 13866 var cancel context.CancelFunc 13867 ctx, cancel = context.WithCancel(ctx) 13868 defer cancel() 13869 var tickerCtx context.Context 13870 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 13871 defer tickerCancel() 13872 go func(ctx context.Context, cancel context.CancelFunc) { 13873 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 13874 defer ticker.Stop() 13875 for { 13876 select { 13877 case <-ctx.Done(): 13878 return 13879 case <-ticker.C: 13880 if !iprot.Transport().IsOpen() { 13881 cancel() 13882 return 13883 } 13884 } 13885 } 13886 }(tickerCtx, cancel) 13887 } 13888 13889 result := ApplyGetActiveProducersResult{} 13890 var retval []byte 13891 if retval, err2 = p.handler.GetActiveProducers(ctx); err2 != nil { 13892 tickerCancel() 13893 if err2 == thrift.ErrAbandonRequest { 13894 return false, thrift.WrapTException(err2) 13895 } 13896 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_active_producers: " + err2.Error()) 13897 oprot.WriteMessageBegin(ctx, "get_active_producers", thrift.EXCEPTION, seqId) 13898 x.Write(ctx, oprot) 13899 oprot.WriteMessageEnd(ctx) 13900 oprot.Flush(ctx) 13901 return true, thrift.WrapTException(err2) 13902 } else { 13903 result.Success = retval 13904 } 13905 tickerCancel() 13906 if err2 = oprot.WriteMessageBegin(ctx, "get_active_producers", thrift.REPLY, seqId); err2 != nil { 13907 err = thrift.WrapTException(err2) 13908 } 13909 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 13910 err = thrift.WrapTException(err2) 13911 } 13912 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 13913 err = thrift.WrapTException(err2) 13914 } 13915 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 13916 err = thrift.WrapTException(err2) 13917 } 13918 if err != nil { 13919 return 13920 } 13921 return true, err 13922 } 13923 13924 type applyProcessorGetResourceLimits struct { 13925 handler Apply 13926 } 13927 13928 func (p *applyProcessorGetResourceLimits) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 13929 args := ApplyGetResourceLimitsArgs{} 13930 var err2 error 13931 if err2 = args.Read(ctx, iprot); err2 != nil { 13932 iprot.ReadMessageEnd(ctx) 13933 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 13934 oprot.WriteMessageBegin(ctx, "get_resource_limits", thrift.EXCEPTION, seqId) 13935 x.Write(ctx, oprot) 13936 oprot.WriteMessageEnd(ctx) 13937 oprot.Flush(ctx) 13938 return false, thrift.WrapTException(err2) 13939 } 13940 iprot.ReadMessageEnd(ctx) 13941 13942 tickerCancel := func() {} 13943 // Start a goroutine to do server side connectivity check. 13944 if thrift.ServerConnectivityCheckInterval > 0 { 13945 var cancel context.CancelFunc 13946 ctx, cancel = context.WithCancel(ctx) 13947 defer cancel() 13948 var tickerCtx context.Context 13949 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 13950 defer tickerCancel() 13951 go func(ctx context.Context, cancel context.CancelFunc) { 13952 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 13953 defer ticker.Stop() 13954 for { 13955 select { 13956 case <-ctx.Done(): 13957 return 13958 case <-ticker.C: 13959 if !iprot.Transport().IsOpen() { 13960 cancel() 13961 return 13962 } 13963 } 13964 } 13965 }(tickerCtx, cancel) 13966 } 13967 13968 result := ApplyGetResourceLimitsResult{} 13969 var retval *GetResourceLimitsReturn 13970 if retval, err2 = p.handler.GetResourceLimits(ctx, args.Account); err2 != nil { 13971 tickerCancel() 13972 if err2 == thrift.ErrAbandonRequest { 13973 return false, thrift.WrapTException(err2) 13974 } 13975 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_resource_limits: " + err2.Error()) 13976 oprot.WriteMessageBegin(ctx, "get_resource_limits", thrift.EXCEPTION, seqId) 13977 x.Write(ctx, oprot) 13978 oprot.WriteMessageEnd(ctx) 13979 oprot.Flush(ctx) 13980 return true, thrift.WrapTException(err2) 13981 } else { 13982 result.Success = retval 13983 } 13984 tickerCancel() 13985 if err2 = oprot.WriteMessageBegin(ctx, "get_resource_limits", thrift.REPLY, seqId); err2 != nil { 13986 err = thrift.WrapTException(err2) 13987 } 13988 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 13989 err = thrift.WrapTException(err2) 13990 } 13991 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 13992 err = thrift.WrapTException(err2) 13993 } 13994 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 13995 err = thrift.WrapTException(err2) 13996 } 13997 if err != nil { 13998 return 13999 } 14000 return true, err 14001 } 14002 14003 type applyProcessorSetResourceLimits struct { 14004 handler Apply 14005 } 14006 14007 func (p *applyProcessorSetResourceLimits) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14008 args := ApplySetResourceLimitsArgs{} 14009 var err2 error 14010 if err2 = args.Read(ctx, iprot); err2 != nil { 14011 iprot.ReadMessageEnd(ctx) 14012 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14013 oprot.WriteMessageBegin(ctx, "set_resource_limits", thrift.EXCEPTION, seqId) 14014 x.Write(ctx, oprot) 14015 oprot.WriteMessageEnd(ctx) 14016 oprot.Flush(ctx) 14017 return false, thrift.WrapTException(err2) 14018 } 14019 iprot.ReadMessageEnd(ctx) 14020 14021 tickerCancel := func() {} 14022 // Start a goroutine to do server side connectivity check. 14023 if thrift.ServerConnectivityCheckInterval > 0 { 14024 var cancel context.CancelFunc 14025 ctx, cancel = context.WithCancel(ctx) 14026 defer cancel() 14027 var tickerCtx context.Context 14028 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14029 defer tickerCancel() 14030 go func(ctx context.Context, cancel context.CancelFunc) { 14031 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14032 defer ticker.Stop() 14033 for { 14034 select { 14035 case <-ctx.Done(): 14036 return 14037 case <-ticker.C: 14038 if !iprot.Transport().IsOpen() { 14039 cancel() 14040 return 14041 } 14042 } 14043 } 14044 }(tickerCtx, cancel) 14045 } 14046 14047 result := ApplySetResourceLimitsResult{} 14048 if err2 = p.handler.SetResourceLimits(ctx, args.Account, args.RAMBytes, args.NetWeight, args.CPUWeight); err2 != nil { 14049 tickerCancel() 14050 if err2 == thrift.ErrAbandonRequest { 14051 return false, thrift.WrapTException(err2) 14052 } 14053 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing set_resource_limits: " + err2.Error()) 14054 oprot.WriteMessageBegin(ctx, "set_resource_limits", thrift.EXCEPTION, seqId) 14055 x.Write(ctx, oprot) 14056 oprot.WriteMessageEnd(ctx) 14057 oprot.Flush(ctx) 14058 return true, thrift.WrapTException(err2) 14059 } 14060 tickerCancel() 14061 if err2 = oprot.WriteMessageBegin(ctx, "set_resource_limits", thrift.REPLY, seqId); err2 != nil { 14062 err = thrift.WrapTException(err2) 14063 } 14064 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 14065 err = thrift.WrapTException(err2) 14066 } 14067 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 14068 err = thrift.WrapTException(err2) 14069 } 14070 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 14071 err = thrift.WrapTException(err2) 14072 } 14073 if err != nil { 14074 return 14075 } 14076 return true, err 14077 } 14078 14079 type applyProcessorSetProposedProducers struct { 14080 handler Apply 14081 } 14082 14083 func (p *applyProcessorSetProposedProducers) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14084 args := ApplySetProposedProducersArgs{} 14085 var err2 error 14086 if err2 = args.Read(ctx, iprot); err2 != nil { 14087 iprot.ReadMessageEnd(ctx) 14088 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14089 oprot.WriteMessageBegin(ctx, "set_proposed_producers", thrift.EXCEPTION, seqId) 14090 x.Write(ctx, oprot) 14091 oprot.WriteMessageEnd(ctx) 14092 oprot.Flush(ctx) 14093 return false, thrift.WrapTException(err2) 14094 } 14095 iprot.ReadMessageEnd(ctx) 14096 14097 tickerCancel := func() {} 14098 // Start a goroutine to do server side connectivity check. 14099 if thrift.ServerConnectivityCheckInterval > 0 { 14100 var cancel context.CancelFunc 14101 ctx, cancel = context.WithCancel(ctx) 14102 defer cancel() 14103 var tickerCtx context.Context 14104 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14105 defer tickerCancel() 14106 go func(ctx context.Context, cancel context.CancelFunc) { 14107 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14108 defer ticker.Stop() 14109 for { 14110 select { 14111 case <-ctx.Done(): 14112 return 14113 case <-ticker.C: 14114 if !iprot.Transport().IsOpen() { 14115 cancel() 14116 return 14117 } 14118 } 14119 } 14120 }(tickerCtx, cancel) 14121 } 14122 14123 result := ApplySetProposedProducersResult{} 14124 var retval int64 14125 if retval, err2 = p.handler.SetProposedProducers(ctx, args.ProducerData); err2 != nil { 14126 tickerCancel() 14127 if err2 == thrift.ErrAbandonRequest { 14128 return false, thrift.WrapTException(err2) 14129 } 14130 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing set_proposed_producers: " + err2.Error()) 14131 oprot.WriteMessageBegin(ctx, "set_proposed_producers", thrift.EXCEPTION, seqId) 14132 x.Write(ctx, oprot) 14133 oprot.WriteMessageEnd(ctx) 14134 oprot.Flush(ctx) 14135 return true, thrift.WrapTException(err2) 14136 } else { 14137 result.Success = &retval 14138 } 14139 tickerCancel() 14140 if err2 = oprot.WriteMessageBegin(ctx, "set_proposed_producers", thrift.REPLY, seqId); err2 != nil { 14141 err = thrift.WrapTException(err2) 14142 } 14143 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 14144 err = thrift.WrapTException(err2) 14145 } 14146 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 14147 err = thrift.WrapTException(err2) 14148 } 14149 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 14150 err = thrift.WrapTException(err2) 14151 } 14152 if err != nil { 14153 return 14154 } 14155 return true, err 14156 } 14157 14158 type applyProcessorSetProposedProducersEx struct { 14159 handler Apply 14160 } 14161 14162 func (p *applyProcessorSetProposedProducersEx) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14163 args := ApplySetProposedProducersExArgs{} 14164 var err2 error 14165 if err2 = args.Read(ctx, iprot); err2 != nil { 14166 iprot.ReadMessageEnd(ctx) 14167 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14168 oprot.WriteMessageBegin(ctx, "set_proposed_producers_ex", thrift.EXCEPTION, seqId) 14169 x.Write(ctx, oprot) 14170 oprot.WriteMessageEnd(ctx) 14171 oprot.Flush(ctx) 14172 return false, thrift.WrapTException(err2) 14173 } 14174 iprot.ReadMessageEnd(ctx) 14175 14176 tickerCancel := func() {} 14177 // Start a goroutine to do server side connectivity check. 14178 if thrift.ServerConnectivityCheckInterval > 0 { 14179 var cancel context.CancelFunc 14180 ctx, cancel = context.WithCancel(ctx) 14181 defer cancel() 14182 var tickerCtx context.Context 14183 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14184 defer tickerCancel() 14185 go func(ctx context.Context, cancel context.CancelFunc) { 14186 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14187 defer ticker.Stop() 14188 for { 14189 select { 14190 case <-ctx.Done(): 14191 return 14192 case <-ticker.C: 14193 if !iprot.Transport().IsOpen() { 14194 cancel() 14195 return 14196 } 14197 } 14198 } 14199 }(tickerCtx, cancel) 14200 } 14201 14202 result := ApplySetProposedProducersExResult{} 14203 var retval int64 14204 if retval, err2 = p.handler.SetProposedProducersEx(ctx, args.ProducerDataFormat, args.ProducerData); err2 != nil { 14205 tickerCancel() 14206 if err2 == thrift.ErrAbandonRequest { 14207 return false, thrift.WrapTException(err2) 14208 } 14209 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing set_proposed_producers_ex: " + err2.Error()) 14210 oprot.WriteMessageBegin(ctx, "set_proposed_producers_ex", thrift.EXCEPTION, seqId) 14211 x.Write(ctx, oprot) 14212 oprot.WriteMessageEnd(ctx) 14213 oprot.Flush(ctx) 14214 return true, thrift.WrapTException(err2) 14215 } else { 14216 result.Success = &retval 14217 } 14218 tickerCancel() 14219 if err2 = oprot.WriteMessageBegin(ctx, "set_proposed_producers_ex", thrift.REPLY, seqId); err2 != nil { 14220 err = thrift.WrapTException(err2) 14221 } 14222 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 14223 err = thrift.WrapTException(err2) 14224 } 14225 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 14226 err = thrift.WrapTException(err2) 14227 } 14228 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 14229 err = thrift.WrapTException(err2) 14230 } 14231 if err != nil { 14232 return 14233 } 14234 return true, err 14235 } 14236 14237 type applyProcessorIsPrivileged struct { 14238 handler Apply 14239 } 14240 14241 func (p *applyProcessorIsPrivileged) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14242 args := ApplyIsPrivilegedArgs{} 14243 var err2 error 14244 if err2 = args.Read(ctx, iprot); err2 != nil { 14245 iprot.ReadMessageEnd(ctx) 14246 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14247 oprot.WriteMessageBegin(ctx, "is_privileged", thrift.EXCEPTION, seqId) 14248 x.Write(ctx, oprot) 14249 oprot.WriteMessageEnd(ctx) 14250 oprot.Flush(ctx) 14251 return false, thrift.WrapTException(err2) 14252 } 14253 iprot.ReadMessageEnd(ctx) 14254 14255 tickerCancel := func() {} 14256 // Start a goroutine to do server side connectivity check. 14257 if thrift.ServerConnectivityCheckInterval > 0 { 14258 var cancel context.CancelFunc 14259 ctx, cancel = context.WithCancel(ctx) 14260 defer cancel() 14261 var tickerCtx context.Context 14262 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14263 defer tickerCancel() 14264 go func(ctx context.Context, cancel context.CancelFunc) { 14265 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14266 defer ticker.Stop() 14267 for { 14268 select { 14269 case <-ctx.Done(): 14270 return 14271 case <-ticker.C: 14272 if !iprot.Transport().IsOpen() { 14273 cancel() 14274 return 14275 } 14276 } 14277 } 14278 }(tickerCtx, cancel) 14279 } 14280 14281 result := ApplyIsPrivilegedResult{} 14282 var retval bool 14283 if retval, err2 = p.handler.IsPrivileged(ctx, args.Account); err2 != nil { 14284 tickerCancel() 14285 if err2 == thrift.ErrAbandonRequest { 14286 return false, thrift.WrapTException(err2) 14287 } 14288 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing is_privileged: " + err2.Error()) 14289 oprot.WriteMessageBegin(ctx, "is_privileged", thrift.EXCEPTION, seqId) 14290 x.Write(ctx, oprot) 14291 oprot.WriteMessageEnd(ctx) 14292 oprot.Flush(ctx) 14293 return true, thrift.WrapTException(err2) 14294 } else { 14295 result.Success = &retval 14296 } 14297 tickerCancel() 14298 if err2 = oprot.WriteMessageBegin(ctx, "is_privileged", thrift.REPLY, seqId); err2 != nil { 14299 err = thrift.WrapTException(err2) 14300 } 14301 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 14302 err = thrift.WrapTException(err2) 14303 } 14304 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 14305 err = thrift.WrapTException(err2) 14306 } 14307 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 14308 err = thrift.WrapTException(err2) 14309 } 14310 if err != nil { 14311 return 14312 } 14313 return true, err 14314 } 14315 14316 type applyProcessorSetPrivileged struct { 14317 handler Apply 14318 } 14319 14320 func (p *applyProcessorSetPrivileged) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14321 args := ApplySetPrivilegedArgs{} 14322 var err2 error 14323 if err2 = args.Read(ctx, iprot); err2 != nil { 14324 iprot.ReadMessageEnd(ctx) 14325 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14326 oprot.WriteMessageBegin(ctx, "set_privileged", thrift.EXCEPTION, seqId) 14327 x.Write(ctx, oprot) 14328 oprot.WriteMessageEnd(ctx) 14329 oprot.Flush(ctx) 14330 return false, thrift.WrapTException(err2) 14331 } 14332 iprot.ReadMessageEnd(ctx) 14333 14334 tickerCancel := func() {} 14335 // Start a goroutine to do server side connectivity check. 14336 if thrift.ServerConnectivityCheckInterval > 0 { 14337 var cancel context.CancelFunc 14338 ctx, cancel = context.WithCancel(ctx) 14339 defer cancel() 14340 var tickerCtx context.Context 14341 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14342 defer tickerCancel() 14343 go func(ctx context.Context, cancel context.CancelFunc) { 14344 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14345 defer ticker.Stop() 14346 for { 14347 select { 14348 case <-ctx.Done(): 14349 return 14350 case <-ticker.C: 14351 if !iprot.Transport().IsOpen() { 14352 cancel() 14353 return 14354 } 14355 } 14356 } 14357 }(tickerCtx, cancel) 14358 } 14359 14360 result := ApplySetPrivilegedResult{} 14361 if err2 = p.handler.SetPrivileged(ctx, args.Account, args.IsPriv); err2 != nil { 14362 tickerCancel() 14363 if err2 == thrift.ErrAbandonRequest { 14364 return false, thrift.WrapTException(err2) 14365 } 14366 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing set_privileged: " + err2.Error()) 14367 oprot.WriteMessageBegin(ctx, "set_privileged", thrift.EXCEPTION, seqId) 14368 x.Write(ctx, oprot) 14369 oprot.WriteMessageEnd(ctx) 14370 oprot.Flush(ctx) 14371 return true, thrift.WrapTException(err2) 14372 } 14373 tickerCancel() 14374 if err2 = oprot.WriteMessageBegin(ctx, "set_privileged", thrift.REPLY, seqId); err2 != nil { 14375 err = thrift.WrapTException(err2) 14376 } 14377 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 14378 err = thrift.WrapTException(err2) 14379 } 14380 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 14381 err = thrift.WrapTException(err2) 14382 } 14383 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 14384 err = thrift.WrapTException(err2) 14385 } 14386 if err != nil { 14387 return 14388 } 14389 return true, err 14390 } 14391 14392 type applyProcessorSetBlockchainParametersPacked struct { 14393 handler Apply 14394 } 14395 14396 func (p *applyProcessorSetBlockchainParametersPacked) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14397 args := ApplySetBlockchainParametersPackedArgs{} 14398 var err2 error 14399 if err2 = args.Read(ctx, iprot); err2 != nil { 14400 iprot.ReadMessageEnd(ctx) 14401 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14402 oprot.WriteMessageBegin(ctx, "set_blockchain_parameters_packed", thrift.EXCEPTION, seqId) 14403 x.Write(ctx, oprot) 14404 oprot.WriteMessageEnd(ctx) 14405 oprot.Flush(ctx) 14406 return false, thrift.WrapTException(err2) 14407 } 14408 iprot.ReadMessageEnd(ctx) 14409 14410 tickerCancel := func() {} 14411 // Start a goroutine to do server side connectivity check. 14412 if thrift.ServerConnectivityCheckInterval > 0 { 14413 var cancel context.CancelFunc 14414 ctx, cancel = context.WithCancel(ctx) 14415 defer cancel() 14416 var tickerCtx context.Context 14417 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14418 defer tickerCancel() 14419 go func(ctx context.Context, cancel context.CancelFunc) { 14420 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14421 defer ticker.Stop() 14422 for { 14423 select { 14424 case <-ctx.Done(): 14425 return 14426 case <-ticker.C: 14427 if !iprot.Transport().IsOpen() { 14428 cancel() 14429 return 14430 } 14431 } 14432 } 14433 }(tickerCtx, cancel) 14434 } 14435 14436 result := ApplySetBlockchainParametersPackedResult{} 14437 if err2 = p.handler.SetBlockchainParametersPacked(ctx, args.Data); err2 != nil { 14438 tickerCancel() 14439 if err2 == thrift.ErrAbandonRequest { 14440 return false, thrift.WrapTException(err2) 14441 } 14442 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing set_blockchain_parameters_packed: " + err2.Error()) 14443 oprot.WriteMessageBegin(ctx, "set_blockchain_parameters_packed", thrift.EXCEPTION, seqId) 14444 x.Write(ctx, oprot) 14445 oprot.WriteMessageEnd(ctx) 14446 oprot.Flush(ctx) 14447 return true, thrift.WrapTException(err2) 14448 } 14449 tickerCancel() 14450 if err2 = oprot.WriteMessageBegin(ctx, "set_blockchain_parameters_packed", thrift.REPLY, seqId); err2 != nil { 14451 err = thrift.WrapTException(err2) 14452 } 14453 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 14454 err = thrift.WrapTException(err2) 14455 } 14456 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 14457 err = thrift.WrapTException(err2) 14458 } 14459 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 14460 err = thrift.WrapTException(err2) 14461 } 14462 if err != nil { 14463 return 14464 } 14465 return true, err 14466 } 14467 14468 type applyProcessorGetBlockchainParametersPacked struct { 14469 handler Apply 14470 } 14471 14472 func (p *applyProcessorGetBlockchainParametersPacked) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14473 args := ApplyGetBlockchainParametersPackedArgs{} 14474 var err2 error 14475 if err2 = args.Read(ctx, iprot); err2 != nil { 14476 iprot.ReadMessageEnd(ctx) 14477 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14478 oprot.WriteMessageBegin(ctx, "get_blockchain_parameters_packed", thrift.EXCEPTION, seqId) 14479 x.Write(ctx, oprot) 14480 oprot.WriteMessageEnd(ctx) 14481 oprot.Flush(ctx) 14482 return false, thrift.WrapTException(err2) 14483 } 14484 iprot.ReadMessageEnd(ctx) 14485 14486 tickerCancel := func() {} 14487 // Start a goroutine to do server side connectivity check. 14488 if thrift.ServerConnectivityCheckInterval > 0 { 14489 var cancel context.CancelFunc 14490 ctx, cancel = context.WithCancel(ctx) 14491 defer cancel() 14492 var tickerCtx context.Context 14493 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14494 defer tickerCancel() 14495 go func(ctx context.Context, cancel context.CancelFunc) { 14496 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14497 defer ticker.Stop() 14498 for { 14499 select { 14500 case <-ctx.Done(): 14501 return 14502 case <-ticker.C: 14503 if !iprot.Transport().IsOpen() { 14504 cancel() 14505 return 14506 } 14507 } 14508 } 14509 }(tickerCtx, cancel) 14510 } 14511 14512 result := ApplyGetBlockchainParametersPackedResult{} 14513 var retval []byte 14514 if retval, err2 = p.handler.GetBlockchainParametersPacked(ctx); err2 != nil { 14515 tickerCancel() 14516 if err2 == thrift.ErrAbandonRequest { 14517 return false, thrift.WrapTException(err2) 14518 } 14519 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_blockchain_parameters_packed: " + err2.Error()) 14520 oprot.WriteMessageBegin(ctx, "get_blockchain_parameters_packed", thrift.EXCEPTION, seqId) 14521 x.Write(ctx, oprot) 14522 oprot.WriteMessageEnd(ctx) 14523 oprot.Flush(ctx) 14524 return true, thrift.WrapTException(err2) 14525 } else { 14526 result.Success = retval 14527 } 14528 tickerCancel() 14529 if err2 = oprot.WriteMessageBegin(ctx, "get_blockchain_parameters_packed", thrift.REPLY, seqId); err2 != nil { 14530 err = thrift.WrapTException(err2) 14531 } 14532 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 14533 err = thrift.WrapTException(err2) 14534 } 14535 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 14536 err = thrift.WrapTException(err2) 14537 } 14538 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 14539 err = thrift.WrapTException(err2) 14540 } 14541 if err != nil { 14542 return 14543 } 14544 return true, err 14545 } 14546 14547 type applyProcessorPreactivateFeature struct { 14548 handler Apply 14549 } 14550 14551 func (p *applyProcessorPreactivateFeature) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14552 args := ApplyPreactivateFeatureArgs{} 14553 var err2 error 14554 if err2 = args.Read(ctx, iprot); err2 != nil { 14555 iprot.ReadMessageEnd(ctx) 14556 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14557 oprot.WriteMessageBegin(ctx, "preactivate_feature", thrift.EXCEPTION, seqId) 14558 x.Write(ctx, oprot) 14559 oprot.WriteMessageEnd(ctx) 14560 oprot.Flush(ctx) 14561 return false, thrift.WrapTException(err2) 14562 } 14563 iprot.ReadMessageEnd(ctx) 14564 14565 tickerCancel := func() {} 14566 // Start a goroutine to do server side connectivity check. 14567 if thrift.ServerConnectivityCheckInterval > 0 { 14568 var cancel context.CancelFunc 14569 ctx, cancel = context.WithCancel(ctx) 14570 defer cancel() 14571 var tickerCtx context.Context 14572 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14573 defer tickerCancel() 14574 go func(ctx context.Context, cancel context.CancelFunc) { 14575 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14576 defer ticker.Stop() 14577 for { 14578 select { 14579 case <-ctx.Done(): 14580 return 14581 case <-ticker.C: 14582 if !iprot.Transport().IsOpen() { 14583 cancel() 14584 return 14585 } 14586 } 14587 } 14588 }(tickerCtx, cancel) 14589 } 14590 14591 result := ApplyPreactivateFeatureResult{} 14592 if err2 = p.handler.PreactivateFeature(ctx, args.FeatureDigest); err2 != nil { 14593 tickerCancel() 14594 if err2 == thrift.ErrAbandonRequest { 14595 return false, thrift.WrapTException(err2) 14596 } 14597 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing preactivate_feature: " + err2.Error()) 14598 oprot.WriteMessageBegin(ctx, "preactivate_feature", thrift.EXCEPTION, seqId) 14599 x.Write(ctx, oprot) 14600 oprot.WriteMessageEnd(ctx) 14601 oprot.Flush(ctx) 14602 return true, thrift.WrapTException(err2) 14603 } 14604 tickerCancel() 14605 if err2 = oprot.WriteMessageBegin(ctx, "preactivate_feature", thrift.REPLY, seqId); err2 != nil { 14606 err = thrift.WrapTException(err2) 14607 } 14608 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 14609 err = thrift.WrapTException(err2) 14610 } 14611 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 14612 err = thrift.WrapTException(err2) 14613 } 14614 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 14615 err = thrift.WrapTException(err2) 14616 } 14617 if err != nil { 14618 return 14619 } 14620 return true, err 14621 } 14622 14623 type applyProcessorCheckTransactionAuthorization struct { 14624 handler Apply 14625 } 14626 14627 func (p *applyProcessorCheckTransactionAuthorization) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14628 args := ApplyCheckTransactionAuthorizationArgs{} 14629 var err2 error 14630 if err2 = args.Read(ctx, iprot); err2 != nil { 14631 iprot.ReadMessageEnd(ctx) 14632 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14633 oprot.WriteMessageBegin(ctx, "check_transaction_authorization", thrift.EXCEPTION, seqId) 14634 x.Write(ctx, oprot) 14635 oprot.WriteMessageEnd(ctx) 14636 oprot.Flush(ctx) 14637 return false, thrift.WrapTException(err2) 14638 } 14639 iprot.ReadMessageEnd(ctx) 14640 14641 tickerCancel := func() {} 14642 // Start a goroutine to do server side connectivity check. 14643 if thrift.ServerConnectivityCheckInterval > 0 { 14644 var cancel context.CancelFunc 14645 ctx, cancel = context.WithCancel(ctx) 14646 defer cancel() 14647 var tickerCtx context.Context 14648 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14649 defer tickerCancel() 14650 go func(ctx context.Context, cancel context.CancelFunc) { 14651 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14652 defer ticker.Stop() 14653 for { 14654 select { 14655 case <-ctx.Done(): 14656 return 14657 case <-ticker.C: 14658 if !iprot.Transport().IsOpen() { 14659 cancel() 14660 return 14661 } 14662 } 14663 } 14664 }(tickerCtx, cancel) 14665 } 14666 14667 result := ApplyCheckTransactionAuthorizationResult{} 14668 var retval int32 14669 if retval, err2 = p.handler.CheckTransactionAuthorization(ctx, args.TrxData, args.PubkeysData, args.PermsData); err2 != nil { 14670 tickerCancel() 14671 if err2 == thrift.ErrAbandonRequest { 14672 return false, thrift.WrapTException(err2) 14673 } 14674 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing check_transaction_authorization: " + err2.Error()) 14675 oprot.WriteMessageBegin(ctx, "check_transaction_authorization", thrift.EXCEPTION, seqId) 14676 x.Write(ctx, oprot) 14677 oprot.WriteMessageEnd(ctx) 14678 oprot.Flush(ctx) 14679 return true, thrift.WrapTException(err2) 14680 } else { 14681 result.Success = &retval 14682 } 14683 tickerCancel() 14684 if err2 = oprot.WriteMessageBegin(ctx, "check_transaction_authorization", thrift.REPLY, seqId); err2 != nil { 14685 err = thrift.WrapTException(err2) 14686 } 14687 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 14688 err = thrift.WrapTException(err2) 14689 } 14690 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 14691 err = thrift.WrapTException(err2) 14692 } 14693 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 14694 err = thrift.WrapTException(err2) 14695 } 14696 if err != nil { 14697 return 14698 } 14699 return true, err 14700 } 14701 14702 type applyProcessorCheckPermissionAuthorization struct { 14703 handler Apply 14704 } 14705 14706 func (p *applyProcessorCheckPermissionAuthorization) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14707 args := ApplyCheckPermissionAuthorizationArgs{} 14708 var err2 error 14709 if err2 = args.Read(ctx, iprot); err2 != nil { 14710 iprot.ReadMessageEnd(ctx) 14711 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14712 oprot.WriteMessageBegin(ctx, "check_permission_authorization", thrift.EXCEPTION, seqId) 14713 x.Write(ctx, oprot) 14714 oprot.WriteMessageEnd(ctx) 14715 oprot.Flush(ctx) 14716 return false, thrift.WrapTException(err2) 14717 } 14718 iprot.ReadMessageEnd(ctx) 14719 14720 tickerCancel := func() {} 14721 // Start a goroutine to do server side connectivity check. 14722 if thrift.ServerConnectivityCheckInterval > 0 { 14723 var cancel context.CancelFunc 14724 ctx, cancel = context.WithCancel(ctx) 14725 defer cancel() 14726 var tickerCtx context.Context 14727 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14728 defer tickerCancel() 14729 go func(ctx context.Context, cancel context.CancelFunc) { 14730 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14731 defer ticker.Stop() 14732 for { 14733 select { 14734 case <-ctx.Done(): 14735 return 14736 case <-ticker.C: 14737 if !iprot.Transport().IsOpen() { 14738 cancel() 14739 return 14740 } 14741 } 14742 } 14743 }(tickerCtx, cancel) 14744 } 14745 14746 result := ApplyCheckPermissionAuthorizationResult{} 14747 var retval int32 14748 if retval, err2 = p.handler.CheckPermissionAuthorization(ctx, args.Account, args.Permission, args.PubkeysData, args.PermsData, args.DelayUs); err2 != nil { 14749 tickerCancel() 14750 if err2 == thrift.ErrAbandonRequest { 14751 return false, thrift.WrapTException(err2) 14752 } 14753 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing check_permission_authorization: " + err2.Error()) 14754 oprot.WriteMessageBegin(ctx, "check_permission_authorization", thrift.EXCEPTION, seqId) 14755 x.Write(ctx, oprot) 14756 oprot.WriteMessageEnd(ctx) 14757 oprot.Flush(ctx) 14758 return true, thrift.WrapTException(err2) 14759 } else { 14760 result.Success = &retval 14761 } 14762 tickerCancel() 14763 if err2 = oprot.WriteMessageBegin(ctx, "check_permission_authorization", thrift.REPLY, seqId); err2 != nil { 14764 err = thrift.WrapTException(err2) 14765 } 14766 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 14767 err = thrift.WrapTException(err2) 14768 } 14769 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 14770 err = thrift.WrapTException(err2) 14771 } 14772 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 14773 err = thrift.WrapTException(err2) 14774 } 14775 if err != nil { 14776 return 14777 } 14778 return true, err 14779 } 14780 14781 type applyProcessorGetPermissionLastUsed struct { 14782 handler Apply 14783 } 14784 14785 func (p *applyProcessorGetPermissionLastUsed) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14786 args := ApplyGetPermissionLastUsedArgs{} 14787 var err2 error 14788 if err2 = args.Read(ctx, iprot); err2 != nil { 14789 iprot.ReadMessageEnd(ctx) 14790 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14791 oprot.WriteMessageBegin(ctx, "get_permission_last_used", thrift.EXCEPTION, seqId) 14792 x.Write(ctx, oprot) 14793 oprot.WriteMessageEnd(ctx) 14794 oprot.Flush(ctx) 14795 return false, thrift.WrapTException(err2) 14796 } 14797 iprot.ReadMessageEnd(ctx) 14798 14799 tickerCancel := func() {} 14800 // Start a goroutine to do server side connectivity check. 14801 if thrift.ServerConnectivityCheckInterval > 0 { 14802 var cancel context.CancelFunc 14803 ctx, cancel = context.WithCancel(ctx) 14804 defer cancel() 14805 var tickerCtx context.Context 14806 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14807 defer tickerCancel() 14808 go func(ctx context.Context, cancel context.CancelFunc) { 14809 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14810 defer ticker.Stop() 14811 for { 14812 select { 14813 case <-ctx.Done(): 14814 return 14815 case <-ticker.C: 14816 if !iprot.Transport().IsOpen() { 14817 cancel() 14818 return 14819 } 14820 } 14821 } 14822 }(tickerCtx, cancel) 14823 } 14824 14825 result := ApplyGetPermissionLastUsedResult{} 14826 var retval int64 14827 if retval, err2 = p.handler.GetPermissionLastUsed(ctx, args.Account, args.Permission); err2 != nil { 14828 tickerCancel() 14829 if err2 == thrift.ErrAbandonRequest { 14830 return false, thrift.WrapTException(err2) 14831 } 14832 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_permission_last_used: " + err2.Error()) 14833 oprot.WriteMessageBegin(ctx, "get_permission_last_used", thrift.EXCEPTION, seqId) 14834 x.Write(ctx, oprot) 14835 oprot.WriteMessageEnd(ctx) 14836 oprot.Flush(ctx) 14837 return true, thrift.WrapTException(err2) 14838 } else { 14839 result.Success = &retval 14840 } 14841 tickerCancel() 14842 if err2 = oprot.WriteMessageBegin(ctx, "get_permission_last_used", thrift.REPLY, seqId); err2 != nil { 14843 err = thrift.WrapTException(err2) 14844 } 14845 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 14846 err = thrift.WrapTException(err2) 14847 } 14848 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 14849 err = thrift.WrapTException(err2) 14850 } 14851 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 14852 err = thrift.WrapTException(err2) 14853 } 14854 if err != nil { 14855 return 14856 } 14857 return true, err 14858 } 14859 14860 type applyProcessorGetAccountCreationTime struct { 14861 handler Apply 14862 } 14863 14864 func (p *applyProcessorGetAccountCreationTime) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14865 args := ApplyGetAccountCreationTimeArgs{} 14866 var err2 error 14867 if err2 = args.Read(ctx, iprot); err2 != nil { 14868 iprot.ReadMessageEnd(ctx) 14869 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14870 oprot.WriteMessageBegin(ctx, "get_account_creation_time", thrift.EXCEPTION, seqId) 14871 x.Write(ctx, oprot) 14872 oprot.WriteMessageEnd(ctx) 14873 oprot.Flush(ctx) 14874 return false, thrift.WrapTException(err2) 14875 } 14876 iprot.ReadMessageEnd(ctx) 14877 14878 tickerCancel := func() {} 14879 // Start a goroutine to do server side connectivity check. 14880 if thrift.ServerConnectivityCheckInterval > 0 { 14881 var cancel context.CancelFunc 14882 ctx, cancel = context.WithCancel(ctx) 14883 defer cancel() 14884 var tickerCtx context.Context 14885 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14886 defer tickerCancel() 14887 go func(ctx context.Context, cancel context.CancelFunc) { 14888 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14889 defer ticker.Stop() 14890 for { 14891 select { 14892 case <-ctx.Done(): 14893 return 14894 case <-ticker.C: 14895 if !iprot.Transport().IsOpen() { 14896 cancel() 14897 return 14898 } 14899 } 14900 } 14901 }(tickerCtx, cancel) 14902 } 14903 14904 result := ApplyGetAccountCreationTimeResult{} 14905 var retval int64 14906 if retval, err2 = p.handler.GetAccountCreationTime(ctx, args.Account); err2 != nil { 14907 tickerCancel() 14908 if err2 == thrift.ErrAbandonRequest { 14909 return false, thrift.WrapTException(err2) 14910 } 14911 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_account_creation_time: " + err2.Error()) 14912 oprot.WriteMessageBegin(ctx, "get_account_creation_time", thrift.EXCEPTION, seqId) 14913 x.Write(ctx, oprot) 14914 oprot.WriteMessageEnd(ctx) 14915 oprot.Flush(ctx) 14916 return true, thrift.WrapTException(err2) 14917 } else { 14918 result.Success = &retval 14919 } 14920 tickerCancel() 14921 if err2 = oprot.WriteMessageBegin(ctx, "get_account_creation_time", thrift.REPLY, seqId); err2 != nil { 14922 err = thrift.WrapTException(err2) 14923 } 14924 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 14925 err = thrift.WrapTException(err2) 14926 } 14927 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 14928 err = thrift.WrapTException(err2) 14929 } 14930 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 14931 err = thrift.WrapTException(err2) 14932 } 14933 if err != nil { 14934 return 14935 } 14936 return true, err 14937 } 14938 14939 type applyProcessorPrints struct { 14940 handler Apply 14941 } 14942 14943 func (p *applyProcessorPrints) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 14944 args := ApplyPrintsArgs{} 14945 var err2 error 14946 if err2 = args.Read(ctx, iprot); err2 != nil { 14947 iprot.ReadMessageEnd(ctx) 14948 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 14949 oprot.WriteMessageBegin(ctx, "prints", thrift.EXCEPTION, seqId) 14950 x.Write(ctx, oprot) 14951 oprot.WriteMessageEnd(ctx) 14952 oprot.Flush(ctx) 14953 return false, thrift.WrapTException(err2) 14954 } 14955 iprot.ReadMessageEnd(ctx) 14956 14957 tickerCancel := func() {} 14958 // Start a goroutine to do server side connectivity check. 14959 if thrift.ServerConnectivityCheckInterval > 0 { 14960 var cancel context.CancelFunc 14961 ctx, cancel = context.WithCancel(ctx) 14962 defer cancel() 14963 var tickerCtx context.Context 14964 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 14965 defer tickerCancel() 14966 go func(ctx context.Context, cancel context.CancelFunc) { 14967 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 14968 defer ticker.Stop() 14969 for { 14970 select { 14971 case <-ctx.Done(): 14972 return 14973 case <-ticker.C: 14974 if !iprot.Transport().IsOpen() { 14975 cancel() 14976 return 14977 } 14978 } 14979 } 14980 }(tickerCtx, cancel) 14981 } 14982 14983 result := ApplyPrintsResult{} 14984 if err2 = p.handler.Prints(ctx, args.Cstr); err2 != nil { 14985 tickerCancel() 14986 if err2 == thrift.ErrAbandonRequest { 14987 return false, thrift.WrapTException(err2) 14988 } 14989 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing prints: " + err2.Error()) 14990 oprot.WriteMessageBegin(ctx, "prints", thrift.EXCEPTION, seqId) 14991 x.Write(ctx, oprot) 14992 oprot.WriteMessageEnd(ctx) 14993 oprot.Flush(ctx) 14994 return true, thrift.WrapTException(err2) 14995 } 14996 tickerCancel() 14997 if err2 = oprot.WriteMessageBegin(ctx, "prints", thrift.REPLY, seqId); err2 != nil { 14998 err = thrift.WrapTException(err2) 14999 } 15000 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15001 err = thrift.WrapTException(err2) 15002 } 15003 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15004 err = thrift.WrapTException(err2) 15005 } 15006 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15007 err = thrift.WrapTException(err2) 15008 } 15009 if err != nil { 15010 return 15011 } 15012 return true, err 15013 } 15014 15015 type applyProcessorPrintsL struct { 15016 handler Apply 15017 } 15018 15019 func (p *applyProcessorPrintsL) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15020 args := ApplyPrintsLArgs{} 15021 var err2 error 15022 if err2 = args.Read(ctx, iprot); err2 != nil { 15023 iprot.ReadMessageEnd(ctx) 15024 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15025 oprot.WriteMessageBegin(ctx, "prints_l", thrift.EXCEPTION, seqId) 15026 x.Write(ctx, oprot) 15027 oprot.WriteMessageEnd(ctx) 15028 oprot.Flush(ctx) 15029 return false, thrift.WrapTException(err2) 15030 } 15031 iprot.ReadMessageEnd(ctx) 15032 15033 tickerCancel := func() {} 15034 // Start a goroutine to do server side connectivity check. 15035 if thrift.ServerConnectivityCheckInterval > 0 { 15036 var cancel context.CancelFunc 15037 ctx, cancel = context.WithCancel(ctx) 15038 defer cancel() 15039 var tickerCtx context.Context 15040 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15041 defer tickerCancel() 15042 go func(ctx context.Context, cancel context.CancelFunc) { 15043 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15044 defer ticker.Stop() 15045 for { 15046 select { 15047 case <-ctx.Done(): 15048 return 15049 case <-ticker.C: 15050 if !iprot.Transport().IsOpen() { 15051 cancel() 15052 return 15053 } 15054 } 15055 } 15056 }(tickerCtx, cancel) 15057 } 15058 15059 result := ApplyPrintsLResult{} 15060 if err2 = p.handler.PrintsL(ctx, args.Cstr); err2 != nil { 15061 tickerCancel() 15062 if err2 == thrift.ErrAbandonRequest { 15063 return false, thrift.WrapTException(err2) 15064 } 15065 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing prints_l: " + err2.Error()) 15066 oprot.WriteMessageBegin(ctx, "prints_l", thrift.EXCEPTION, seqId) 15067 x.Write(ctx, oprot) 15068 oprot.WriteMessageEnd(ctx) 15069 oprot.Flush(ctx) 15070 return true, thrift.WrapTException(err2) 15071 } 15072 tickerCancel() 15073 if err2 = oprot.WriteMessageBegin(ctx, "prints_l", thrift.REPLY, seqId); err2 != nil { 15074 err = thrift.WrapTException(err2) 15075 } 15076 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15077 err = thrift.WrapTException(err2) 15078 } 15079 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15080 err = thrift.WrapTException(err2) 15081 } 15082 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15083 err = thrift.WrapTException(err2) 15084 } 15085 if err != nil { 15086 return 15087 } 15088 return true, err 15089 } 15090 15091 type applyProcessorPrinti struct { 15092 handler Apply 15093 } 15094 15095 func (p *applyProcessorPrinti) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15096 args := ApplyPrintiArgs{} 15097 var err2 error 15098 if err2 = args.Read(ctx, iprot); err2 != nil { 15099 iprot.ReadMessageEnd(ctx) 15100 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15101 oprot.WriteMessageBegin(ctx, "printi", thrift.EXCEPTION, seqId) 15102 x.Write(ctx, oprot) 15103 oprot.WriteMessageEnd(ctx) 15104 oprot.Flush(ctx) 15105 return false, thrift.WrapTException(err2) 15106 } 15107 iprot.ReadMessageEnd(ctx) 15108 15109 tickerCancel := func() {} 15110 // Start a goroutine to do server side connectivity check. 15111 if thrift.ServerConnectivityCheckInterval > 0 { 15112 var cancel context.CancelFunc 15113 ctx, cancel = context.WithCancel(ctx) 15114 defer cancel() 15115 var tickerCtx context.Context 15116 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15117 defer tickerCancel() 15118 go func(ctx context.Context, cancel context.CancelFunc) { 15119 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15120 defer ticker.Stop() 15121 for { 15122 select { 15123 case <-ctx.Done(): 15124 return 15125 case <-ticker.C: 15126 if !iprot.Transport().IsOpen() { 15127 cancel() 15128 return 15129 } 15130 } 15131 } 15132 }(tickerCtx, cancel) 15133 } 15134 15135 result := ApplyPrintiResult{} 15136 if err2 = p.handler.Printi(ctx, args.N); err2 != nil { 15137 tickerCancel() 15138 if err2 == thrift.ErrAbandonRequest { 15139 return false, thrift.WrapTException(err2) 15140 } 15141 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing printi: " + err2.Error()) 15142 oprot.WriteMessageBegin(ctx, "printi", thrift.EXCEPTION, seqId) 15143 x.Write(ctx, oprot) 15144 oprot.WriteMessageEnd(ctx) 15145 oprot.Flush(ctx) 15146 return true, thrift.WrapTException(err2) 15147 } 15148 tickerCancel() 15149 if err2 = oprot.WriteMessageBegin(ctx, "printi", thrift.REPLY, seqId); err2 != nil { 15150 err = thrift.WrapTException(err2) 15151 } 15152 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15153 err = thrift.WrapTException(err2) 15154 } 15155 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15156 err = thrift.WrapTException(err2) 15157 } 15158 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15159 err = thrift.WrapTException(err2) 15160 } 15161 if err != nil { 15162 return 15163 } 15164 return true, err 15165 } 15166 15167 type applyProcessorPrintui struct { 15168 handler Apply 15169 } 15170 15171 func (p *applyProcessorPrintui) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15172 args := ApplyPrintuiArgs{} 15173 var err2 error 15174 if err2 = args.Read(ctx, iprot); err2 != nil { 15175 iprot.ReadMessageEnd(ctx) 15176 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15177 oprot.WriteMessageBegin(ctx, "printui", thrift.EXCEPTION, seqId) 15178 x.Write(ctx, oprot) 15179 oprot.WriteMessageEnd(ctx) 15180 oprot.Flush(ctx) 15181 return false, thrift.WrapTException(err2) 15182 } 15183 iprot.ReadMessageEnd(ctx) 15184 15185 tickerCancel := func() {} 15186 // Start a goroutine to do server side connectivity check. 15187 if thrift.ServerConnectivityCheckInterval > 0 { 15188 var cancel context.CancelFunc 15189 ctx, cancel = context.WithCancel(ctx) 15190 defer cancel() 15191 var tickerCtx context.Context 15192 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15193 defer tickerCancel() 15194 go func(ctx context.Context, cancel context.CancelFunc) { 15195 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15196 defer ticker.Stop() 15197 for { 15198 select { 15199 case <-ctx.Done(): 15200 return 15201 case <-ticker.C: 15202 if !iprot.Transport().IsOpen() { 15203 cancel() 15204 return 15205 } 15206 } 15207 } 15208 }(tickerCtx, cancel) 15209 } 15210 15211 result := ApplyPrintuiResult{} 15212 if err2 = p.handler.Printui(ctx, args.N); err2 != nil { 15213 tickerCancel() 15214 if err2 == thrift.ErrAbandonRequest { 15215 return false, thrift.WrapTException(err2) 15216 } 15217 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing printui: " + err2.Error()) 15218 oprot.WriteMessageBegin(ctx, "printui", thrift.EXCEPTION, seqId) 15219 x.Write(ctx, oprot) 15220 oprot.WriteMessageEnd(ctx) 15221 oprot.Flush(ctx) 15222 return true, thrift.WrapTException(err2) 15223 } 15224 tickerCancel() 15225 if err2 = oprot.WriteMessageBegin(ctx, "printui", thrift.REPLY, seqId); err2 != nil { 15226 err = thrift.WrapTException(err2) 15227 } 15228 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15229 err = thrift.WrapTException(err2) 15230 } 15231 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15232 err = thrift.WrapTException(err2) 15233 } 15234 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15235 err = thrift.WrapTException(err2) 15236 } 15237 if err != nil { 15238 return 15239 } 15240 return true, err 15241 } 15242 15243 type applyProcessorPrinti128 struct { 15244 handler Apply 15245 } 15246 15247 func (p *applyProcessorPrinti128) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15248 args := ApplyPrinti128Args{} 15249 var err2 error 15250 if err2 = args.Read(ctx, iprot); err2 != nil { 15251 iprot.ReadMessageEnd(ctx) 15252 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15253 oprot.WriteMessageBegin(ctx, "printi128", thrift.EXCEPTION, seqId) 15254 x.Write(ctx, oprot) 15255 oprot.WriteMessageEnd(ctx) 15256 oprot.Flush(ctx) 15257 return false, thrift.WrapTException(err2) 15258 } 15259 iprot.ReadMessageEnd(ctx) 15260 15261 tickerCancel := func() {} 15262 // Start a goroutine to do server side connectivity check. 15263 if thrift.ServerConnectivityCheckInterval > 0 { 15264 var cancel context.CancelFunc 15265 ctx, cancel = context.WithCancel(ctx) 15266 defer cancel() 15267 var tickerCtx context.Context 15268 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15269 defer tickerCancel() 15270 go func(ctx context.Context, cancel context.CancelFunc) { 15271 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15272 defer ticker.Stop() 15273 for { 15274 select { 15275 case <-ctx.Done(): 15276 return 15277 case <-ticker.C: 15278 if !iprot.Transport().IsOpen() { 15279 cancel() 15280 return 15281 } 15282 } 15283 } 15284 }(tickerCtx, cancel) 15285 } 15286 15287 result := ApplyPrinti128Result{} 15288 if err2 = p.handler.Printi128(ctx, args.Value); err2 != nil { 15289 tickerCancel() 15290 if err2 == thrift.ErrAbandonRequest { 15291 return false, thrift.WrapTException(err2) 15292 } 15293 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing printi128: " + err2.Error()) 15294 oprot.WriteMessageBegin(ctx, "printi128", thrift.EXCEPTION, seqId) 15295 x.Write(ctx, oprot) 15296 oprot.WriteMessageEnd(ctx) 15297 oprot.Flush(ctx) 15298 return true, thrift.WrapTException(err2) 15299 } 15300 tickerCancel() 15301 if err2 = oprot.WriteMessageBegin(ctx, "printi128", thrift.REPLY, seqId); err2 != nil { 15302 err = thrift.WrapTException(err2) 15303 } 15304 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15305 err = thrift.WrapTException(err2) 15306 } 15307 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15308 err = thrift.WrapTException(err2) 15309 } 15310 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15311 err = thrift.WrapTException(err2) 15312 } 15313 if err != nil { 15314 return 15315 } 15316 return true, err 15317 } 15318 15319 type applyProcessorPrintui128 struct { 15320 handler Apply 15321 } 15322 15323 func (p *applyProcessorPrintui128) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15324 args := ApplyPrintui128Args{} 15325 var err2 error 15326 if err2 = args.Read(ctx, iprot); err2 != nil { 15327 iprot.ReadMessageEnd(ctx) 15328 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15329 oprot.WriteMessageBegin(ctx, "printui128", thrift.EXCEPTION, seqId) 15330 x.Write(ctx, oprot) 15331 oprot.WriteMessageEnd(ctx) 15332 oprot.Flush(ctx) 15333 return false, thrift.WrapTException(err2) 15334 } 15335 iprot.ReadMessageEnd(ctx) 15336 15337 tickerCancel := func() {} 15338 // Start a goroutine to do server side connectivity check. 15339 if thrift.ServerConnectivityCheckInterval > 0 { 15340 var cancel context.CancelFunc 15341 ctx, cancel = context.WithCancel(ctx) 15342 defer cancel() 15343 var tickerCtx context.Context 15344 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15345 defer tickerCancel() 15346 go func(ctx context.Context, cancel context.CancelFunc) { 15347 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15348 defer ticker.Stop() 15349 for { 15350 select { 15351 case <-ctx.Done(): 15352 return 15353 case <-ticker.C: 15354 if !iprot.Transport().IsOpen() { 15355 cancel() 15356 return 15357 } 15358 } 15359 } 15360 }(tickerCtx, cancel) 15361 } 15362 15363 result := ApplyPrintui128Result{} 15364 if err2 = p.handler.Printui128(ctx, args.Value); err2 != nil { 15365 tickerCancel() 15366 if err2 == thrift.ErrAbandonRequest { 15367 return false, thrift.WrapTException(err2) 15368 } 15369 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing printui128: " + err2.Error()) 15370 oprot.WriteMessageBegin(ctx, "printui128", thrift.EXCEPTION, seqId) 15371 x.Write(ctx, oprot) 15372 oprot.WriteMessageEnd(ctx) 15373 oprot.Flush(ctx) 15374 return true, thrift.WrapTException(err2) 15375 } 15376 tickerCancel() 15377 if err2 = oprot.WriteMessageBegin(ctx, "printui128", thrift.REPLY, seqId); err2 != nil { 15378 err = thrift.WrapTException(err2) 15379 } 15380 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15381 err = thrift.WrapTException(err2) 15382 } 15383 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15384 err = thrift.WrapTException(err2) 15385 } 15386 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15387 err = thrift.WrapTException(err2) 15388 } 15389 if err != nil { 15390 return 15391 } 15392 return true, err 15393 } 15394 15395 type applyProcessorPrintsf struct { 15396 handler Apply 15397 } 15398 15399 func (p *applyProcessorPrintsf) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15400 args := ApplyPrintsfArgs{} 15401 var err2 error 15402 if err2 = args.Read(ctx, iprot); err2 != nil { 15403 iprot.ReadMessageEnd(ctx) 15404 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15405 oprot.WriteMessageBegin(ctx, "printsf", thrift.EXCEPTION, seqId) 15406 x.Write(ctx, oprot) 15407 oprot.WriteMessageEnd(ctx) 15408 oprot.Flush(ctx) 15409 return false, thrift.WrapTException(err2) 15410 } 15411 iprot.ReadMessageEnd(ctx) 15412 15413 tickerCancel := func() {} 15414 // Start a goroutine to do server side connectivity check. 15415 if thrift.ServerConnectivityCheckInterval > 0 { 15416 var cancel context.CancelFunc 15417 ctx, cancel = context.WithCancel(ctx) 15418 defer cancel() 15419 var tickerCtx context.Context 15420 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15421 defer tickerCancel() 15422 go func(ctx context.Context, cancel context.CancelFunc) { 15423 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15424 defer ticker.Stop() 15425 for { 15426 select { 15427 case <-ctx.Done(): 15428 return 15429 case <-ticker.C: 15430 if !iprot.Transport().IsOpen() { 15431 cancel() 15432 return 15433 } 15434 } 15435 } 15436 }(tickerCtx, cancel) 15437 } 15438 15439 result := ApplyPrintsfResult{} 15440 if err2 = p.handler.Printsf(ctx, args.Value); err2 != nil { 15441 tickerCancel() 15442 if err2 == thrift.ErrAbandonRequest { 15443 return false, thrift.WrapTException(err2) 15444 } 15445 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing printsf: " + err2.Error()) 15446 oprot.WriteMessageBegin(ctx, "printsf", thrift.EXCEPTION, seqId) 15447 x.Write(ctx, oprot) 15448 oprot.WriteMessageEnd(ctx) 15449 oprot.Flush(ctx) 15450 return true, thrift.WrapTException(err2) 15451 } 15452 tickerCancel() 15453 if err2 = oprot.WriteMessageBegin(ctx, "printsf", thrift.REPLY, seqId); err2 != nil { 15454 err = thrift.WrapTException(err2) 15455 } 15456 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15457 err = thrift.WrapTException(err2) 15458 } 15459 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15460 err = thrift.WrapTException(err2) 15461 } 15462 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15463 err = thrift.WrapTException(err2) 15464 } 15465 if err != nil { 15466 return 15467 } 15468 return true, err 15469 } 15470 15471 type applyProcessorPrintdf struct { 15472 handler Apply 15473 } 15474 15475 func (p *applyProcessorPrintdf) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15476 args := ApplyPrintdfArgs{} 15477 var err2 error 15478 if err2 = args.Read(ctx, iprot); err2 != nil { 15479 iprot.ReadMessageEnd(ctx) 15480 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15481 oprot.WriteMessageBegin(ctx, "printdf", thrift.EXCEPTION, seqId) 15482 x.Write(ctx, oprot) 15483 oprot.WriteMessageEnd(ctx) 15484 oprot.Flush(ctx) 15485 return false, thrift.WrapTException(err2) 15486 } 15487 iprot.ReadMessageEnd(ctx) 15488 15489 tickerCancel := func() {} 15490 // Start a goroutine to do server side connectivity check. 15491 if thrift.ServerConnectivityCheckInterval > 0 { 15492 var cancel context.CancelFunc 15493 ctx, cancel = context.WithCancel(ctx) 15494 defer cancel() 15495 var tickerCtx context.Context 15496 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15497 defer tickerCancel() 15498 go func(ctx context.Context, cancel context.CancelFunc) { 15499 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15500 defer ticker.Stop() 15501 for { 15502 select { 15503 case <-ctx.Done(): 15504 return 15505 case <-ticker.C: 15506 if !iprot.Transport().IsOpen() { 15507 cancel() 15508 return 15509 } 15510 } 15511 } 15512 }(tickerCtx, cancel) 15513 } 15514 15515 result := ApplyPrintdfResult{} 15516 if err2 = p.handler.Printdf(ctx, args.Value); err2 != nil { 15517 tickerCancel() 15518 if err2 == thrift.ErrAbandonRequest { 15519 return false, thrift.WrapTException(err2) 15520 } 15521 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing printdf: " + err2.Error()) 15522 oprot.WriteMessageBegin(ctx, "printdf", thrift.EXCEPTION, seqId) 15523 x.Write(ctx, oprot) 15524 oprot.WriteMessageEnd(ctx) 15525 oprot.Flush(ctx) 15526 return true, thrift.WrapTException(err2) 15527 } 15528 tickerCancel() 15529 if err2 = oprot.WriteMessageBegin(ctx, "printdf", thrift.REPLY, seqId); err2 != nil { 15530 err = thrift.WrapTException(err2) 15531 } 15532 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15533 err = thrift.WrapTException(err2) 15534 } 15535 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15536 err = thrift.WrapTException(err2) 15537 } 15538 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15539 err = thrift.WrapTException(err2) 15540 } 15541 if err != nil { 15542 return 15543 } 15544 return true, err 15545 } 15546 15547 type applyProcessorPrintqf struct { 15548 handler Apply 15549 } 15550 15551 func (p *applyProcessorPrintqf) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15552 args := ApplyPrintqfArgs{} 15553 var err2 error 15554 if err2 = args.Read(ctx, iprot); err2 != nil { 15555 iprot.ReadMessageEnd(ctx) 15556 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15557 oprot.WriteMessageBegin(ctx, "printqf", thrift.EXCEPTION, seqId) 15558 x.Write(ctx, oprot) 15559 oprot.WriteMessageEnd(ctx) 15560 oprot.Flush(ctx) 15561 return false, thrift.WrapTException(err2) 15562 } 15563 iprot.ReadMessageEnd(ctx) 15564 15565 tickerCancel := func() {} 15566 // Start a goroutine to do server side connectivity check. 15567 if thrift.ServerConnectivityCheckInterval > 0 { 15568 var cancel context.CancelFunc 15569 ctx, cancel = context.WithCancel(ctx) 15570 defer cancel() 15571 var tickerCtx context.Context 15572 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15573 defer tickerCancel() 15574 go func(ctx context.Context, cancel context.CancelFunc) { 15575 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15576 defer ticker.Stop() 15577 for { 15578 select { 15579 case <-ctx.Done(): 15580 return 15581 case <-ticker.C: 15582 if !iprot.Transport().IsOpen() { 15583 cancel() 15584 return 15585 } 15586 } 15587 } 15588 }(tickerCtx, cancel) 15589 } 15590 15591 result := ApplyPrintqfResult{} 15592 if err2 = p.handler.Printqf(ctx, args.Value); err2 != nil { 15593 tickerCancel() 15594 if err2 == thrift.ErrAbandonRequest { 15595 return false, thrift.WrapTException(err2) 15596 } 15597 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing printqf: " + err2.Error()) 15598 oprot.WriteMessageBegin(ctx, "printqf", thrift.EXCEPTION, seqId) 15599 x.Write(ctx, oprot) 15600 oprot.WriteMessageEnd(ctx) 15601 oprot.Flush(ctx) 15602 return true, thrift.WrapTException(err2) 15603 } 15604 tickerCancel() 15605 if err2 = oprot.WriteMessageBegin(ctx, "printqf", thrift.REPLY, seqId); err2 != nil { 15606 err = thrift.WrapTException(err2) 15607 } 15608 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15609 err = thrift.WrapTException(err2) 15610 } 15611 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15612 err = thrift.WrapTException(err2) 15613 } 15614 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15615 err = thrift.WrapTException(err2) 15616 } 15617 if err != nil { 15618 return 15619 } 15620 return true, err 15621 } 15622 15623 type applyProcessorPrintn struct { 15624 handler Apply 15625 } 15626 15627 func (p *applyProcessorPrintn) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15628 args := ApplyPrintnArgs{} 15629 var err2 error 15630 if err2 = args.Read(ctx, iprot); err2 != nil { 15631 iprot.ReadMessageEnd(ctx) 15632 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15633 oprot.WriteMessageBegin(ctx, "printn", thrift.EXCEPTION, seqId) 15634 x.Write(ctx, oprot) 15635 oprot.WriteMessageEnd(ctx) 15636 oprot.Flush(ctx) 15637 return false, thrift.WrapTException(err2) 15638 } 15639 iprot.ReadMessageEnd(ctx) 15640 15641 tickerCancel := func() {} 15642 // Start a goroutine to do server side connectivity check. 15643 if thrift.ServerConnectivityCheckInterval > 0 { 15644 var cancel context.CancelFunc 15645 ctx, cancel = context.WithCancel(ctx) 15646 defer cancel() 15647 var tickerCtx context.Context 15648 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15649 defer tickerCancel() 15650 go func(ctx context.Context, cancel context.CancelFunc) { 15651 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15652 defer ticker.Stop() 15653 for { 15654 select { 15655 case <-ctx.Done(): 15656 return 15657 case <-ticker.C: 15658 if !iprot.Transport().IsOpen() { 15659 cancel() 15660 return 15661 } 15662 } 15663 } 15664 }(tickerCtx, cancel) 15665 } 15666 15667 result := ApplyPrintnResult{} 15668 if err2 = p.handler.Printn(ctx, args.Name); err2 != nil { 15669 tickerCancel() 15670 if err2 == thrift.ErrAbandonRequest { 15671 return false, thrift.WrapTException(err2) 15672 } 15673 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing printn: " + err2.Error()) 15674 oprot.WriteMessageBegin(ctx, "printn", thrift.EXCEPTION, seqId) 15675 x.Write(ctx, oprot) 15676 oprot.WriteMessageEnd(ctx) 15677 oprot.Flush(ctx) 15678 return true, thrift.WrapTException(err2) 15679 } 15680 tickerCancel() 15681 if err2 = oprot.WriteMessageBegin(ctx, "printn", thrift.REPLY, seqId); err2 != nil { 15682 err = thrift.WrapTException(err2) 15683 } 15684 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15685 err = thrift.WrapTException(err2) 15686 } 15687 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15688 err = thrift.WrapTException(err2) 15689 } 15690 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15691 err = thrift.WrapTException(err2) 15692 } 15693 if err != nil { 15694 return 15695 } 15696 return true, err 15697 } 15698 15699 type applyProcessorPrinthex struct { 15700 handler Apply 15701 } 15702 15703 func (p *applyProcessorPrinthex) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15704 args := ApplyPrinthexArgs{} 15705 var err2 error 15706 if err2 = args.Read(ctx, iprot); err2 != nil { 15707 iprot.ReadMessageEnd(ctx) 15708 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15709 oprot.WriteMessageBegin(ctx, "printhex", thrift.EXCEPTION, seqId) 15710 x.Write(ctx, oprot) 15711 oprot.WriteMessageEnd(ctx) 15712 oprot.Flush(ctx) 15713 return false, thrift.WrapTException(err2) 15714 } 15715 iprot.ReadMessageEnd(ctx) 15716 15717 tickerCancel := func() {} 15718 // Start a goroutine to do server side connectivity check. 15719 if thrift.ServerConnectivityCheckInterval > 0 { 15720 var cancel context.CancelFunc 15721 ctx, cancel = context.WithCancel(ctx) 15722 defer cancel() 15723 var tickerCtx context.Context 15724 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15725 defer tickerCancel() 15726 go func(ctx context.Context, cancel context.CancelFunc) { 15727 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15728 defer ticker.Stop() 15729 for { 15730 select { 15731 case <-ctx.Done(): 15732 return 15733 case <-ticker.C: 15734 if !iprot.Transport().IsOpen() { 15735 cancel() 15736 return 15737 } 15738 } 15739 } 15740 }(tickerCtx, cancel) 15741 } 15742 15743 result := ApplyPrinthexResult{} 15744 if err2 = p.handler.Printhex(ctx, args.Data); err2 != nil { 15745 tickerCancel() 15746 if err2 == thrift.ErrAbandonRequest { 15747 return false, thrift.WrapTException(err2) 15748 } 15749 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing printhex: " + err2.Error()) 15750 oprot.WriteMessageBegin(ctx, "printhex", thrift.EXCEPTION, seqId) 15751 x.Write(ctx, oprot) 15752 oprot.WriteMessageEnd(ctx) 15753 oprot.Flush(ctx) 15754 return true, thrift.WrapTException(err2) 15755 } 15756 tickerCancel() 15757 if err2 = oprot.WriteMessageBegin(ctx, "printhex", thrift.REPLY, seqId); err2 != nil { 15758 err = thrift.WrapTException(err2) 15759 } 15760 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15761 err = thrift.WrapTException(err2) 15762 } 15763 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15764 err = thrift.WrapTException(err2) 15765 } 15766 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15767 err = thrift.WrapTException(err2) 15768 } 15769 if err != nil { 15770 return 15771 } 15772 return true, err 15773 } 15774 15775 type applyProcessorActionDataSize struct { 15776 handler Apply 15777 } 15778 15779 func (p *applyProcessorActionDataSize) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15780 args := ApplyActionDataSizeArgs{} 15781 var err2 error 15782 if err2 = args.Read(ctx, iprot); err2 != nil { 15783 iprot.ReadMessageEnd(ctx) 15784 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15785 oprot.WriteMessageBegin(ctx, "action_data_size", thrift.EXCEPTION, seqId) 15786 x.Write(ctx, oprot) 15787 oprot.WriteMessageEnd(ctx) 15788 oprot.Flush(ctx) 15789 return false, thrift.WrapTException(err2) 15790 } 15791 iprot.ReadMessageEnd(ctx) 15792 15793 tickerCancel := func() {} 15794 // Start a goroutine to do server side connectivity check. 15795 if thrift.ServerConnectivityCheckInterval > 0 { 15796 var cancel context.CancelFunc 15797 ctx, cancel = context.WithCancel(ctx) 15798 defer cancel() 15799 var tickerCtx context.Context 15800 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15801 defer tickerCancel() 15802 go func(ctx context.Context, cancel context.CancelFunc) { 15803 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15804 defer ticker.Stop() 15805 for { 15806 select { 15807 case <-ctx.Done(): 15808 return 15809 case <-ticker.C: 15810 if !iprot.Transport().IsOpen() { 15811 cancel() 15812 return 15813 } 15814 } 15815 } 15816 }(tickerCtx, cancel) 15817 } 15818 15819 result := ApplyActionDataSizeResult{} 15820 var retval int32 15821 if retval, err2 = p.handler.ActionDataSize(ctx); err2 != nil { 15822 tickerCancel() 15823 if err2 == thrift.ErrAbandonRequest { 15824 return false, thrift.WrapTException(err2) 15825 } 15826 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing action_data_size: " + err2.Error()) 15827 oprot.WriteMessageBegin(ctx, "action_data_size", thrift.EXCEPTION, seqId) 15828 x.Write(ctx, oprot) 15829 oprot.WriteMessageEnd(ctx) 15830 oprot.Flush(ctx) 15831 return true, thrift.WrapTException(err2) 15832 } else { 15833 result.Success = &retval 15834 } 15835 tickerCancel() 15836 if err2 = oprot.WriteMessageBegin(ctx, "action_data_size", thrift.REPLY, seqId); err2 != nil { 15837 err = thrift.WrapTException(err2) 15838 } 15839 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15840 err = thrift.WrapTException(err2) 15841 } 15842 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15843 err = thrift.WrapTException(err2) 15844 } 15845 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15846 err = thrift.WrapTException(err2) 15847 } 15848 if err != nil { 15849 return 15850 } 15851 return true, err 15852 } 15853 15854 type applyProcessorReadActionData struct { 15855 handler Apply 15856 } 15857 15858 func (p *applyProcessorReadActionData) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15859 args := ApplyReadActionDataArgs{} 15860 var err2 error 15861 if err2 = args.Read(ctx, iprot); err2 != nil { 15862 iprot.ReadMessageEnd(ctx) 15863 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15864 oprot.WriteMessageBegin(ctx, "read_action_data", thrift.EXCEPTION, seqId) 15865 x.Write(ctx, oprot) 15866 oprot.WriteMessageEnd(ctx) 15867 oprot.Flush(ctx) 15868 return false, thrift.WrapTException(err2) 15869 } 15870 iprot.ReadMessageEnd(ctx) 15871 15872 tickerCancel := func() {} 15873 // Start a goroutine to do server side connectivity check. 15874 if thrift.ServerConnectivityCheckInterval > 0 { 15875 var cancel context.CancelFunc 15876 ctx, cancel = context.WithCancel(ctx) 15877 defer cancel() 15878 var tickerCtx context.Context 15879 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15880 defer tickerCancel() 15881 go func(ctx context.Context, cancel context.CancelFunc) { 15882 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15883 defer ticker.Stop() 15884 for { 15885 select { 15886 case <-ctx.Done(): 15887 return 15888 case <-ticker.C: 15889 if !iprot.Transport().IsOpen() { 15890 cancel() 15891 return 15892 } 15893 } 15894 } 15895 }(tickerCtx, cancel) 15896 } 15897 15898 result := ApplyReadActionDataResult{} 15899 var retval []byte 15900 if retval, err2 = p.handler.ReadActionData(ctx); err2 != nil { 15901 tickerCancel() 15902 if err2 == thrift.ErrAbandonRequest { 15903 return false, thrift.WrapTException(err2) 15904 } 15905 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing read_action_data: " + err2.Error()) 15906 oprot.WriteMessageBegin(ctx, "read_action_data", thrift.EXCEPTION, seqId) 15907 x.Write(ctx, oprot) 15908 oprot.WriteMessageEnd(ctx) 15909 oprot.Flush(ctx) 15910 return true, thrift.WrapTException(err2) 15911 } else { 15912 result.Success = retval 15913 } 15914 tickerCancel() 15915 if err2 = oprot.WriteMessageBegin(ctx, "read_action_data", thrift.REPLY, seqId); err2 != nil { 15916 err = thrift.WrapTException(err2) 15917 } 15918 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15919 err = thrift.WrapTException(err2) 15920 } 15921 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15922 err = thrift.WrapTException(err2) 15923 } 15924 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 15925 err = thrift.WrapTException(err2) 15926 } 15927 if err != nil { 15928 return 15929 } 15930 return true, err 15931 } 15932 15933 type applyProcessorRequireRecipient struct { 15934 handler Apply 15935 } 15936 15937 func (p *applyProcessorRequireRecipient) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 15938 args := ApplyRequireRecipientArgs{} 15939 var err2 error 15940 if err2 = args.Read(ctx, iprot); err2 != nil { 15941 iprot.ReadMessageEnd(ctx) 15942 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 15943 oprot.WriteMessageBegin(ctx, "require_recipient", thrift.EXCEPTION, seqId) 15944 x.Write(ctx, oprot) 15945 oprot.WriteMessageEnd(ctx) 15946 oprot.Flush(ctx) 15947 return false, thrift.WrapTException(err2) 15948 } 15949 iprot.ReadMessageEnd(ctx) 15950 15951 tickerCancel := func() {} 15952 // Start a goroutine to do server side connectivity check. 15953 if thrift.ServerConnectivityCheckInterval > 0 { 15954 var cancel context.CancelFunc 15955 ctx, cancel = context.WithCancel(ctx) 15956 defer cancel() 15957 var tickerCtx context.Context 15958 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 15959 defer tickerCancel() 15960 go func(ctx context.Context, cancel context.CancelFunc) { 15961 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 15962 defer ticker.Stop() 15963 for { 15964 select { 15965 case <-ctx.Done(): 15966 return 15967 case <-ticker.C: 15968 if !iprot.Transport().IsOpen() { 15969 cancel() 15970 return 15971 } 15972 } 15973 } 15974 }(tickerCtx, cancel) 15975 } 15976 15977 result := ApplyRequireRecipientResult{} 15978 if err2 = p.handler.RequireRecipient(ctx, args.Name); err2 != nil { 15979 tickerCancel() 15980 if err2 == thrift.ErrAbandonRequest { 15981 return false, thrift.WrapTException(err2) 15982 } 15983 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing require_recipient: " + err2.Error()) 15984 oprot.WriteMessageBegin(ctx, "require_recipient", thrift.EXCEPTION, seqId) 15985 x.Write(ctx, oprot) 15986 oprot.WriteMessageEnd(ctx) 15987 oprot.Flush(ctx) 15988 return true, thrift.WrapTException(err2) 15989 } 15990 tickerCancel() 15991 if err2 = oprot.WriteMessageBegin(ctx, "require_recipient", thrift.REPLY, seqId); err2 != nil { 15992 err = thrift.WrapTException(err2) 15993 } 15994 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 15995 err = thrift.WrapTException(err2) 15996 } 15997 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 15998 err = thrift.WrapTException(err2) 15999 } 16000 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16001 err = thrift.WrapTException(err2) 16002 } 16003 if err != nil { 16004 return 16005 } 16006 return true, err 16007 } 16008 16009 type applyProcessorRequireAuth struct { 16010 handler Apply 16011 } 16012 16013 func (p *applyProcessorRequireAuth) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16014 args := ApplyRequireAuthArgs{} 16015 var err2 error 16016 if err2 = args.Read(ctx, iprot); err2 != nil { 16017 iprot.ReadMessageEnd(ctx) 16018 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16019 oprot.WriteMessageBegin(ctx, "require_auth", thrift.EXCEPTION, seqId) 16020 x.Write(ctx, oprot) 16021 oprot.WriteMessageEnd(ctx) 16022 oprot.Flush(ctx) 16023 return false, thrift.WrapTException(err2) 16024 } 16025 iprot.ReadMessageEnd(ctx) 16026 16027 tickerCancel := func() {} 16028 // Start a goroutine to do server side connectivity check. 16029 if thrift.ServerConnectivityCheckInterval > 0 { 16030 var cancel context.CancelFunc 16031 ctx, cancel = context.WithCancel(ctx) 16032 defer cancel() 16033 var tickerCtx context.Context 16034 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16035 defer tickerCancel() 16036 go func(ctx context.Context, cancel context.CancelFunc) { 16037 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16038 defer ticker.Stop() 16039 for { 16040 select { 16041 case <-ctx.Done(): 16042 return 16043 case <-ticker.C: 16044 if !iprot.Transport().IsOpen() { 16045 cancel() 16046 return 16047 } 16048 } 16049 } 16050 }(tickerCtx, cancel) 16051 } 16052 16053 result := ApplyRequireAuthResult{} 16054 if err2 = p.handler.RequireAuth(ctx, args.Name); err2 != nil { 16055 tickerCancel() 16056 if err2 == thrift.ErrAbandonRequest { 16057 return false, thrift.WrapTException(err2) 16058 } 16059 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing require_auth: " + err2.Error()) 16060 oprot.WriteMessageBegin(ctx, "require_auth", thrift.EXCEPTION, seqId) 16061 x.Write(ctx, oprot) 16062 oprot.WriteMessageEnd(ctx) 16063 oprot.Flush(ctx) 16064 return true, thrift.WrapTException(err2) 16065 } 16066 tickerCancel() 16067 if err2 = oprot.WriteMessageBegin(ctx, "require_auth", thrift.REPLY, seqId); err2 != nil { 16068 err = thrift.WrapTException(err2) 16069 } 16070 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16071 err = thrift.WrapTException(err2) 16072 } 16073 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 16074 err = thrift.WrapTException(err2) 16075 } 16076 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16077 err = thrift.WrapTException(err2) 16078 } 16079 if err != nil { 16080 return 16081 } 16082 return true, err 16083 } 16084 16085 type applyProcessorHasAuth struct { 16086 handler Apply 16087 } 16088 16089 func (p *applyProcessorHasAuth) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16090 args := ApplyHasAuthArgs{} 16091 var err2 error 16092 if err2 = args.Read(ctx, iprot); err2 != nil { 16093 iprot.ReadMessageEnd(ctx) 16094 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16095 oprot.WriteMessageBegin(ctx, "has_auth", thrift.EXCEPTION, seqId) 16096 x.Write(ctx, oprot) 16097 oprot.WriteMessageEnd(ctx) 16098 oprot.Flush(ctx) 16099 return false, thrift.WrapTException(err2) 16100 } 16101 iprot.ReadMessageEnd(ctx) 16102 16103 tickerCancel := func() {} 16104 // Start a goroutine to do server side connectivity check. 16105 if thrift.ServerConnectivityCheckInterval > 0 { 16106 var cancel context.CancelFunc 16107 ctx, cancel = context.WithCancel(ctx) 16108 defer cancel() 16109 var tickerCtx context.Context 16110 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16111 defer tickerCancel() 16112 go func(ctx context.Context, cancel context.CancelFunc) { 16113 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16114 defer ticker.Stop() 16115 for { 16116 select { 16117 case <-ctx.Done(): 16118 return 16119 case <-ticker.C: 16120 if !iprot.Transport().IsOpen() { 16121 cancel() 16122 return 16123 } 16124 } 16125 } 16126 }(tickerCtx, cancel) 16127 } 16128 16129 result := ApplyHasAuthResult{} 16130 var retval bool 16131 if retval, err2 = p.handler.HasAuth(ctx, args.Name); err2 != nil { 16132 tickerCancel() 16133 if err2 == thrift.ErrAbandonRequest { 16134 return false, thrift.WrapTException(err2) 16135 } 16136 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing has_auth: " + err2.Error()) 16137 oprot.WriteMessageBegin(ctx, "has_auth", thrift.EXCEPTION, seqId) 16138 x.Write(ctx, oprot) 16139 oprot.WriteMessageEnd(ctx) 16140 oprot.Flush(ctx) 16141 return true, thrift.WrapTException(err2) 16142 } else { 16143 result.Success = &retval 16144 } 16145 tickerCancel() 16146 if err2 = oprot.WriteMessageBegin(ctx, "has_auth", thrift.REPLY, seqId); err2 != nil { 16147 err = thrift.WrapTException(err2) 16148 } 16149 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16150 err = thrift.WrapTException(err2) 16151 } 16152 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 16153 err = thrift.WrapTException(err2) 16154 } 16155 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16156 err = thrift.WrapTException(err2) 16157 } 16158 if err != nil { 16159 return 16160 } 16161 return true, err 16162 } 16163 16164 type applyProcessorRequireAuth2 struct { 16165 handler Apply 16166 } 16167 16168 func (p *applyProcessorRequireAuth2) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16169 args := ApplyRequireAuth2Args{} 16170 var err2 error 16171 if err2 = args.Read(ctx, iprot); err2 != nil { 16172 iprot.ReadMessageEnd(ctx) 16173 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16174 oprot.WriteMessageBegin(ctx, "require_auth2", thrift.EXCEPTION, seqId) 16175 x.Write(ctx, oprot) 16176 oprot.WriteMessageEnd(ctx) 16177 oprot.Flush(ctx) 16178 return false, thrift.WrapTException(err2) 16179 } 16180 iprot.ReadMessageEnd(ctx) 16181 16182 tickerCancel := func() {} 16183 // Start a goroutine to do server side connectivity check. 16184 if thrift.ServerConnectivityCheckInterval > 0 { 16185 var cancel context.CancelFunc 16186 ctx, cancel = context.WithCancel(ctx) 16187 defer cancel() 16188 var tickerCtx context.Context 16189 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16190 defer tickerCancel() 16191 go func(ctx context.Context, cancel context.CancelFunc) { 16192 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16193 defer ticker.Stop() 16194 for { 16195 select { 16196 case <-ctx.Done(): 16197 return 16198 case <-ticker.C: 16199 if !iprot.Transport().IsOpen() { 16200 cancel() 16201 return 16202 } 16203 } 16204 } 16205 }(tickerCtx, cancel) 16206 } 16207 16208 result := ApplyRequireAuth2Result{} 16209 if err2 = p.handler.RequireAuth2(ctx, args.Name, args.Permission); err2 != nil { 16210 tickerCancel() 16211 if err2 == thrift.ErrAbandonRequest { 16212 return false, thrift.WrapTException(err2) 16213 } 16214 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing require_auth2: " + err2.Error()) 16215 oprot.WriteMessageBegin(ctx, "require_auth2", thrift.EXCEPTION, seqId) 16216 x.Write(ctx, oprot) 16217 oprot.WriteMessageEnd(ctx) 16218 oprot.Flush(ctx) 16219 return true, thrift.WrapTException(err2) 16220 } 16221 tickerCancel() 16222 if err2 = oprot.WriteMessageBegin(ctx, "require_auth2", thrift.REPLY, seqId); err2 != nil { 16223 err = thrift.WrapTException(err2) 16224 } 16225 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16226 err = thrift.WrapTException(err2) 16227 } 16228 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 16229 err = thrift.WrapTException(err2) 16230 } 16231 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16232 err = thrift.WrapTException(err2) 16233 } 16234 if err != nil { 16235 return 16236 } 16237 return true, err 16238 } 16239 16240 type applyProcessorIsAccount struct { 16241 handler Apply 16242 } 16243 16244 func (p *applyProcessorIsAccount) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16245 args := ApplyIsAccountArgs{} 16246 var err2 error 16247 if err2 = args.Read(ctx, iprot); err2 != nil { 16248 iprot.ReadMessageEnd(ctx) 16249 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16250 oprot.WriteMessageBegin(ctx, "is_account", thrift.EXCEPTION, seqId) 16251 x.Write(ctx, oprot) 16252 oprot.WriteMessageEnd(ctx) 16253 oprot.Flush(ctx) 16254 return false, thrift.WrapTException(err2) 16255 } 16256 iprot.ReadMessageEnd(ctx) 16257 16258 tickerCancel := func() {} 16259 // Start a goroutine to do server side connectivity check. 16260 if thrift.ServerConnectivityCheckInterval > 0 { 16261 var cancel context.CancelFunc 16262 ctx, cancel = context.WithCancel(ctx) 16263 defer cancel() 16264 var tickerCtx context.Context 16265 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16266 defer tickerCancel() 16267 go func(ctx context.Context, cancel context.CancelFunc) { 16268 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16269 defer ticker.Stop() 16270 for { 16271 select { 16272 case <-ctx.Done(): 16273 return 16274 case <-ticker.C: 16275 if !iprot.Transport().IsOpen() { 16276 cancel() 16277 return 16278 } 16279 } 16280 } 16281 }(tickerCtx, cancel) 16282 } 16283 16284 result := ApplyIsAccountResult{} 16285 var retval bool 16286 if retval, err2 = p.handler.IsAccount(ctx, args.Name); err2 != nil { 16287 tickerCancel() 16288 if err2 == thrift.ErrAbandonRequest { 16289 return false, thrift.WrapTException(err2) 16290 } 16291 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing is_account: " + err2.Error()) 16292 oprot.WriteMessageBegin(ctx, "is_account", thrift.EXCEPTION, seqId) 16293 x.Write(ctx, oprot) 16294 oprot.WriteMessageEnd(ctx) 16295 oprot.Flush(ctx) 16296 return true, thrift.WrapTException(err2) 16297 } else { 16298 result.Success = &retval 16299 } 16300 tickerCancel() 16301 if err2 = oprot.WriteMessageBegin(ctx, "is_account", thrift.REPLY, seqId); err2 != nil { 16302 err = thrift.WrapTException(err2) 16303 } 16304 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16305 err = thrift.WrapTException(err2) 16306 } 16307 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 16308 err = thrift.WrapTException(err2) 16309 } 16310 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16311 err = thrift.WrapTException(err2) 16312 } 16313 if err != nil { 16314 return 16315 } 16316 return true, err 16317 } 16318 16319 type applyProcessorSendInline struct { 16320 handler Apply 16321 } 16322 16323 func (p *applyProcessorSendInline) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16324 args := ApplySendInlineArgs{} 16325 var err2 error 16326 if err2 = args.Read(ctx, iprot); err2 != nil { 16327 iprot.ReadMessageEnd(ctx) 16328 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16329 oprot.WriteMessageBegin(ctx, "send_inline", thrift.EXCEPTION, seqId) 16330 x.Write(ctx, oprot) 16331 oprot.WriteMessageEnd(ctx) 16332 oprot.Flush(ctx) 16333 return false, thrift.WrapTException(err2) 16334 } 16335 iprot.ReadMessageEnd(ctx) 16336 16337 tickerCancel := func() {} 16338 // Start a goroutine to do server side connectivity check. 16339 if thrift.ServerConnectivityCheckInterval > 0 { 16340 var cancel context.CancelFunc 16341 ctx, cancel = context.WithCancel(ctx) 16342 defer cancel() 16343 var tickerCtx context.Context 16344 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16345 defer tickerCancel() 16346 go func(ctx context.Context, cancel context.CancelFunc) { 16347 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16348 defer ticker.Stop() 16349 for { 16350 select { 16351 case <-ctx.Done(): 16352 return 16353 case <-ticker.C: 16354 if !iprot.Transport().IsOpen() { 16355 cancel() 16356 return 16357 } 16358 } 16359 } 16360 }(tickerCtx, cancel) 16361 } 16362 16363 result := ApplySendInlineResult{} 16364 if err2 = p.handler.SendInline(ctx, args.SerializedAction); err2 != nil { 16365 tickerCancel() 16366 if err2 == thrift.ErrAbandonRequest { 16367 return false, thrift.WrapTException(err2) 16368 } 16369 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing send_inline: " + err2.Error()) 16370 oprot.WriteMessageBegin(ctx, "send_inline", thrift.EXCEPTION, seqId) 16371 x.Write(ctx, oprot) 16372 oprot.WriteMessageEnd(ctx) 16373 oprot.Flush(ctx) 16374 return true, thrift.WrapTException(err2) 16375 } 16376 tickerCancel() 16377 if err2 = oprot.WriteMessageBegin(ctx, "send_inline", thrift.REPLY, seqId); err2 != nil { 16378 err = thrift.WrapTException(err2) 16379 } 16380 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16381 err = thrift.WrapTException(err2) 16382 } 16383 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 16384 err = thrift.WrapTException(err2) 16385 } 16386 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16387 err = thrift.WrapTException(err2) 16388 } 16389 if err != nil { 16390 return 16391 } 16392 return true, err 16393 } 16394 16395 type applyProcessorSendContextFreeInline struct { 16396 handler Apply 16397 } 16398 16399 func (p *applyProcessorSendContextFreeInline) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16400 args := ApplySendContextFreeInlineArgs{} 16401 var err2 error 16402 if err2 = args.Read(ctx, iprot); err2 != nil { 16403 iprot.ReadMessageEnd(ctx) 16404 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16405 oprot.WriteMessageBegin(ctx, "send_context_free_inline", thrift.EXCEPTION, seqId) 16406 x.Write(ctx, oprot) 16407 oprot.WriteMessageEnd(ctx) 16408 oprot.Flush(ctx) 16409 return false, thrift.WrapTException(err2) 16410 } 16411 iprot.ReadMessageEnd(ctx) 16412 16413 tickerCancel := func() {} 16414 // Start a goroutine to do server side connectivity check. 16415 if thrift.ServerConnectivityCheckInterval > 0 { 16416 var cancel context.CancelFunc 16417 ctx, cancel = context.WithCancel(ctx) 16418 defer cancel() 16419 var tickerCtx context.Context 16420 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16421 defer tickerCancel() 16422 go func(ctx context.Context, cancel context.CancelFunc) { 16423 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16424 defer ticker.Stop() 16425 for { 16426 select { 16427 case <-ctx.Done(): 16428 return 16429 case <-ticker.C: 16430 if !iprot.Transport().IsOpen() { 16431 cancel() 16432 return 16433 } 16434 } 16435 } 16436 }(tickerCtx, cancel) 16437 } 16438 16439 result := ApplySendContextFreeInlineResult{} 16440 if err2 = p.handler.SendContextFreeInline(ctx, args.SerializedData); err2 != nil { 16441 tickerCancel() 16442 if err2 == thrift.ErrAbandonRequest { 16443 return false, thrift.WrapTException(err2) 16444 } 16445 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing send_context_free_inline: " + err2.Error()) 16446 oprot.WriteMessageBegin(ctx, "send_context_free_inline", thrift.EXCEPTION, seqId) 16447 x.Write(ctx, oprot) 16448 oprot.WriteMessageEnd(ctx) 16449 oprot.Flush(ctx) 16450 return true, thrift.WrapTException(err2) 16451 } 16452 tickerCancel() 16453 if err2 = oprot.WriteMessageBegin(ctx, "send_context_free_inline", thrift.REPLY, seqId); err2 != nil { 16454 err = thrift.WrapTException(err2) 16455 } 16456 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16457 err = thrift.WrapTException(err2) 16458 } 16459 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 16460 err = thrift.WrapTException(err2) 16461 } 16462 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16463 err = thrift.WrapTException(err2) 16464 } 16465 if err != nil { 16466 return 16467 } 16468 return true, err 16469 } 16470 16471 type applyProcessorPublicationTime struct { 16472 handler Apply 16473 } 16474 16475 func (p *applyProcessorPublicationTime) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16476 args := ApplyPublicationTimeArgs{} 16477 var err2 error 16478 if err2 = args.Read(ctx, iprot); err2 != nil { 16479 iprot.ReadMessageEnd(ctx) 16480 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16481 oprot.WriteMessageBegin(ctx, "publication_time", thrift.EXCEPTION, seqId) 16482 x.Write(ctx, oprot) 16483 oprot.WriteMessageEnd(ctx) 16484 oprot.Flush(ctx) 16485 return false, thrift.WrapTException(err2) 16486 } 16487 iprot.ReadMessageEnd(ctx) 16488 16489 tickerCancel := func() {} 16490 // Start a goroutine to do server side connectivity check. 16491 if thrift.ServerConnectivityCheckInterval > 0 { 16492 var cancel context.CancelFunc 16493 ctx, cancel = context.WithCancel(ctx) 16494 defer cancel() 16495 var tickerCtx context.Context 16496 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16497 defer tickerCancel() 16498 go func(ctx context.Context, cancel context.CancelFunc) { 16499 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16500 defer ticker.Stop() 16501 for { 16502 select { 16503 case <-ctx.Done(): 16504 return 16505 case <-ticker.C: 16506 if !iprot.Transport().IsOpen() { 16507 cancel() 16508 return 16509 } 16510 } 16511 } 16512 }(tickerCtx, cancel) 16513 } 16514 16515 result := ApplyPublicationTimeResult{} 16516 var retval *Uint64 16517 if retval, err2 = p.handler.PublicationTime(ctx); err2 != nil { 16518 tickerCancel() 16519 if err2 == thrift.ErrAbandonRequest { 16520 return false, thrift.WrapTException(err2) 16521 } 16522 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing publication_time: " + err2.Error()) 16523 oprot.WriteMessageBegin(ctx, "publication_time", thrift.EXCEPTION, seqId) 16524 x.Write(ctx, oprot) 16525 oprot.WriteMessageEnd(ctx) 16526 oprot.Flush(ctx) 16527 return true, thrift.WrapTException(err2) 16528 } else { 16529 result.Success = retval 16530 } 16531 tickerCancel() 16532 if err2 = oprot.WriteMessageBegin(ctx, "publication_time", thrift.REPLY, seqId); err2 != nil { 16533 err = thrift.WrapTException(err2) 16534 } 16535 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16536 err = thrift.WrapTException(err2) 16537 } 16538 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 16539 err = thrift.WrapTException(err2) 16540 } 16541 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16542 err = thrift.WrapTException(err2) 16543 } 16544 if err != nil { 16545 return 16546 } 16547 return true, err 16548 } 16549 16550 type applyProcessorCurrentReceiver struct { 16551 handler Apply 16552 } 16553 16554 func (p *applyProcessorCurrentReceiver) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16555 args := ApplyCurrentReceiverArgs{} 16556 var err2 error 16557 if err2 = args.Read(ctx, iprot); err2 != nil { 16558 iprot.ReadMessageEnd(ctx) 16559 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16560 oprot.WriteMessageBegin(ctx, "current_receiver", thrift.EXCEPTION, seqId) 16561 x.Write(ctx, oprot) 16562 oprot.WriteMessageEnd(ctx) 16563 oprot.Flush(ctx) 16564 return false, thrift.WrapTException(err2) 16565 } 16566 iprot.ReadMessageEnd(ctx) 16567 16568 tickerCancel := func() {} 16569 // Start a goroutine to do server side connectivity check. 16570 if thrift.ServerConnectivityCheckInterval > 0 { 16571 var cancel context.CancelFunc 16572 ctx, cancel = context.WithCancel(ctx) 16573 defer cancel() 16574 var tickerCtx context.Context 16575 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16576 defer tickerCancel() 16577 go func(ctx context.Context, cancel context.CancelFunc) { 16578 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16579 defer ticker.Stop() 16580 for { 16581 select { 16582 case <-ctx.Done(): 16583 return 16584 case <-ticker.C: 16585 if !iprot.Transport().IsOpen() { 16586 cancel() 16587 return 16588 } 16589 } 16590 } 16591 }(tickerCtx, cancel) 16592 } 16593 16594 result := ApplyCurrentReceiverResult{} 16595 var retval *Uint64 16596 if retval, err2 = p.handler.CurrentReceiver(ctx); err2 != nil { 16597 tickerCancel() 16598 if err2 == thrift.ErrAbandonRequest { 16599 return false, thrift.WrapTException(err2) 16600 } 16601 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing current_receiver: " + err2.Error()) 16602 oprot.WriteMessageBegin(ctx, "current_receiver", thrift.EXCEPTION, seqId) 16603 x.Write(ctx, oprot) 16604 oprot.WriteMessageEnd(ctx) 16605 oprot.Flush(ctx) 16606 return true, thrift.WrapTException(err2) 16607 } else { 16608 result.Success = retval 16609 } 16610 tickerCancel() 16611 if err2 = oprot.WriteMessageBegin(ctx, "current_receiver", thrift.REPLY, seqId); err2 != nil { 16612 err = thrift.WrapTException(err2) 16613 } 16614 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16615 err = thrift.WrapTException(err2) 16616 } 16617 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 16618 err = thrift.WrapTException(err2) 16619 } 16620 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16621 err = thrift.WrapTException(err2) 16622 } 16623 if err != nil { 16624 return 16625 } 16626 return true, err 16627 } 16628 16629 type applyProcessorEosioAssert struct { 16630 handler Apply 16631 } 16632 16633 func (p *applyProcessorEosioAssert) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16634 args := ApplyEosioAssertArgs{} 16635 var err2 error 16636 if err2 = args.Read(ctx, iprot); err2 != nil { 16637 iprot.ReadMessageEnd(ctx) 16638 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16639 oprot.WriteMessageBegin(ctx, "eosio_assert", thrift.EXCEPTION, seqId) 16640 x.Write(ctx, oprot) 16641 oprot.WriteMessageEnd(ctx) 16642 oprot.Flush(ctx) 16643 return false, thrift.WrapTException(err2) 16644 } 16645 iprot.ReadMessageEnd(ctx) 16646 16647 tickerCancel := func() {} 16648 // Start a goroutine to do server side connectivity check. 16649 if thrift.ServerConnectivityCheckInterval > 0 { 16650 var cancel context.CancelFunc 16651 ctx, cancel = context.WithCancel(ctx) 16652 defer cancel() 16653 var tickerCtx context.Context 16654 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16655 defer tickerCancel() 16656 go func(ctx context.Context, cancel context.CancelFunc) { 16657 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16658 defer ticker.Stop() 16659 for { 16660 select { 16661 case <-ctx.Done(): 16662 return 16663 case <-ticker.C: 16664 if !iprot.Transport().IsOpen() { 16665 cancel() 16666 return 16667 } 16668 } 16669 } 16670 }(tickerCtx, cancel) 16671 } 16672 16673 result := ApplyEosioAssertResult{} 16674 if err2 = p.handler.EosioAssert(ctx, args.Test, args.Msg); err2 != nil { 16675 tickerCancel() 16676 if err2 == thrift.ErrAbandonRequest { 16677 return false, thrift.WrapTException(err2) 16678 } 16679 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing eosio_assert: " + err2.Error()) 16680 oprot.WriteMessageBegin(ctx, "eosio_assert", thrift.EXCEPTION, seqId) 16681 x.Write(ctx, oprot) 16682 oprot.WriteMessageEnd(ctx) 16683 oprot.Flush(ctx) 16684 return true, thrift.WrapTException(err2) 16685 } 16686 tickerCancel() 16687 if err2 = oprot.WriteMessageBegin(ctx, "eosio_assert", thrift.REPLY, seqId); err2 != nil { 16688 err = thrift.WrapTException(err2) 16689 } 16690 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16691 err = thrift.WrapTException(err2) 16692 } 16693 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 16694 err = thrift.WrapTException(err2) 16695 } 16696 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16697 err = thrift.WrapTException(err2) 16698 } 16699 if err != nil { 16700 return 16701 } 16702 return true, err 16703 } 16704 16705 type applyProcessorEosioAssertMessage struct { 16706 handler Apply 16707 } 16708 16709 func (p *applyProcessorEosioAssertMessage) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16710 args := ApplyEosioAssertMessageArgs{} 16711 var err2 error 16712 if err2 = args.Read(ctx, iprot); err2 != nil { 16713 iprot.ReadMessageEnd(ctx) 16714 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16715 oprot.WriteMessageBegin(ctx, "eosio_assert_message", thrift.EXCEPTION, seqId) 16716 x.Write(ctx, oprot) 16717 oprot.WriteMessageEnd(ctx) 16718 oprot.Flush(ctx) 16719 return false, thrift.WrapTException(err2) 16720 } 16721 iprot.ReadMessageEnd(ctx) 16722 16723 tickerCancel := func() {} 16724 // Start a goroutine to do server side connectivity check. 16725 if thrift.ServerConnectivityCheckInterval > 0 { 16726 var cancel context.CancelFunc 16727 ctx, cancel = context.WithCancel(ctx) 16728 defer cancel() 16729 var tickerCtx context.Context 16730 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16731 defer tickerCancel() 16732 go func(ctx context.Context, cancel context.CancelFunc) { 16733 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16734 defer ticker.Stop() 16735 for { 16736 select { 16737 case <-ctx.Done(): 16738 return 16739 case <-ticker.C: 16740 if !iprot.Transport().IsOpen() { 16741 cancel() 16742 return 16743 } 16744 } 16745 } 16746 }(tickerCtx, cancel) 16747 } 16748 16749 result := ApplyEosioAssertMessageResult{} 16750 if err2 = p.handler.EosioAssertMessage(ctx, args.Test, args.Msg); err2 != nil { 16751 tickerCancel() 16752 if err2 == thrift.ErrAbandonRequest { 16753 return false, thrift.WrapTException(err2) 16754 } 16755 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing eosio_assert_message: " + err2.Error()) 16756 oprot.WriteMessageBegin(ctx, "eosio_assert_message", thrift.EXCEPTION, seqId) 16757 x.Write(ctx, oprot) 16758 oprot.WriteMessageEnd(ctx) 16759 oprot.Flush(ctx) 16760 return true, thrift.WrapTException(err2) 16761 } 16762 tickerCancel() 16763 if err2 = oprot.WriteMessageBegin(ctx, "eosio_assert_message", thrift.REPLY, seqId); err2 != nil { 16764 err = thrift.WrapTException(err2) 16765 } 16766 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16767 err = thrift.WrapTException(err2) 16768 } 16769 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 16770 err = thrift.WrapTException(err2) 16771 } 16772 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16773 err = thrift.WrapTException(err2) 16774 } 16775 if err != nil { 16776 return 16777 } 16778 return true, err 16779 } 16780 16781 type applyProcessorEosioAssertCode struct { 16782 handler Apply 16783 } 16784 16785 func (p *applyProcessorEosioAssertCode) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16786 args := ApplyEosioAssertCodeArgs{} 16787 var err2 error 16788 if err2 = args.Read(ctx, iprot); err2 != nil { 16789 iprot.ReadMessageEnd(ctx) 16790 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16791 oprot.WriteMessageBegin(ctx, "eosio_assert_code", thrift.EXCEPTION, seqId) 16792 x.Write(ctx, oprot) 16793 oprot.WriteMessageEnd(ctx) 16794 oprot.Flush(ctx) 16795 return false, thrift.WrapTException(err2) 16796 } 16797 iprot.ReadMessageEnd(ctx) 16798 16799 tickerCancel := func() {} 16800 // Start a goroutine to do server side connectivity check. 16801 if thrift.ServerConnectivityCheckInterval > 0 { 16802 var cancel context.CancelFunc 16803 ctx, cancel = context.WithCancel(ctx) 16804 defer cancel() 16805 var tickerCtx context.Context 16806 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16807 defer tickerCancel() 16808 go func(ctx context.Context, cancel context.CancelFunc) { 16809 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16810 defer ticker.Stop() 16811 for { 16812 select { 16813 case <-ctx.Done(): 16814 return 16815 case <-ticker.C: 16816 if !iprot.Transport().IsOpen() { 16817 cancel() 16818 return 16819 } 16820 } 16821 } 16822 }(tickerCtx, cancel) 16823 } 16824 16825 result := ApplyEosioAssertCodeResult{} 16826 if err2 = p.handler.EosioAssertCode(ctx, args.Test, args.Code); err2 != nil { 16827 tickerCancel() 16828 if err2 == thrift.ErrAbandonRequest { 16829 return false, thrift.WrapTException(err2) 16830 } 16831 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing eosio_assert_code: " + err2.Error()) 16832 oprot.WriteMessageBegin(ctx, "eosio_assert_code", thrift.EXCEPTION, seqId) 16833 x.Write(ctx, oprot) 16834 oprot.WriteMessageEnd(ctx) 16835 oprot.Flush(ctx) 16836 return true, thrift.WrapTException(err2) 16837 } 16838 tickerCancel() 16839 if err2 = oprot.WriteMessageBegin(ctx, "eosio_assert_code", thrift.REPLY, seqId); err2 != nil { 16840 err = thrift.WrapTException(err2) 16841 } 16842 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16843 err = thrift.WrapTException(err2) 16844 } 16845 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 16846 err = thrift.WrapTException(err2) 16847 } 16848 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16849 err = thrift.WrapTException(err2) 16850 } 16851 if err != nil { 16852 return 16853 } 16854 return true, err 16855 } 16856 16857 type applyProcessorEosioExit struct { 16858 handler Apply 16859 } 16860 16861 func (p *applyProcessorEosioExit) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16862 args := ApplyEosioExitArgs{} 16863 var err2 error 16864 if err2 = args.Read(ctx, iprot); err2 != nil { 16865 iprot.ReadMessageEnd(ctx) 16866 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16867 oprot.WriteMessageBegin(ctx, "eosio_exit", thrift.EXCEPTION, seqId) 16868 x.Write(ctx, oprot) 16869 oprot.WriteMessageEnd(ctx) 16870 oprot.Flush(ctx) 16871 return false, thrift.WrapTException(err2) 16872 } 16873 iprot.ReadMessageEnd(ctx) 16874 16875 tickerCancel := func() {} 16876 // Start a goroutine to do server side connectivity check. 16877 if thrift.ServerConnectivityCheckInterval > 0 { 16878 var cancel context.CancelFunc 16879 ctx, cancel = context.WithCancel(ctx) 16880 defer cancel() 16881 var tickerCtx context.Context 16882 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16883 defer tickerCancel() 16884 go func(ctx context.Context, cancel context.CancelFunc) { 16885 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16886 defer ticker.Stop() 16887 for { 16888 select { 16889 case <-ctx.Done(): 16890 return 16891 case <-ticker.C: 16892 if !iprot.Transport().IsOpen() { 16893 cancel() 16894 return 16895 } 16896 } 16897 } 16898 }(tickerCtx, cancel) 16899 } 16900 16901 result := ApplyEosioExitResult{} 16902 if err2 = p.handler.EosioExit(ctx, args.Code); err2 != nil { 16903 tickerCancel() 16904 if err2 == thrift.ErrAbandonRequest { 16905 return false, thrift.WrapTException(err2) 16906 } 16907 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing eosio_exit: " + err2.Error()) 16908 oprot.WriteMessageBegin(ctx, "eosio_exit", thrift.EXCEPTION, seqId) 16909 x.Write(ctx, oprot) 16910 oprot.WriteMessageEnd(ctx) 16911 oprot.Flush(ctx) 16912 return true, thrift.WrapTException(err2) 16913 } 16914 tickerCancel() 16915 if err2 = oprot.WriteMessageBegin(ctx, "eosio_exit", thrift.REPLY, seqId); err2 != nil { 16916 err = thrift.WrapTException(err2) 16917 } 16918 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16919 err = thrift.WrapTException(err2) 16920 } 16921 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 16922 err = thrift.WrapTException(err2) 16923 } 16924 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 16925 err = thrift.WrapTException(err2) 16926 } 16927 if err != nil { 16928 return 16929 } 16930 return true, err 16931 } 16932 16933 type applyProcessorCurrentTime struct { 16934 handler Apply 16935 } 16936 16937 func (p *applyProcessorCurrentTime) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 16938 args := ApplyCurrentTimeArgs{} 16939 var err2 error 16940 if err2 = args.Read(ctx, iprot); err2 != nil { 16941 iprot.ReadMessageEnd(ctx) 16942 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 16943 oprot.WriteMessageBegin(ctx, "current_time", thrift.EXCEPTION, seqId) 16944 x.Write(ctx, oprot) 16945 oprot.WriteMessageEnd(ctx) 16946 oprot.Flush(ctx) 16947 return false, thrift.WrapTException(err2) 16948 } 16949 iprot.ReadMessageEnd(ctx) 16950 16951 tickerCancel := func() {} 16952 // Start a goroutine to do server side connectivity check. 16953 if thrift.ServerConnectivityCheckInterval > 0 { 16954 var cancel context.CancelFunc 16955 ctx, cancel = context.WithCancel(ctx) 16956 defer cancel() 16957 var tickerCtx context.Context 16958 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 16959 defer tickerCancel() 16960 go func(ctx context.Context, cancel context.CancelFunc) { 16961 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 16962 defer ticker.Stop() 16963 for { 16964 select { 16965 case <-ctx.Done(): 16966 return 16967 case <-ticker.C: 16968 if !iprot.Transport().IsOpen() { 16969 cancel() 16970 return 16971 } 16972 } 16973 } 16974 }(tickerCtx, cancel) 16975 } 16976 16977 result := ApplyCurrentTimeResult{} 16978 var retval *Uint64 16979 if retval, err2 = p.handler.CurrentTime(ctx); err2 != nil { 16980 tickerCancel() 16981 if err2 == thrift.ErrAbandonRequest { 16982 return false, thrift.WrapTException(err2) 16983 } 16984 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing current_time: " + err2.Error()) 16985 oprot.WriteMessageBegin(ctx, "current_time", thrift.EXCEPTION, seqId) 16986 x.Write(ctx, oprot) 16987 oprot.WriteMessageEnd(ctx) 16988 oprot.Flush(ctx) 16989 return true, thrift.WrapTException(err2) 16990 } else { 16991 result.Success = retval 16992 } 16993 tickerCancel() 16994 if err2 = oprot.WriteMessageBegin(ctx, "current_time", thrift.REPLY, seqId); err2 != nil { 16995 err = thrift.WrapTException(err2) 16996 } 16997 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 16998 err = thrift.WrapTException(err2) 16999 } 17000 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17001 err = thrift.WrapTException(err2) 17002 } 17003 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17004 err = thrift.WrapTException(err2) 17005 } 17006 if err != nil { 17007 return 17008 } 17009 return true, err 17010 } 17011 17012 type applyProcessorIsFeatureActivated struct { 17013 handler Apply 17014 } 17015 17016 func (p *applyProcessorIsFeatureActivated) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17017 args := ApplyIsFeatureActivatedArgs{} 17018 var err2 error 17019 if err2 = args.Read(ctx, iprot); err2 != nil { 17020 iprot.ReadMessageEnd(ctx) 17021 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17022 oprot.WriteMessageBegin(ctx, "is_feature_activated", thrift.EXCEPTION, seqId) 17023 x.Write(ctx, oprot) 17024 oprot.WriteMessageEnd(ctx) 17025 oprot.Flush(ctx) 17026 return false, thrift.WrapTException(err2) 17027 } 17028 iprot.ReadMessageEnd(ctx) 17029 17030 tickerCancel := func() {} 17031 // Start a goroutine to do server side connectivity check. 17032 if thrift.ServerConnectivityCheckInterval > 0 { 17033 var cancel context.CancelFunc 17034 ctx, cancel = context.WithCancel(ctx) 17035 defer cancel() 17036 var tickerCtx context.Context 17037 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17038 defer tickerCancel() 17039 go func(ctx context.Context, cancel context.CancelFunc) { 17040 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17041 defer ticker.Stop() 17042 for { 17043 select { 17044 case <-ctx.Done(): 17045 return 17046 case <-ticker.C: 17047 if !iprot.Transport().IsOpen() { 17048 cancel() 17049 return 17050 } 17051 } 17052 } 17053 }(tickerCtx, cancel) 17054 } 17055 17056 result := ApplyIsFeatureActivatedResult{} 17057 var retval bool 17058 if retval, err2 = p.handler.IsFeatureActivated(ctx, args.FeatureDigest); err2 != nil { 17059 tickerCancel() 17060 if err2 == thrift.ErrAbandonRequest { 17061 return false, thrift.WrapTException(err2) 17062 } 17063 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing is_feature_activated: " + err2.Error()) 17064 oprot.WriteMessageBegin(ctx, "is_feature_activated", thrift.EXCEPTION, seqId) 17065 x.Write(ctx, oprot) 17066 oprot.WriteMessageEnd(ctx) 17067 oprot.Flush(ctx) 17068 return true, thrift.WrapTException(err2) 17069 } else { 17070 result.Success = &retval 17071 } 17072 tickerCancel() 17073 if err2 = oprot.WriteMessageBegin(ctx, "is_feature_activated", thrift.REPLY, seqId); err2 != nil { 17074 err = thrift.WrapTException(err2) 17075 } 17076 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 17077 err = thrift.WrapTException(err2) 17078 } 17079 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17080 err = thrift.WrapTException(err2) 17081 } 17082 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17083 err = thrift.WrapTException(err2) 17084 } 17085 if err != nil { 17086 return 17087 } 17088 return true, err 17089 } 17090 17091 type applyProcessorGetSender struct { 17092 handler Apply 17093 } 17094 17095 func (p *applyProcessorGetSender) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17096 args := ApplyGetSenderArgs{} 17097 var err2 error 17098 if err2 = args.Read(ctx, iprot); err2 != nil { 17099 iprot.ReadMessageEnd(ctx) 17100 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17101 oprot.WriteMessageBegin(ctx, "get_sender", thrift.EXCEPTION, seqId) 17102 x.Write(ctx, oprot) 17103 oprot.WriteMessageEnd(ctx) 17104 oprot.Flush(ctx) 17105 return false, thrift.WrapTException(err2) 17106 } 17107 iprot.ReadMessageEnd(ctx) 17108 17109 tickerCancel := func() {} 17110 // Start a goroutine to do server side connectivity check. 17111 if thrift.ServerConnectivityCheckInterval > 0 { 17112 var cancel context.CancelFunc 17113 ctx, cancel = context.WithCancel(ctx) 17114 defer cancel() 17115 var tickerCtx context.Context 17116 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17117 defer tickerCancel() 17118 go func(ctx context.Context, cancel context.CancelFunc) { 17119 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17120 defer ticker.Stop() 17121 for { 17122 select { 17123 case <-ctx.Done(): 17124 return 17125 case <-ticker.C: 17126 if !iprot.Transport().IsOpen() { 17127 cancel() 17128 return 17129 } 17130 } 17131 } 17132 }(tickerCtx, cancel) 17133 } 17134 17135 result := ApplyGetSenderResult{} 17136 var retval *Uint64 17137 if retval, err2 = p.handler.GetSender(ctx); err2 != nil { 17138 tickerCancel() 17139 if err2 == thrift.ErrAbandonRequest { 17140 return false, thrift.WrapTException(err2) 17141 } 17142 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_sender: " + err2.Error()) 17143 oprot.WriteMessageBegin(ctx, "get_sender", thrift.EXCEPTION, seqId) 17144 x.Write(ctx, oprot) 17145 oprot.WriteMessageEnd(ctx) 17146 oprot.Flush(ctx) 17147 return true, thrift.WrapTException(err2) 17148 } else { 17149 result.Success = retval 17150 } 17151 tickerCancel() 17152 if err2 = oprot.WriteMessageBegin(ctx, "get_sender", thrift.REPLY, seqId); err2 != nil { 17153 err = thrift.WrapTException(err2) 17154 } 17155 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 17156 err = thrift.WrapTException(err2) 17157 } 17158 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17159 err = thrift.WrapTException(err2) 17160 } 17161 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17162 err = thrift.WrapTException(err2) 17163 } 17164 if err != nil { 17165 return 17166 } 17167 return true, err 17168 } 17169 17170 type applyProcessorAssertSha256 struct { 17171 handler Apply 17172 } 17173 17174 func (p *applyProcessorAssertSha256) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17175 args := ApplyAssertSha256Args{} 17176 var err2 error 17177 if err2 = args.Read(ctx, iprot); err2 != nil { 17178 iprot.ReadMessageEnd(ctx) 17179 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17180 oprot.WriteMessageBegin(ctx, "assert_sha256", thrift.EXCEPTION, seqId) 17181 x.Write(ctx, oprot) 17182 oprot.WriteMessageEnd(ctx) 17183 oprot.Flush(ctx) 17184 return false, thrift.WrapTException(err2) 17185 } 17186 iprot.ReadMessageEnd(ctx) 17187 17188 tickerCancel := func() {} 17189 // Start a goroutine to do server side connectivity check. 17190 if thrift.ServerConnectivityCheckInterval > 0 { 17191 var cancel context.CancelFunc 17192 ctx, cancel = context.WithCancel(ctx) 17193 defer cancel() 17194 var tickerCtx context.Context 17195 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17196 defer tickerCancel() 17197 go func(ctx context.Context, cancel context.CancelFunc) { 17198 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17199 defer ticker.Stop() 17200 for { 17201 select { 17202 case <-ctx.Done(): 17203 return 17204 case <-ticker.C: 17205 if !iprot.Transport().IsOpen() { 17206 cancel() 17207 return 17208 } 17209 } 17210 } 17211 }(tickerCtx, cancel) 17212 } 17213 17214 result := ApplyAssertSha256Result{} 17215 if err2 = p.handler.AssertSha256(ctx, args.Data, args.Hash); err2 != nil { 17216 tickerCancel() 17217 if err2 == thrift.ErrAbandonRequest { 17218 return false, thrift.WrapTException(err2) 17219 } 17220 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing assert_sha256: " + err2.Error()) 17221 oprot.WriteMessageBegin(ctx, "assert_sha256", thrift.EXCEPTION, seqId) 17222 x.Write(ctx, oprot) 17223 oprot.WriteMessageEnd(ctx) 17224 oprot.Flush(ctx) 17225 return true, thrift.WrapTException(err2) 17226 } 17227 tickerCancel() 17228 if err2 = oprot.WriteMessageBegin(ctx, "assert_sha256", thrift.REPLY, seqId); err2 != nil { 17229 err = thrift.WrapTException(err2) 17230 } 17231 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 17232 err = thrift.WrapTException(err2) 17233 } 17234 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17235 err = thrift.WrapTException(err2) 17236 } 17237 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17238 err = thrift.WrapTException(err2) 17239 } 17240 if err != nil { 17241 return 17242 } 17243 return true, err 17244 } 17245 17246 type applyProcessorAssertSha1 struct { 17247 handler Apply 17248 } 17249 17250 func (p *applyProcessorAssertSha1) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17251 args := ApplyAssertSha1Args{} 17252 var err2 error 17253 if err2 = args.Read(ctx, iprot); err2 != nil { 17254 iprot.ReadMessageEnd(ctx) 17255 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17256 oprot.WriteMessageBegin(ctx, "assert_sha1", thrift.EXCEPTION, seqId) 17257 x.Write(ctx, oprot) 17258 oprot.WriteMessageEnd(ctx) 17259 oprot.Flush(ctx) 17260 return false, thrift.WrapTException(err2) 17261 } 17262 iprot.ReadMessageEnd(ctx) 17263 17264 tickerCancel := func() {} 17265 // Start a goroutine to do server side connectivity check. 17266 if thrift.ServerConnectivityCheckInterval > 0 { 17267 var cancel context.CancelFunc 17268 ctx, cancel = context.WithCancel(ctx) 17269 defer cancel() 17270 var tickerCtx context.Context 17271 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17272 defer tickerCancel() 17273 go func(ctx context.Context, cancel context.CancelFunc) { 17274 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17275 defer ticker.Stop() 17276 for { 17277 select { 17278 case <-ctx.Done(): 17279 return 17280 case <-ticker.C: 17281 if !iprot.Transport().IsOpen() { 17282 cancel() 17283 return 17284 } 17285 } 17286 } 17287 }(tickerCtx, cancel) 17288 } 17289 17290 result := ApplyAssertSha1Result{} 17291 if err2 = p.handler.AssertSha1(ctx, args.Data, args.Hash); err2 != nil { 17292 tickerCancel() 17293 if err2 == thrift.ErrAbandonRequest { 17294 return false, thrift.WrapTException(err2) 17295 } 17296 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing assert_sha1: " + err2.Error()) 17297 oprot.WriteMessageBegin(ctx, "assert_sha1", thrift.EXCEPTION, seqId) 17298 x.Write(ctx, oprot) 17299 oprot.WriteMessageEnd(ctx) 17300 oprot.Flush(ctx) 17301 return true, thrift.WrapTException(err2) 17302 } 17303 tickerCancel() 17304 if err2 = oprot.WriteMessageBegin(ctx, "assert_sha1", thrift.REPLY, seqId); err2 != nil { 17305 err = thrift.WrapTException(err2) 17306 } 17307 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 17308 err = thrift.WrapTException(err2) 17309 } 17310 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17311 err = thrift.WrapTException(err2) 17312 } 17313 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17314 err = thrift.WrapTException(err2) 17315 } 17316 if err != nil { 17317 return 17318 } 17319 return true, err 17320 } 17321 17322 type applyProcessorAssertSha512 struct { 17323 handler Apply 17324 } 17325 17326 func (p *applyProcessorAssertSha512) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17327 args := ApplyAssertSha512Args{} 17328 var err2 error 17329 if err2 = args.Read(ctx, iprot); err2 != nil { 17330 iprot.ReadMessageEnd(ctx) 17331 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17332 oprot.WriteMessageBegin(ctx, "assert_sha512", thrift.EXCEPTION, seqId) 17333 x.Write(ctx, oprot) 17334 oprot.WriteMessageEnd(ctx) 17335 oprot.Flush(ctx) 17336 return false, thrift.WrapTException(err2) 17337 } 17338 iprot.ReadMessageEnd(ctx) 17339 17340 tickerCancel := func() {} 17341 // Start a goroutine to do server side connectivity check. 17342 if thrift.ServerConnectivityCheckInterval > 0 { 17343 var cancel context.CancelFunc 17344 ctx, cancel = context.WithCancel(ctx) 17345 defer cancel() 17346 var tickerCtx context.Context 17347 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17348 defer tickerCancel() 17349 go func(ctx context.Context, cancel context.CancelFunc) { 17350 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17351 defer ticker.Stop() 17352 for { 17353 select { 17354 case <-ctx.Done(): 17355 return 17356 case <-ticker.C: 17357 if !iprot.Transport().IsOpen() { 17358 cancel() 17359 return 17360 } 17361 } 17362 } 17363 }(tickerCtx, cancel) 17364 } 17365 17366 result := ApplyAssertSha512Result{} 17367 if err2 = p.handler.AssertSha512(ctx, args.Data, args.Hash); err2 != nil { 17368 tickerCancel() 17369 if err2 == thrift.ErrAbandonRequest { 17370 return false, thrift.WrapTException(err2) 17371 } 17372 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing assert_sha512: " + err2.Error()) 17373 oprot.WriteMessageBegin(ctx, "assert_sha512", thrift.EXCEPTION, seqId) 17374 x.Write(ctx, oprot) 17375 oprot.WriteMessageEnd(ctx) 17376 oprot.Flush(ctx) 17377 return true, thrift.WrapTException(err2) 17378 } 17379 tickerCancel() 17380 if err2 = oprot.WriteMessageBegin(ctx, "assert_sha512", thrift.REPLY, seqId); err2 != nil { 17381 err = thrift.WrapTException(err2) 17382 } 17383 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 17384 err = thrift.WrapTException(err2) 17385 } 17386 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17387 err = thrift.WrapTException(err2) 17388 } 17389 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17390 err = thrift.WrapTException(err2) 17391 } 17392 if err != nil { 17393 return 17394 } 17395 return true, err 17396 } 17397 17398 type applyProcessorAssertRipemd160 struct { 17399 handler Apply 17400 } 17401 17402 func (p *applyProcessorAssertRipemd160) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17403 args := ApplyAssertRipemd160Args{} 17404 var err2 error 17405 if err2 = args.Read(ctx, iprot); err2 != nil { 17406 iprot.ReadMessageEnd(ctx) 17407 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17408 oprot.WriteMessageBegin(ctx, "assert_ripemd160", thrift.EXCEPTION, seqId) 17409 x.Write(ctx, oprot) 17410 oprot.WriteMessageEnd(ctx) 17411 oprot.Flush(ctx) 17412 return false, thrift.WrapTException(err2) 17413 } 17414 iprot.ReadMessageEnd(ctx) 17415 17416 tickerCancel := func() {} 17417 // Start a goroutine to do server side connectivity check. 17418 if thrift.ServerConnectivityCheckInterval > 0 { 17419 var cancel context.CancelFunc 17420 ctx, cancel = context.WithCancel(ctx) 17421 defer cancel() 17422 var tickerCtx context.Context 17423 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17424 defer tickerCancel() 17425 go func(ctx context.Context, cancel context.CancelFunc) { 17426 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17427 defer ticker.Stop() 17428 for { 17429 select { 17430 case <-ctx.Done(): 17431 return 17432 case <-ticker.C: 17433 if !iprot.Transport().IsOpen() { 17434 cancel() 17435 return 17436 } 17437 } 17438 } 17439 }(tickerCtx, cancel) 17440 } 17441 17442 result := ApplyAssertRipemd160Result{} 17443 if err2 = p.handler.AssertRipemd160(ctx, args.Data, args.Hash); err2 != nil { 17444 tickerCancel() 17445 if err2 == thrift.ErrAbandonRequest { 17446 return false, thrift.WrapTException(err2) 17447 } 17448 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing assert_ripemd160: " + err2.Error()) 17449 oprot.WriteMessageBegin(ctx, "assert_ripemd160", thrift.EXCEPTION, seqId) 17450 x.Write(ctx, oprot) 17451 oprot.WriteMessageEnd(ctx) 17452 oprot.Flush(ctx) 17453 return true, thrift.WrapTException(err2) 17454 } 17455 tickerCancel() 17456 if err2 = oprot.WriteMessageBegin(ctx, "assert_ripemd160", thrift.REPLY, seqId); err2 != nil { 17457 err = thrift.WrapTException(err2) 17458 } 17459 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 17460 err = thrift.WrapTException(err2) 17461 } 17462 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17463 err = thrift.WrapTException(err2) 17464 } 17465 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17466 err = thrift.WrapTException(err2) 17467 } 17468 if err != nil { 17469 return 17470 } 17471 return true, err 17472 } 17473 17474 type applyProcessorSha256 struct { 17475 handler Apply 17476 } 17477 17478 func (p *applyProcessorSha256) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17479 args := ApplySha256Args{} 17480 var err2 error 17481 if err2 = args.Read(ctx, iprot); err2 != nil { 17482 iprot.ReadMessageEnd(ctx) 17483 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17484 oprot.WriteMessageBegin(ctx, "sha256", thrift.EXCEPTION, seqId) 17485 x.Write(ctx, oprot) 17486 oprot.WriteMessageEnd(ctx) 17487 oprot.Flush(ctx) 17488 return false, thrift.WrapTException(err2) 17489 } 17490 iprot.ReadMessageEnd(ctx) 17491 17492 tickerCancel := func() {} 17493 // Start a goroutine to do server side connectivity check. 17494 if thrift.ServerConnectivityCheckInterval > 0 { 17495 var cancel context.CancelFunc 17496 ctx, cancel = context.WithCancel(ctx) 17497 defer cancel() 17498 var tickerCtx context.Context 17499 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17500 defer tickerCancel() 17501 go func(ctx context.Context, cancel context.CancelFunc) { 17502 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17503 defer ticker.Stop() 17504 for { 17505 select { 17506 case <-ctx.Done(): 17507 return 17508 case <-ticker.C: 17509 if !iprot.Transport().IsOpen() { 17510 cancel() 17511 return 17512 } 17513 } 17514 } 17515 }(tickerCtx, cancel) 17516 } 17517 17518 result := ApplySha256Result{} 17519 var retval []byte 17520 if retval, err2 = p.handler.Sha256(ctx, args.Data); err2 != nil { 17521 tickerCancel() 17522 if err2 == thrift.ErrAbandonRequest { 17523 return false, thrift.WrapTException(err2) 17524 } 17525 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing sha256: " + err2.Error()) 17526 oprot.WriteMessageBegin(ctx, "sha256", thrift.EXCEPTION, seqId) 17527 x.Write(ctx, oprot) 17528 oprot.WriteMessageEnd(ctx) 17529 oprot.Flush(ctx) 17530 return true, thrift.WrapTException(err2) 17531 } else { 17532 result.Success = retval 17533 } 17534 tickerCancel() 17535 if err2 = oprot.WriteMessageBegin(ctx, "sha256", thrift.REPLY, seqId); err2 != nil { 17536 err = thrift.WrapTException(err2) 17537 } 17538 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 17539 err = thrift.WrapTException(err2) 17540 } 17541 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17542 err = thrift.WrapTException(err2) 17543 } 17544 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17545 err = thrift.WrapTException(err2) 17546 } 17547 if err != nil { 17548 return 17549 } 17550 return true, err 17551 } 17552 17553 type applyProcessorSha1 struct { 17554 handler Apply 17555 } 17556 17557 func (p *applyProcessorSha1) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17558 args := ApplySha1Args{} 17559 var err2 error 17560 if err2 = args.Read(ctx, iprot); err2 != nil { 17561 iprot.ReadMessageEnd(ctx) 17562 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17563 oprot.WriteMessageBegin(ctx, "sha1", thrift.EXCEPTION, seqId) 17564 x.Write(ctx, oprot) 17565 oprot.WriteMessageEnd(ctx) 17566 oprot.Flush(ctx) 17567 return false, thrift.WrapTException(err2) 17568 } 17569 iprot.ReadMessageEnd(ctx) 17570 17571 tickerCancel := func() {} 17572 // Start a goroutine to do server side connectivity check. 17573 if thrift.ServerConnectivityCheckInterval > 0 { 17574 var cancel context.CancelFunc 17575 ctx, cancel = context.WithCancel(ctx) 17576 defer cancel() 17577 var tickerCtx context.Context 17578 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17579 defer tickerCancel() 17580 go func(ctx context.Context, cancel context.CancelFunc) { 17581 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17582 defer ticker.Stop() 17583 for { 17584 select { 17585 case <-ctx.Done(): 17586 return 17587 case <-ticker.C: 17588 if !iprot.Transport().IsOpen() { 17589 cancel() 17590 return 17591 } 17592 } 17593 } 17594 }(tickerCtx, cancel) 17595 } 17596 17597 result := ApplySha1Result{} 17598 var retval []byte 17599 if retval, err2 = p.handler.Sha1(ctx, args.Data); err2 != nil { 17600 tickerCancel() 17601 if err2 == thrift.ErrAbandonRequest { 17602 return false, thrift.WrapTException(err2) 17603 } 17604 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing sha1: " + err2.Error()) 17605 oprot.WriteMessageBegin(ctx, "sha1", thrift.EXCEPTION, seqId) 17606 x.Write(ctx, oprot) 17607 oprot.WriteMessageEnd(ctx) 17608 oprot.Flush(ctx) 17609 return true, thrift.WrapTException(err2) 17610 } else { 17611 result.Success = retval 17612 } 17613 tickerCancel() 17614 if err2 = oprot.WriteMessageBegin(ctx, "sha1", thrift.REPLY, seqId); err2 != nil { 17615 err = thrift.WrapTException(err2) 17616 } 17617 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 17618 err = thrift.WrapTException(err2) 17619 } 17620 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17621 err = thrift.WrapTException(err2) 17622 } 17623 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17624 err = thrift.WrapTException(err2) 17625 } 17626 if err != nil { 17627 return 17628 } 17629 return true, err 17630 } 17631 17632 type applyProcessorSha512 struct { 17633 handler Apply 17634 } 17635 17636 func (p *applyProcessorSha512) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17637 args := ApplySha512Args{} 17638 var err2 error 17639 if err2 = args.Read(ctx, iprot); err2 != nil { 17640 iprot.ReadMessageEnd(ctx) 17641 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17642 oprot.WriteMessageBegin(ctx, "sha512", thrift.EXCEPTION, seqId) 17643 x.Write(ctx, oprot) 17644 oprot.WriteMessageEnd(ctx) 17645 oprot.Flush(ctx) 17646 return false, thrift.WrapTException(err2) 17647 } 17648 iprot.ReadMessageEnd(ctx) 17649 17650 tickerCancel := func() {} 17651 // Start a goroutine to do server side connectivity check. 17652 if thrift.ServerConnectivityCheckInterval > 0 { 17653 var cancel context.CancelFunc 17654 ctx, cancel = context.WithCancel(ctx) 17655 defer cancel() 17656 var tickerCtx context.Context 17657 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17658 defer tickerCancel() 17659 go func(ctx context.Context, cancel context.CancelFunc) { 17660 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17661 defer ticker.Stop() 17662 for { 17663 select { 17664 case <-ctx.Done(): 17665 return 17666 case <-ticker.C: 17667 if !iprot.Transport().IsOpen() { 17668 cancel() 17669 return 17670 } 17671 } 17672 } 17673 }(tickerCtx, cancel) 17674 } 17675 17676 result := ApplySha512Result{} 17677 var retval []byte 17678 if retval, err2 = p.handler.Sha512(ctx, args.Data); err2 != nil { 17679 tickerCancel() 17680 if err2 == thrift.ErrAbandonRequest { 17681 return false, thrift.WrapTException(err2) 17682 } 17683 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing sha512: " + err2.Error()) 17684 oprot.WriteMessageBegin(ctx, "sha512", thrift.EXCEPTION, seqId) 17685 x.Write(ctx, oprot) 17686 oprot.WriteMessageEnd(ctx) 17687 oprot.Flush(ctx) 17688 return true, thrift.WrapTException(err2) 17689 } else { 17690 result.Success = retval 17691 } 17692 tickerCancel() 17693 if err2 = oprot.WriteMessageBegin(ctx, "sha512", thrift.REPLY, seqId); err2 != nil { 17694 err = thrift.WrapTException(err2) 17695 } 17696 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 17697 err = thrift.WrapTException(err2) 17698 } 17699 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17700 err = thrift.WrapTException(err2) 17701 } 17702 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17703 err = thrift.WrapTException(err2) 17704 } 17705 if err != nil { 17706 return 17707 } 17708 return true, err 17709 } 17710 17711 type applyProcessorRipemd160 struct { 17712 handler Apply 17713 } 17714 17715 func (p *applyProcessorRipemd160) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17716 args := ApplyRipemd160Args{} 17717 var err2 error 17718 if err2 = args.Read(ctx, iprot); err2 != nil { 17719 iprot.ReadMessageEnd(ctx) 17720 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17721 oprot.WriteMessageBegin(ctx, "ripemd160", thrift.EXCEPTION, seqId) 17722 x.Write(ctx, oprot) 17723 oprot.WriteMessageEnd(ctx) 17724 oprot.Flush(ctx) 17725 return false, thrift.WrapTException(err2) 17726 } 17727 iprot.ReadMessageEnd(ctx) 17728 17729 tickerCancel := func() {} 17730 // Start a goroutine to do server side connectivity check. 17731 if thrift.ServerConnectivityCheckInterval > 0 { 17732 var cancel context.CancelFunc 17733 ctx, cancel = context.WithCancel(ctx) 17734 defer cancel() 17735 var tickerCtx context.Context 17736 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17737 defer tickerCancel() 17738 go func(ctx context.Context, cancel context.CancelFunc) { 17739 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17740 defer ticker.Stop() 17741 for { 17742 select { 17743 case <-ctx.Done(): 17744 return 17745 case <-ticker.C: 17746 if !iprot.Transport().IsOpen() { 17747 cancel() 17748 return 17749 } 17750 } 17751 } 17752 }(tickerCtx, cancel) 17753 } 17754 17755 result := ApplyRipemd160Result{} 17756 var retval []byte 17757 if retval, err2 = p.handler.Ripemd160(ctx, args.Data); err2 != nil { 17758 tickerCancel() 17759 if err2 == thrift.ErrAbandonRequest { 17760 return false, thrift.WrapTException(err2) 17761 } 17762 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing ripemd160: " + err2.Error()) 17763 oprot.WriteMessageBegin(ctx, "ripemd160", thrift.EXCEPTION, seqId) 17764 x.Write(ctx, oprot) 17765 oprot.WriteMessageEnd(ctx) 17766 oprot.Flush(ctx) 17767 return true, thrift.WrapTException(err2) 17768 } else { 17769 result.Success = retval 17770 } 17771 tickerCancel() 17772 if err2 = oprot.WriteMessageBegin(ctx, "ripemd160", thrift.REPLY, seqId); err2 != nil { 17773 err = thrift.WrapTException(err2) 17774 } 17775 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 17776 err = thrift.WrapTException(err2) 17777 } 17778 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17779 err = thrift.WrapTException(err2) 17780 } 17781 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17782 err = thrift.WrapTException(err2) 17783 } 17784 if err != nil { 17785 return 17786 } 17787 return true, err 17788 } 17789 17790 type applyProcessorRecoverKey struct { 17791 handler Apply 17792 } 17793 17794 func (p *applyProcessorRecoverKey) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17795 args := ApplyRecoverKeyArgs{} 17796 var err2 error 17797 if err2 = args.Read(ctx, iprot); err2 != nil { 17798 iprot.ReadMessageEnd(ctx) 17799 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17800 oprot.WriteMessageBegin(ctx, "recover_key", thrift.EXCEPTION, seqId) 17801 x.Write(ctx, oprot) 17802 oprot.WriteMessageEnd(ctx) 17803 oprot.Flush(ctx) 17804 return false, thrift.WrapTException(err2) 17805 } 17806 iprot.ReadMessageEnd(ctx) 17807 17808 tickerCancel := func() {} 17809 // Start a goroutine to do server side connectivity check. 17810 if thrift.ServerConnectivityCheckInterval > 0 { 17811 var cancel context.CancelFunc 17812 ctx, cancel = context.WithCancel(ctx) 17813 defer cancel() 17814 var tickerCtx context.Context 17815 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17816 defer tickerCancel() 17817 go func(ctx context.Context, cancel context.CancelFunc) { 17818 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17819 defer ticker.Stop() 17820 for { 17821 select { 17822 case <-ctx.Done(): 17823 return 17824 case <-ticker.C: 17825 if !iprot.Transport().IsOpen() { 17826 cancel() 17827 return 17828 } 17829 } 17830 } 17831 }(tickerCtx, cancel) 17832 } 17833 17834 result := ApplyRecoverKeyResult{} 17835 var retval []byte 17836 if retval, err2 = p.handler.RecoverKey(ctx, args.Digest, args.Sig); err2 != nil { 17837 tickerCancel() 17838 if err2 == thrift.ErrAbandonRequest { 17839 return false, thrift.WrapTException(err2) 17840 } 17841 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing recover_key: " + err2.Error()) 17842 oprot.WriteMessageBegin(ctx, "recover_key", thrift.EXCEPTION, seqId) 17843 x.Write(ctx, oprot) 17844 oprot.WriteMessageEnd(ctx) 17845 oprot.Flush(ctx) 17846 return true, thrift.WrapTException(err2) 17847 } else { 17848 result.Success = retval 17849 } 17850 tickerCancel() 17851 if err2 = oprot.WriteMessageBegin(ctx, "recover_key", thrift.REPLY, seqId); err2 != nil { 17852 err = thrift.WrapTException(err2) 17853 } 17854 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 17855 err = thrift.WrapTException(err2) 17856 } 17857 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17858 err = thrift.WrapTException(err2) 17859 } 17860 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17861 err = thrift.WrapTException(err2) 17862 } 17863 if err != nil { 17864 return 17865 } 17866 return true, err 17867 } 17868 17869 type applyProcessorAssertRecoverKey struct { 17870 handler Apply 17871 } 17872 17873 func (p *applyProcessorAssertRecoverKey) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17874 args := ApplyAssertRecoverKeyArgs{} 17875 var err2 error 17876 if err2 = args.Read(ctx, iprot); err2 != nil { 17877 iprot.ReadMessageEnd(ctx) 17878 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17879 oprot.WriteMessageBegin(ctx, "assert_recover_key", thrift.EXCEPTION, seqId) 17880 x.Write(ctx, oprot) 17881 oprot.WriteMessageEnd(ctx) 17882 oprot.Flush(ctx) 17883 return false, thrift.WrapTException(err2) 17884 } 17885 iprot.ReadMessageEnd(ctx) 17886 17887 tickerCancel := func() {} 17888 // Start a goroutine to do server side connectivity check. 17889 if thrift.ServerConnectivityCheckInterval > 0 { 17890 var cancel context.CancelFunc 17891 ctx, cancel = context.WithCancel(ctx) 17892 defer cancel() 17893 var tickerCtx context.Context 17894 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17895 defer tickerCancel() 17896 go func(ctx context.Context, cancel context.CancelFunc) { 17897 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17898 defer ticker.Stop() 17899 for { 17900 select { 17901 case <-ctx.Done(): 17902 return 17903 case <-ticker.C: 17904 if !iprot.Transport().IsOpen() { 17905 cancel() 17906 return 17907 } 17908 } 17909 } 17910 }(tickerCtx, cancel) 17911 } 17912 17913 result := ApplyAssertRecoverKeyResult{} 17914 if err2 = p.handler.AssertRecoverKey(ctx, args.Digest, args.Sig, args.Pub); err2 != nil { 17915 tickerCancel() 17916 if err2 == thrift.ErrAbandonRequest { 17917 return false, thrift.WrapTException(err2) 17918 } 17919 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing assert_recover_key: " + err2.Error()) 17920 oprot.WriteMessageBegin(ctx, "assert_recover_key", thrift.EXCEPTION, seqId) 17921 x.Write(ctx, oprot) 17922 oprot.WriteMessageEnd(ctx) 17923 oprot.Flush(ctx) 17924 return true, thrift.WrapTException(err2) 17925 } 17926 tickerCancel() 17927 if err2 = oprot.WriteMessageBegin(ctx, "assert_recover_key", thrift.REPLY, seqId); err2 != nil { 17928 err = thrift.WrapTException(err2) 17929 } 17930 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 17931 err = thrift.WrapTException(err2) 17932 } 17933 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 17934 err = thrift.WrapTException(err2) 17935 } 17936 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 17937 err = thrift.WrapTException(err2) 17938 } 17939 if err != nil { 17940 return 17941 } 17942 return true, err 17943 } 17944 17945 type applyProcessorSendDeferred struct { 17946 handler Apply 17947 } 17948 17949 func (p *applyProcessorSendDeferred) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 17950 args := ApplySendDeferredArgs{} 17951 var err2 error 17952 if err2 = args.Read(ctx, iprot); err2 != nil { 17953 iprot.ReadMessageEnd(ctx) 17954 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 17955 oprot.WriteMessageBegin(ctx, "send_deferred", thrift.EXCEPTION, seqId) 17956 x.Write(ctx, oprot) 17957 oprot.WriteMessageEnd(ctx) 17958 oprot.Flush(ctx) 17959 return false, thrift.WrapTException(err2) 17960 } 17961 iprot.ReadMessageEnd(ctx) 17962 17963 tickerCancel := func() {} 17964 // Start a goroutine to do server side connectivity check. 17965 if thrift.ServerConnectivityCheckInterval > 0 { 17966 var cancel context.CancelFunc 17967 ctx, cancel = context.WithCancel(ctx) 17968 defer cancel() 17969 var tickerCtx context.Context 17970 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 17971 defer tickerCancel() 17972 go func(ctx context.Context, cancel context.CancelFunc) { 17973 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 17974 defer ticker.Stop() 17975 for { 17976 select { 17977 case <-ctx.Done(): 17978 return 17979 case <-ticker.C: 17980 if !iprot.Transport().IsOpen() { 17981 cancel() 17982 return 17983 } 17984 } 17985 } 17986 }(tickerCtx, cancel) 17987 } 17988 17989 result := ApplySendDeferredResult{} 17990 if err2 = p.handler.SendDeferred(ctx, args.SenderID, args.Payer, args.SerializedTransaction, args.ReplaceExisting); err2 != nil { 17991 tickerCancel() 17992 if err2 == thrift.ErrAbandonRequest { 17993 return false, thrift.WrapTException(err2) 17994 } 17995 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing send_deferred: " + err2.Error()) 17996 oprot.WriteMessageBegin(ctx, "send_deferred", thrift.EXCEPTION, seqId) 17997 x.Write(ctx, oprot) 17998 oprot.WriteMessageEnd(ctx) 17999 oprot.Flush(ctx) 18000 return true, thrift.WrapTException(err2) 18001 } 18002 tickerCancel() 18003 if err2 = oprot.WriteMessageBegin(ctx, "send_deferred", thrift.REPLY, seqId); err2 != nil { 18004 err = thrift.WrapTException(err2) 18005 } 18006 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18007 err = thrift.WrapTException(err2) 18008 } 18009 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18010 err = thrift.WrapTException(err2) 18011 } 18012 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18013 err = thrift.WrapTException(err2) 18014 } 18015 if err != nil { 18016 return 18017 } 18018 return true, err 18019 } 18020 18021 type applyProcessorCancelDeferred struct { 18022 handler Apply 18023 } 18024 18025 func (p *applyProcessorCancelDeferred) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18026 args := ApplyCancelDeferredArgs{} 18027 var err2 error 18028 if err2 = args.Read(ctx, iprot); err2 != nil { 18029 iprot.ReadMessageEnd(ctx) 18030 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18031 oprot.WriteMessageBegin(ctx, "cancel_deferred", thrift.EXCEPTION, seqId) 18032 x.Write(ctx, oprot) 18033 oprot.WriteMessageEnd(ctx) 18034 oprot.Flush(ctx) 18035 return false, thrift.WrapTException(err2) 18036 } 18037 iprot.ReadMessageEnd(ctx) 18038 18039 tickerCancel := func() {} 18040 // Start a goroutine to do server side connectivity check. 18041 if thrift.ServerConnectivityCheckInterval > 0 { 18042 var cancel context.CancelFunc 18043 ctx, cancel = context.WithCancel(ctx) 18044 defer cancel() 18045 var tickerCtx context.Context 18046 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18047 defer tickerCancel() 18048 go func(ctx context.Context, cancel context.CancelFunc) { 18049 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18050 defer ticker.Stop() 18051 for { 18052 select { 18053 case <-ctx.Done(): 18054 return 18055 case <-ticker.C: 18056 if !iprot.Transport().IsOpen() { 18057 cancel() 18058 return 18059 } 18060 } 18061 } 18062 }(tickerCtx, cancel) 18063 } 18064 18065 result := ApplyCancelDeferredResult{} 18066 var retval int32 18067 if retval, err2 = p.handler.CancelDeferred(ctx, args.SenderID); err2 != nil { 18068 tickerCancel() 18069 if err2 == thrift.ErrAbandonRequest { 18070 return false, thrift.WrapTException(err2) 18071 } 18072 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing cancel_deferred: " + err2.Error()) 18073 oprot.WriteMessageBegin(ctx, "cancel_deferred", thrift.EXCEPTION, seqId) 18074 x.Write(ctx, oprot) 18075 oprot.WriteMessageEnd(ctx) 18076 oprot.Flush(ctx) 18077 return true, thrift.WrapTException(err2) 18078 } else { 18079 result.Success = &retval 18080 } 18081 tickerCancel() 18082 if err2 = oprot.WriteMessageBegin(ctx, "cancel_deferred", thrift.REPLY, seqId); err2 != nil { 18083 err = thrift.WrapTException(err2) 18084 } 18085 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18086 err = thrift.WrapTException(err2) 18087 } 18088 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18089 err = thrift.WrapTException(err2) 18090 } 18091 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18092 err = thrift.WrapTException(err2) 18093 } 18094 if err != nil { 18095 return 18096 } 18097 return true, err 18098 } 18099 18100 type applyProcessorReadTransaction struct { 18101 handler Apply 18102 } 18103 18104 func (p *applyProcessorReadTransaction) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18105 args := ApplyReadTransactionArgs{} 18106 var err2 error 18107 if err2 = args.Read(ctx, iprot); err2 != nil { 18108 iprot.ReadMessageEnd(ctx) 18109 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18110 oprot.WriteMessageBegin(ctx, "read_transaction", thrift.EXCEPTION, seqId) 18111 x.Write(ctx, oprot) 18112 oprot.WriteMessageEnd(ctx) 18113 oprot.Flush(ctx) 18114 return false, thrift.WrapTException(err2) 18115 } 18116 iprot.ReadMessageEnd(ctx) 18117 18118 tickerCancel := func() {} 18119 // Start a goroutine to do server side connectivity check. 18120 if thrift.ServerConnectivityCheckInterval > 0 { 18121 var cancel context.CancelFunc 18122 ctx, cancel = context.WithCancel(ctx) 18123 defer cancel() 18124 var tickerCtx context.Context 18125 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18126 defer tickerCancel() 18127 go func(ctx context.Context, cancel context.CancelFunc) { 18128 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18129 defer ticker.Stop() 18130 for { 18131 select { 18132 case <-ctx.Done(): 18133 return 18134 case <-ticker.C: 18135 if !iprot.Transport().IsOpen() { 18136 cancel() 18137 return 18138 } 18139 } 18140 } 18141 }(tickerCtx, cancel) 18142 } 18143 18144 result := ApplyReadTransactionResult{} 18145 var retval []byte 18146 if retval, err2 = p.handler.ReadTransaction(ctx); err2 != nil { 18147 tickerCancel() 18148 if err2 == thrift.ErrAbandonRequest { 18149 return false, thrift.WrapTException(err2) 18150 } 18151 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing read_transaction: " + err2.Error()) 18152 oprot.WriteMessageBegin(ctx, "read_transaction", thrift.EXCEPTION, seqId) 18153 x.Write(ctx, oprot) 18154 oprot.WriteMessageEnd(ctx) 18155 oprot.Flush(ctx) 18156 return true, thrift.WrapTException(err2) 18157 } else { 18158 result.Success = retval 18159 } 18160 tickerCancel() 18161 if err2 = oprot.WriteMessageBegin(ctx, "read_transaction", thrift.REPLY, seqId); err2 != nil { 18162 err = thrift.WrapTException(err2) 18163 } 18164 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18165 err = thrift.WrapTException(err2) 18166 } 18167 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18168 err = thrift.WrapTException(err2) 18169 } 18170 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18171 err = thrift.WrapTException(err2) 18172 } 18173 if err != nil { 18174 return 18175 } 18176 return true, err 18177 } 18178 18179 type applyProcessorTransactionSize struct { 18180 handler Apply 18181 } 18182 18183 func (p *applyProcessorTransactionSize) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18184 args := ApplyTransactionSizeArgs{} 18185 var err2 error 18186 if err2 = args.Read(ctx, iprot); err2 != nil { 18187 iprot.ReadMessageEnd(ctx) 18188 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18189 oprot.WriteMessageBegin(ctx, "transaction_size", thrift.EXCEPTION, seqId) 18190 x.Write(ctx, oprot) 18191 oprot.WriteMessageEnd(ctx) 18192 oprot.Flush(ctx) 18193 return false, thrift.WrapTException(err2) 18194 } 18195 iprot.ReadMessageEnd(ctx) 18196 18197 tickerCancel := func() {} 18198 // Start a goroutine to do server side connectivity check. 18199 if thrift.ServerConnectivityCheckInterval > 0 { 18200 var cancel context.CancelFunc 18201 ctx, cancel = context.WithCancel(ctx) 18202 defer cancel() 18203 var tickerCtx context.Context 18204 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18205 defer tickerCancel() 18206 go func(ctx context.Context, cancel context.CancelFunc) { 18207 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18208 defer ticker.Stop() 18209 for { 18210 select { 18211 case <-ctx.Done(): 18212 return 18213 case <-ticker.C: 18214 if !iprot.Transport().IsOpen() { 18215 cancel() 18216 return 18217 } 18218 } 18219 } 18220 }(tickerCtx, cancel) 18221 } 18222 18223 result := ApplyTransactionSizeResult{} 18224 var retval int32 18225 if retval, err2 = p.handler.TransactionSize(ctx); err2 != nil { 18226 tickerCancel() 18227 if err2 == thrift.ErrAbandonRequest { 18228 return false, thrift.WrapTException(err2) 18229 } 18230 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing transaction_size: " + err2.Error()) 18231 oprot.WriteMessageBegin(ctx, "transaction_size", thrift.EXCEPTION, seqId) 18232 x.Write(ctx, oprot) 18233 oprot.WriteMessageEnd(ctx) 18234 oprot.Flush(ctx) 18235 return true, thrift.WrapTException(err2) 18236 } else { 18237 result.Success = &retval 18238 } 18239 tickerCancel() 18240 if err2 = oprot.WriteMessageBegin(ctx, "transaction_size", thrift.REPLY, seqId); err2 != nil { 18241 err = thrift.WrapTException(err2) 18242 } 18243 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18244 err = thrift.WrapTException(err2) 18245 } 18246 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18247 err = thrift.WrapTException(err2) 18248 } 18249 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18250 err = thrift.WrapTException(err2) 18251 } 18252 if err != nil { 18253 return 18254 } 18255 return true, err 18256 } 18257 18258 type applyProcessorTaposBlockNum struct { 18259 handler Apply 18260 } 18261 18262 func (p *applyProcessorTaposBlockNum) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18263 args := ApplyTaposBlockNumArgs{} 18264 var err2 error 18265 if err2 = args.Read(ctx, iprot); err2 != nil { 18266 iprot.ReadMessageEnd(ctx) 18267 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18268 oprot.WriteMessageBegin(ctx, "tapos_block_num", thrift.EXCEPTION, seqId) 18269 x.Write(ctx, oprot) 18270 oprot.WriteMessageEnd(ctx) 18271 oprot.Flush(ctx) 18272 return false, thrift.WrapTException(err2) 18273 } 18274 iprot.ReadMessageEnd(ctx) 18275 18276 tickerCancel := func() {} 18277 // Start a goroutine to do server side connectivity check. 18278 if thrift.ServerConnectivityCheckInterval > 0 { 18279 var cancel context.CancelFunc 18280 ctx, cancel = context.WithCancel(ctx) 18281 defer cancel() 18282 var tickerCtx context.Context 18283 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18284 defer tickerCancel() 18285 go func(ctx context.Context, cancel context.CancelFunc) { 18286 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18287 defer ticker.Stop() 18288 for { 18289 select { 18290 case <-ctx.Done(): 18291 return 18292 case <-ticker.C: 18293 if !iprot.Transport().IsOpen() { 18294 cancel() 18295 return 18296 } 18297 } 18298 } 18299 }(tickerCtx, cancel) 18300 } 18301 18302 result := ApplyTaposBlockNumResult{} 18303 var retval int32 18304 if retval, err2 = p.handler.TaposBlockNum(ctx); err2 != nil { 18305 tickerCancel() 18306 if err2 == thrift.ErrAbandonRequest { 18307 return false, thrift.WrapTException(err2) 18308 } 18309 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing tapos_block_num: " + err2.Error()) 18310 oprot.WriteMessageBegin(ctx, "tapos_block_num", thrift.EXCEPTION, seqId) 18311 x.Write(ctx, oprot) 18312 oprot.WriteMessageEnd(ctx) 18313 oprot.Flush(ctx) 18314 return true, thrift.WrapTException(err2) 18315 } else { 18316 result.Success = &retval 18317 } 18318 tickerCancel() 18319 if err2 = oprot.WriteMessageBegin(ctx, "tapos_block_num", thrift.REPLY, seqId); err2 != nil { 18320 err = thrift.WrapTException(err2) 18321 } 18322 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18323 err = thrift.WrapTException(err2) 18324 } 18325 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18326 err = thrift.WrapTException(err2) 18327 } 18328 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18329 err = thrift.WrapTException(err2) 18330 } 18331 if err != nil { 18332 return 18333 } 18334 return true, err 18335 } 18336 18337 type applyProcessorTaposBlockPrefix struct { 18338 handler Apply 18339 } 18340 18341 func (p *applyProcessorTaposBlockPrefix) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18342 args := ApplyTaposBlockPrefixArgs{} 18343 var err2 error 18344 if err2 = args.Read(ctx, iprot); err2 != nil { 18345 iprot.ReadMessageEnd(ctx) 18346 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18347 oprot.WriteMessageBegin(ctx, "tapos_block_prefix", thrift.EXCEPTION, seqId) 18348 x.Write(ctx, oprot) 18349 oprot.WriteMessageEnd(ctx) 18350 oprot.Flush(ctx) 18351 return false, thrift.WrapTException(err2) 18352 } 18353 iprot.ReadMessageEnd(ctx) 18354 18355 tickerCancel := func() {} 18356 // Start a goroutine to do server side connectivity check. 18357 if thrift.ServerConnectivityCheckInterval > 0 { 18358 var cancel context.CancelFunc 18359 ctx, cancel = context.WithCancel(ctx) 18360 defer cancel() 18361 var tickerCtx context.Context 18362 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18363 defer tickerCancel() 18364 go func(ctx context.Context, cancel context.CancelFunc) { 18365 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18366 defer ticker.Stop() 18367 for { 18368 select { 18369 case <-ctx.Done(): 18370 return 18371 case <-ticker.C: 18372 if !iprot.Transport().IsOpen() { 18373 cancel() 18374 return 18375 } 18376 } 18377 } 18378 }(tickerCtx, cancel) 18379 } 18380 18381 result := ApplyTaposBlockPrefixResult{} 18382 var retval int32 18383 if retval, err2 = p.handler.TaposBlockPrefix(ctx); err2 != nil { 18384 tickerCancel() 18385 if err2 == thrift.ErrAbandonRequest { 18386 return false, thrift.WrapTException(err2) 18387 } 18388 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing tapos_block_prefix: " + err2.Error()) 18389 oprot.WriteMessageBegin(ctx, "tapos_block_prefix", thrift.EXCEPTION, seqId) 18390 x.Write(ctx, oprot) 18391 oprot.WriteMessageEnd(ctx) 18392 oprot.Flush(ctx) 18393 return true, thrift.WrapTException(err2) 18394 } else { 18395 result.Success = &retval 18396 } 18397 tickerCancel() 18398 if err2 = oprot.WriteMessageBegin(ctx, "tapos_block_prefix", thrift.REPLY, seqId); err2 != nil { 18399 err = thrift.WrapTException(err2) 18400 } 18401 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18402 err = thrift.WrapTException(err2) 18403 } 18404 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18405 err = thrift.WrapTException(err2) 18406 } 18407 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18408 err = thrift.WrapTException(err2) 18409 } 18410 if err != nil { 18411 return 18412 } 18413 return true, err 18414 } 18415 18416 type applyProcessorExpiration struct { 18417 handler Apply 18418 } 18419 18420 func (p *applyProcessorExpiration) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18421 args := ApplyExpirationArgs{} 18422 var err2 error 18423 if err2 = args.Read(ctx, iprot); err2 != nil { 18424 iprot.ReadMessageEnd(ctx) 18425 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18426 oprot.WriteMessageBegin(ctx, "expiration", thrift.EXCEPTION, seqId) 18427 x.Write(ctx, oprot) 18428 oprot.WriteMessageEnd(ctx) 18429 oprot.Flush(ctx) 18430 return false, thrift.WrapTException(err2) 18431 } 18432 iprot.ReadMessageEnd(ctx) 18433 18434 tickerCancel := func() {} 18435 // Start a goroutine to do server side connectivity check. 18436 if thrift.ServerConnectivityCheckInterval > 0 { 18437 var cancel context.CancelFunc 18438 ctx, cancel = context.WithCancel(ctx) 18439 defer cancel() 18440 var tickerCtx context.Context 18441 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18442 defer tickerCancel() 18443 go func(ctx context.Context, cancel context.CancelFunc) { 18444 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18445 defer ticker.Stop() 18446 for { 18447 select { 18448 case <-ctx.Done(): 18449 return 18450 case <-ticker.C: 18451 if !iprot.Transport().IsOpen() { 18452 cancel() 18453 return 18454 } 18455 } 18456 } 18457 }(tickerCtx, cancel) 18458 } 18459 18460 result := ApplyExpirationResult{} 18461 var retval int64 18462 if retval, err2 = p.handler.Expiration(ctx); err2 != nil { 18463 tickerCancel() 18464 if err2 == thrift.ErrAbandonRequest { 18465 return false, thrift.WrapTException(err2) 18466 } 18467 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing expiration: " + err2.Error()) 18468 oprot.WriteMessageBegin(ctx, "expiration", thrift.EXCEPTION, seqId) 18469 x.Write(ctx, oprot) 18470 oprot.WriteMessageEnd(ctx) 18471 oprot.Flush(ctx) 18472 return true, thrift.WrapTException(err2) 18473 } else { 18474 result.Success = &retval 18475 } 18476 tickerCancel() 18477 if err2 = oprot.WriteMessageBegin(ctx, "expiration", thrift.REPLY, seqId); err2 != nil { 18478 err = thrift.WrapTException(err2) 18479 } 18480 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18481 err = thrift.WrapTException(err2) 18482 } 18483 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18484 err = thrift.WrapTException(err2) 18485 } 18486 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18487 err = thrift.WrapTException(err2) 18488 } 18489 if err != nil { 18490 return 18491 } 18492 return true, err 18493 } 18494 18495 type applyProcessorGetAction struct { 18496 handler Apply 18497 } 18498 18499 func (p *applyProcessorGetAction) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18500 args := ApplyGetActionArgs{} 18501 var err2 error 18502 if err2 = args.Read(ctx, iprot); err2 != nil { 18503 iprot.ReadMessageEnd(ctx) 18504 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18505 oprot.WriteMessageBegin(ctx, "get_action", thrift.EXCEPTION, seqId) 18506 x.Write(ctx, oprot) 18507 oprot.WriteMessageEnd(ctx) 18508 oprot.Flush(ctx) 18509 return false, thrift.WrapTException(err2) 18510 } 18511 iprot.ReadMessageEnd(ctx) 18512 18513 tickerCancel := func() {} 18514 // Start a goroutine to do server side connectivity check. 18515 if thrift.ServerConnectivityCheckInterval > 0 { 18516 var cancel context.CancelFunc 18517 ctx, cancel = context.WithCancel(ctx) 18518 defer cancel() 18519 var tickerCtx context.Context 18520 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18521 defer tickerCancel() 18522 go func(ctx context.Context, cancel context.CancelFunc) { 18523 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18524 defer ticker.Stop() 18525 for { 18526 select { 18527 case <-ctx.Done(): 18528 return 18529 case <-ticker.C: 18530 if !iprot.Transport().IsOpen() { 18531 cancel() 18532 return 18533 } 18534 } 18535 } 18536 }(tickerCtx, cancel) 18537 } 18538 18539 result := ApplyGetActionResult{} 18540 var retval []byte 18541 if retval, err2 = p.handler.GetAction(ctx, args._type, args.Index); err2 != nil { 18542 tickerCancel() 18543 if err2 == thrift.ErrAbandonRequest { 18544 return false, thrift.WrapTException(err2) 18545 } 18546 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_action: " + err2.Error()) 18547 oprot.WriteMessageBegin(ctx, "get_action", thrift.EXCEPTION, seqId) 18548 x.Write(ctx, oprot) 18549 oprot.WriteMessageEnd(ctx) 18550 oprot.Flush(ctx) 18551 return true, thrift.WrapTException(err2) 18552 } else { 18553 result.Success = retval 18554 } 18555 tickerCancel() 18556 if err2 = oprot.WriteMessageBegin(ctx, "get_action", thrift.REPLY, seqId); err2 != nil { 18557 err = thrift.WrapTException(err2) 18558 } 18559 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18560 err = thrift.WrapTException(err2) 18561 } 18562 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18563 err = thrift.WrapTException(err2) 18564 } 18565 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18566 err = thrift.WrapTException(err2) 18567 } 18568 if err != nil { 18569 return 18570 } 18571 return true, err 18572 } 18573 18574 type applyProcessorGetContextFreeData struct { 18575 handler Apply 18576 } 18577 18578 func (p *applyProcessorGetContextFreeData) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18579 args := ApplyGetContextFreeDataArgs{} 18580 var err2 error 18581 if err2 = args.Read(ctx, iprot); err2 != nil { 18582 iprot.ReadMessageEnd(ctx) 18583 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18584 oprot.WriteMessageBegin(ctx, "get_context_free_data", thrift.EXCEPTION, seqId) 18585 x.Write(ctx, oprot) 18586 oprot.WriteMessageEnd(ctx) 18587 oprot.Flush(ctx) 18588 return false, thrift.WrapTException(err2) 18589 } 18590 iprot.ReadMessageEnd(ctx) 18591 18592 tickerCancel := func() {} 18593 // Start a goroutine to do server side connectivity check. 18594 if thrift.ServerConnectivityCheckInterval > 0 { 18595 var cancel context.CancelFunc 18596 ctx, cancel = context.WithCancel(ctx) 18597 defer cancel() 18598 var tickerCtx context.Context 18599 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18600 defer tickerCancel() 18601 go func(ctx context.Context, cancel context.CancelFunc) { 18602 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18603 defer ticker.Stop() 18604 for { 18605 select { 18606 case <-ctx.Done(): 18607 return 18608 case <-ticker.C: 18609 if !iprot.Transport().IsOpen() { 18610 cancel() 18611 return 18612 } 18613 } 18614 } 18615 }(tickerCtx, cancel) 18616 } 18617 18618 result := ApplyGetContextFreeDataResult{} 18619 var retval []byte 18620 if retval, err2 = p.handler.GetContextFreeData(ctx, args.Index); err2 != nil { 18621 tickerCancel() 18622 if err2 == thrift.ErrAbandonRequest { 18623 return false, thrift.WrapTException(err2) 18624 } 18625 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_context_free_data: " + err2.Error()) 18626 oprot.WriteMessageBegin(ctx, "get_context_free_data", thrift.EXCEPTION, seqId) 18627 x.Write(ctx, oprot) 18628 oprot.WriteMessageEnd(ctx) 18629 oprot.Flush(ctx) 18630 return true, thrift.WrapTException(err2) 18631 } else { 18632 result.Success = retval 18633 } 18634 tickerCancel() 18635 if err2 = oprot.WriteMessageBegin(ctx, "get_context_free_data", thrift.REPLY, seqId); err2 != nil { 18636 err = thrift.WrapTException(err2) 18637 } 18638 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18639 err = thrift.WrapTException(err2) 18640 } 18641 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18642 err = thrift.WrapTException(err2) 18643 } 18644 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18645 err = thrift.WrapTException(err2) 18646 } 18647 if err != nil { 18648 return 18649 } 18650 return true, err 18651 } 18652 18653 type applyProcessorDbStoreI64 struct { 18654 handler Apply 18655 } 18656 18657 func (p *applyProcessorDbStoreI64) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18658 args := ApplyDbStoreI64Args{} 18659 var err2 error 18660 if err2 = args.Read(ctx, iprot); err2 != nil { 18661 iprot.ReadMessageEnd(ctx) 18662 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18663 oprot.WriteMessageBegin(ctx, "db_store_i64", thrift.EXCEPTION, seqId) 18664 x.Write(ctx, oprot) 18665 oprot.WriteMessageEnd(ctx) 18666 oprot.Flush(ctx) 18667 return false, thrift.WrapTException(err2) 18668 } 18669 iprot.ReadMessageEnd(ctx) 18670 18671 tickerCancel := func() {} 18672 // Start a goroutine to do server side connectivity check. 18673 if thrift.ServerConnectivityCheckInterval > 0 { 18674 var cancel context.CancelFunc 18675 ctx, cancel = context.WithCancel(ctx) 18676 defer cancel() 18677 var tickerCtx context.Context 18678 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18679 defer tickerCancel() 18680 go func(ctx context.Context, cancel context.CancelFunc) { 18681 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18682 defer ticker.Stop() 18683 for { 18684 select { 18685 case <-ctx.Done(): 18686 return 18687 case <-ticker.C: 18688 if !iprot.Transport().IsOpen() { 18689 cancel() 18690 return 18691 } 18692 } 18693 } 18694 }(tickerCtx, cancel) 18695 } 18696 18697 result := ApplyDbStoreI64Result{} 18698 var retval int32 18699 if retval, err2 = p.handler.DbStoreI64(ctx, args.Scope, args.Table, args.Payer, args.ID, args.Data); err2 != nil { 18700 tickerCancel() 18701 if err2 == thrift.ErrAbandonRequest { 18702 return false, thrift.WrapTException(err2) 18703 } 18704 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_store_i64: " + err2.Error()) 18705 oprot.WriteMessageBegin(ctx, "db_store_i64", thrift.EXCEPTION, seqId) 18706 x.Write(ctx, oprot) 18707 oprot.WriteMessageEnd(ctx) 18708 oprot.Flush(ctx) 18709 return true, thrift.WrapTException(err2) 18710 } else { 18711 result.Success = &retval 18712 } 18713 tickerCancel() 18714 if err2 = oprot.WriteMessageBegin(ctx, "db_store_i64", thrift.REPLY, seqId); err2 != nil { 18715 err = thrift.WrapTException(err2) 18716 } 18717 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18718 err = thrift.WrapTException(err2) 18719 } 18720 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18721 err = thrift.WrapTException(err2) 18722 } 18723 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18724 err = thrift.WrapTException(err2) 18725 } 18726 if err != nil { 18727 return 18728 } 18729 return true, err 18730 } 18731 18732 type applyProcessorDbUpdateI64 struct { 18733 handler Apply 18734 } 18735 18736 func (p *applyProcessorDbUpdateI64) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18737 args := ApplyDbUpdateI64Args{} 18738 var err2 error 18739 if err2 = args.Read(ctx, iprot); err2 != nil { 18740 iprot.ReadMessageEnd(ctx) 18741 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18742 oprot.WriteMessageBegin(ctx, "db_update_i64", thrift.EXCEPTION, seqId) 18743 x.Write(ctx, oprot) 18744 oprot.WriteMessageEnd(ctx) 18745 oprot.Flush(ctx) 18746 return false, thrift.WrapTException(err2) 18747 } 18748 iprot.ReadMessageEnd(ctx) 18749 18750 tickerCancel := func() {} 18751 // Start a goroutine to do server side connectivity check. 18752 if thrift.ServerConnectivityCheckInterval > 0 { 18753 var cancel context.CancelFunc 18754 ctx, cancel = context.WithCancel(ctx) 18755 defer cancel() 18756 var tickerCtx context.Context 18757 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18758 defer tickerCancel() 18759 go func(ctx context.Context, cancel context.CancelFunc) { 18760 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18761 defer ticker.Stop() 18762 for { 18763 select { 18764 case <-ctx.Done(): 18765 return 18766 case <-ticker.C: 18767 if !iprot.Transport().IsOpen() { 18768 cancel() 18769 return 18770 } 18771 } 18772 } 18773 }(tickerCtx, cancel) 18774 } 18775 18776 result := ApplyDbUpdateI64Result{} 18777 if err2 = p.handler.DbUpdateI64(ctx, args.Iterator, args.Payer, args.Data); err2 != nil { 18778 tickerCancel() 18779 if err2 == thrift.ErrAbandonRequest { 18780 return false, thrift.WrapTException(err2) 18781 } 18782 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_update_i64: " + err2.Error()) 18783 oprot.WriteMessageBegin(ctx, "db_update_i64", thrift.EXCEPTION, seqId) 18784 x.Write(ctx, oprot) 18785 oprot.WriteMessageEnd(ctx) 18786 oprot.Flush(ctx) 18787 return true, thrift.WrapTException(err2) 18788 } 18789 tickerCancel() 18790 if err2 = oprot.WriteMessageBegin(ctx, "db_update_i64", thrift.REPLY, seqId); err2 != nil { 18791 err = thrift.WrapTException(err2) 18792 } 18793 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18794 err = thrift.WrapTException(err2) 18795 } 18796 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18797 err = thrift.WrapTException(err2) 18798 } 18799 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18800 err = thrift.WrapTException(err2) 18801 } 18802 if err != nil { 18803 return 18804 } 18805 return true, err 18806 } 18807 18808 type applyProcessorDbRemoveI64 struct { 18809 handler Apply 18810 } 18811 18812 func (p *applyProcessorDbRemoveI64) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18813 args := ApplyDbRemoveI64Args{} 18814 var err2 error 18815 if err2 = args.Read(ctx, iprot); err2 != nil { 18816 iprot.ReadMessageEnd(ctx) 18817 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18818 oprot.WriteMessageBegin(ctx, "db_remove_i64", thrift.EXCEPTION, seqId) 18819 x.Write(ctx, oprot) 18820 oprot.WriteMessageEnd(ctx) 18821 oprot.Flush(ctx) 18822 return false, thrift.WrapTException(err2) 18823 } 18824 iprot.ReadMessageEnd(ctx) 18825 18826 tickerCancel := func() {} 18827 // Start a goroutine to do server side connectivity check. 18828 if thrift.ServerConnectivityCheckInterval > 0 { 18829 var cancel context.CancelFunc 18830 ctx, cancel = context.WithCancel(ctx) 18831 defer cancel() 18832 var tickerCtx context.Context 18833 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18834 defer tickerCancel() 18835 go func(ctx context.Context, cancel context.CancelFunc) { 18836 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18837 defer ticker.Stop() 18838 for { 18839 select { 18840 case <-ctx.Done(): 18841 return 18842 case <-ticker.C: 18843 if !iprot.Transport().IsOpen() { 18844 cancel() 18845 return 18846 } 18847 } 18848 } 18849 }(tickerCtx, cancel) 18850 } 18851 18852 result := ApplyDbRemoveI64Result{} 18853 if err2 = p.handler.DbRemoveI64(ctx, args.Iterator); err2 != nil { 18854 tickerCancel() 18855 if err2 == thrift.ErrAbandonRequest { 18856 return false, thrift.WrapTException(err2) 18857 } 18858 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_remove_i64: " + err2.Error()) 18859 oprot.WriteMessageBegin(ctx, "db_remove_i64", thrift.EXCEPTION, seqId) 18860 x.Write(ctx, oprot) 18861 oprot.WriteMessageEnd(ctx) 18862 oprot.Flush(ctx) 18863 return true, thrift.WrapTException(err2) 18864 } 18865 tickerCancel() 18866 if err2 = oprot.WriteMessageBegin(ctx, "db_remove_i64", thrift.REPLY, seqId); err2 != nil { 18867 err = thrift.WrapTException(err2) 18868 } 18869 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18870 err = thrift.WrapTException(err2) 18871 } 18872 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18873 err = thrift.WrapTException(err2) 18874 } 18875 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18876 err = thrift.WrapTException(err2) 18877 } 18878 if err != nil { 18879 return 18880 } 18881 return true, err 18882 } 18883 18884 type applyProcessorDbGetI64 struct { 18885 handler Apply 18886 } 18887 18888 func (p *applyProcessorDbGetI64) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18889 args := ApplyDbGetI64Args{} 18890 var err2 error 18891 if err2 = args.Read(ctx, iprot); err2 != nil { 18892 iprot.ReadMessageEnd(ctx) 18893 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18894 oprot.WriteMessageBegin(ctx, "db_get_i64", thrift.EXCEPTION, seqId) 18895 x.Write(ctx, oprot) 18896 oprot.WriteMessageEnd(ctx) 18897 oprot.Flush(ctx) 18898 return false, thrift.WrapTException(err2) 18899 } 18900 iprot.ReadMessageEnd(ctx) 18901 18902 tickerCancel := func() {} 18903 // Start a goroutine to do server side connectivity check. 18904 if thrift.ServerConnectivityCheckInterval > 0 { 18905 var cancel context.CancelFunc 18906 ctx, cancel = context.WithCancel(ctx) 18907 defer cancel() 18908 var tickerCtx context.Context 18909 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18910 defer tickerCancel() 18911 go func(ctx context.Context, cancel context.CancelFunc) { 18912 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18913 defer ticker.Stop() 18914 for { 18915 select { 18916 case <-ctx.Done(): 18917 return 18918 case <-ticker.C: 18919 if !iprot.Transport().IsOpen() { 18920 cancel() 18921 return 18922 } 18923 } 18924 } 18925 }(tickerCtx, cancel) 18926 } 18927 18928 result := ApplyDbGetI64Result{} 18929 var retval []byte 18930 if retval, err2 = p.handler.DbGetI64(ctx, args.Iterator); err2 != nil { 18931 tickerCancel() 18932 if err2 == thrift.ErrAbandonRequest { 18933 return false, thrift.WrapTException(err2) 18934 } 18935 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_get_i64: " + err2.Error()) 18936 oprot.WriteMessageBegin(ctx, "db_get_i64", thrift.EXCEPTION, seqId) 18937 x.Write(ctx, oprot) 18938 oprot.WriteMessageEnd(ctx) 18939 oprot.Flush(ctx) 18940 return true, thrift.WrapTException(err2) 18941 } else { 18942 result.Success = retval 18943 } 18944 tickerCancel() 18945 if err2 = oprot.WriteMessageBegin(ctx, "db_get_i64", thrift.REPLY, seqId); err2 != nil { 18946 err = thrift.WrapTException(err2) 18947 } 18948 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 18949 err = thrift.WrapTException(err2) 18950 } 18951 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 18952 err = thrift.WrapTException(err2) 18953 } 18954 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 18955 err = thrift.WrapTException(err2) 18956 } 18957 if err != nil { 18958 return 18959 } 18960 return true, err 18961 } 18962 18963 type applyProcessorDbNextI64 struct { 18964 handler Apply 18965 } 18966 18967 func (p *applyProcessorDbNextI64) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 18968 args := ApplyDbNextI64Args{} 18969 var err2 error 18970 if err2 = args.Read(ctx, iprot); err2 != nil { 18971 iprot.ReadMessageEnd(ctx) 18972 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 18973 oprot.WriteMessageBegin(ctx, "db_next_i64", thrift.EXCEPTION, seqId) 18974 x.Write(ctx, oprot) 18975 oprot.WriteMessageEnd(ctx) 18976 oprot.Flush(ctx) 18977 return false, thrift.WrapTException(err2) 18978 } 18979 iprot.ReadMessageEnd(ctx) 18980 18981 tickerCancel := func() {} 18982 // Start a goroutine to do server side connectivity check. 18983 if thrift.ServerConnectivityCheckInterval > 0 { 18984 var cancel context.CancelFunc 18985 ctx, cancel = context.WithCancel(ctx) 18986 defer cancel() 18987 var tickerCtx context.Context 18988 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 18989 defer tickerCancel() 18990 go func(ctx context.Context, cancel context.CancelFunc) { 18991 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 18992 defer ticker.Stop() 18993 for { 18994 select { 18995 case <-ctx.Done(): 18996 return 18997 case <-ticker.C: 18998 if !iprot.Transport().IsOpen() { 18999 cancel() 19000 return 19001 } 19002 } 19003 } 19004 }(tickerCtx, cancel) 19005 } 19006 19007 result := ApplyDbNextI64Result{} 19008 var retval *NextPreviousReturn 19009 if retval, err2 = p.handler.DbNextI64(ctx, args.Iterator); err2 != nil { 19010 tickerCancel() 19011 if err2 == thrift.ErrAbandonRequest { 19012 return false, thrift.WrapTException(err2) 19013 } 19014 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_next_i64: " + err2.Error()) 19015 oprot.WriteMessageBegin(ctx, "db_next_i64", thrift.EXCEPTION, seqId) 19016 x.Write(ctx, oprot) 19017 oprot.WriteMessageEnd(ctx) 19018 oprot.Flush(ctx) 19019 return true, thrift.WrapTException(err2) 19020 } else { 19021 result.Success = retval 19022 } 19023 tickerCancel() 19024 if err2 = oprot.WriteMessageBegin(ctx, "db_next_i64", thrift.REPLY, seqId); err2 != nil { 19025 err = thrift.WrapTException(err2) 19026 } 19027 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19028 err = thrift.WrapTException(err2) 19029 } 19030 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19031 err = thrift.WrapTException(err2) 19032 } 19033 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19034 err = thrift.WrapTException(err2) 19035 } 19036 if err != nil { 19037 return 19038 } 19039 return true, err 19040 } 19041 19042 type applyProcessorDbPreviousI64 struct { 19043 handler Apply 19044 } 19045 19046 func (p *applyProcessorDbPreviousI64) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19047 args := ApplyDbPreviousI64Args{} 19048 var err2 error 19049 if err2 = args.Read(ctx, iprot); err2 != nil { 19050 iprot.ReadMessageEnd(ctx) 19051 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19052 oprot.WriteMessageBegin(ctx, "db_previous_i64", thrift.EXCEPTION, seqId) 19053 x.Write(ctx, oprot) 19054 oprot.WriteMessageEnd(ctx) 19055 oprot.Flush(ctx) 19056 return false, thrift.WrapTException(err2) 19057 } 19058 iprot.ReadMessageEnd(ctx) 19059 19060 tickerCancel := func() {} 19061 // Start a goroutine to do server side connectivity check. 19062 if thrift.ServerConnectivityCheckInterval > 0 { 19063 var cancel context.CancelFunc 19064 ctx, cancel = context.WithCancel(ctx) 19065 defer cancel() 19066 var tickerCtx context.Context 19067 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 19068 defer tickerCancel() 19069 go func(ctx context.Context, cancel context.CancelFunc) { 19070 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 19071 defer ticker.Stop() 19072 for { 19073 select { 19074 case <-ctx.Done(): 19075 return 19076 case <-ticker.C: 19077 if !iprot.Transport().IsOpen() { 19078 cancel() 19079 return 19080 } 19081 } 19082 } 19083 }(tickerCtx, cancel) 19084 } 19085 19086 result := ApplyDbPreviousI64Result{} 19087 var retval *NextPreviousReturn 19088 if retval, err2 = p.handler.DbPreviousI64(ctx, args.Iterator); err2 != nil { 19089 tickerCancel() 19090 if err2 == thrift.ErrAbandonRequest { 19091 return false, thrift.WrapTException(err2) 19092 } 19093 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_previous_i64: " + err2.Error()) 19094 oprot.WriteMessageBegin(ctx, "db_previous_i64", thrift.EXCEPTION, seqId) 19095 x.Write(ctx, oprot) 19096 oprot.WriteMessageEnd(ctx) 19097 oprot.Flush(ctx) 19098 return true, thrift.WrapTException(err2) 19099 } else { 19100 result.Success = retval 19101 } 19102 tickerCancel() 19103 if err2 = oprot.WriteMessageBegin(ctx, "db_previous_i64", thrift.REPLY, seqId); err2 != nil { 19104 err = thrift.WrapTException(err2) 19105 } 19106 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19107 err = thrift.WrapTException(err2) 19108 } 19109 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19110 err = thrift.WrapTException(err2) 19111 } 19112 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19113 err = thrift.WrapTException(err2) 19114 } 19115 if err != nil { 19116 return 19117 } 19118 return true, err 19119 } 19120 19121 type applyProcessorDbFindI64 struct { 19122 handler Apply 19123 } 19124 19125 func (p *applyProcessorDbFindI64) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19126 args := ApplyDbFindI64Args{} 19127 var err2 error 19128 if err2 = args.Read(ctx, iprot); err2 != nil { 19129 iprot.ReadMessageEnd(ctx) 19130 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19131 oprot.WriteMessageBegin(ctx, "db_find_i64", thrift.EXCEPTION, seqId) 19132 x.Write(ctx, oprot) 19133 oprot.WriteMessageEnd(ctx) 19134 oprot.Flush(ctx) 19135 return false, thrift.WrapTException(err2) 19136 } 19137 iprot.ReadMessageEnd(ctx) 19138 19139 tickerCancel := func() {} 19140 // Start a goroutine to do server side connectivity check. 19141 if thrift.ServerConnectivityCheckInterval > 0 { 19142 var cancel context.CancelFunc 19143 ctx, cancel = context.WithCancel(ctx) 19144 defer cancel() 19145 var tickerCtx context.Context 19146 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 19147 defer tickerCancel() 19148 go func(ctx context.Context, cancel context.CancelFunc) { 19149 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 19150 defer ticker.Stop() 19151 for { 19152 select { 19153 case <-ctx.Done(): 19154 return 19155 case <-ticker.C: 19156 if !iprot.Transport().IsOpen() { 19157 cancel() 19158 return 19159 } 19160 } 19161 } 19162 }(tickerCtx, cancel) 19163 } 19164 19165 result := ApplyDbFindI64Result{} 19166 var retval int32 19167 if retval, err2 = p.handler.DbFindI64(ctx, args.Code, args.Scope, args.Table, args.ID); err2 != nil { 19168 tickerCancel() 19169 if err2 == thrift.ErrAbandonRequest { 19170 return false, thrift.WrapTException(err2) 19171 } 19172 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_find_i64: " + err2.Error()) 19173 oprot.WriteMessageBegin(ctx, "db_find_i64", thrift.EXCEPTION, seqId) 19174 x.Write(ctx, oprot) 19175 oprot.WriteMessageEnd(ctx) 19176 oprot.Flush(ctx) 19177 return true, thrift.WrapTException(err2) 19178 } else { 19179 result.Success = &retval 19180 } 19181 tickerCancel() 19182 if err2 = oprot.WriteMessageBegin(ctx, "db_find_i64", thrift.REPLY, seqId); err2 != nil { 19183 err = thrift.WrapTException(err2) 19184 } 19185 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19186 err = thrift.WrapTException(err2) 19187 } 19188 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19189 err = thrift.WrapTException(err2) 19190 } 19191 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19192 err = thrift.WrapTException(err2) 19193 } 19194 if err != nil { 19195 return 19196 } 19197 return true, err 19198 } 19199 19200 type applyProcessorDbLowerboundI64 struct { 19201 handler Apply 19202 } 19203 19204 func (p *applyProcessorDbLowerboundI64) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19205 args := ApplyDbLowerboundI64Args{} 19206 var err2 error 19207 if err2 = args.Read(ctx, iprot); err2 != nil { 19208 iprot.ReadMessageEnd(ctx) 19209 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19210 oprot.WriteMessageBegin(ctx, "db_lowerbound_i64", thrift.EXCEPTION, seqId) 19211 x.Write(ctx, oprot) 19212 oprot.WriteMessageEnd(ctx) 19213 oprot.Flush(ctx) 19214 return false, thrift.WrapTException(err2) 19215 } 19216 iprot.ReadMessageEnd(ctx) 19217 19218 tickerCancel := func() {} 19219 // Start a goroutine to do server side connectivity check. 19220 if thrift.ServerConnectivityCheckInterval > 0 { 19221 var cancel context.CancelFunc 19222 ctx, cancel = context.WithCancel(ctx) 19223 defer cancel() 19224 var tickerCtx context.Context 19225 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 19226 defer tickerCancel() 19227 go func(ctx context.Context, cancel context.CancelFunc) { 19228 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 19229 defer ticker.Stop() 19230 for { 19231 select { 19232 case <-ctx.Done(): 19233 return 19234 case <-ticker.C: 19235 if !iprot.Transport().IsOpen() { 19236 cancel() 19237 return 19238 } 19239 } 19240 } 19241 }(tickerCtx, cancel) 19242 } 19243 19244 result := ApplyDbLowerboundI64Result{} 19245 var retval int32 19246 if retval, err2 = p.handler.DbLowerboundI64(ctx, args.Code, args.Scope, args.Table, args.ID); err2 != nil { 19247 tickerCancel() 19248 if err2 == thrift.ErrAbandonRequest { 19249 return false, thrift.WrapTException(err2) 19250 } 19251 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_lowerbound_i64: " + err2.Error()) 19252 oprot.WriteMessageBegin(ctx, "db_lowerbound_i64", thrift.EXCEPTION, seqId) 19253 x.Write(ctx, oprot) 19254 oprot.WriteMessageEnd(ctx) 19255 oprot.Flush(ctx) 19256 return true, thrift.WrapTException(err2) 19257 } else { 19258 result.Success = &retval 19259 } 19260 tickerCancel() 19261 if err2 = oprot.WriteMessageBegin(ctx, "db_lowerbound_i64", thrift.REPLY, seqId); err2 != nil { 19262 err = thrift.WrapTException(err2) 19263 } 19264 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19265 err = thrift.WrapTException(err2) 19266 } 19267 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19268 err = thrift.WrapTException(err2) 19269 } 19270 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19271 err = thrift.WrapTException(err2) 19272 } 19273 if err != nil { 19274 return 19275 } 19276 return true, err 19277 } 19278 19279 type applyProcessorDbUpperboundI64 struct { 19280 handler Apply 19281 } 19282 19283 func (p *applyProcessorDbUpperboundI64) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19284 args := ApplyDbUpperboundI64Args{} 19285 var err2 error 19286 if err2 = args.Read(ctx, iprot); err2 != nil { 19287 iprot.ReadMessageEnd(ctx) 19288 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19289 oprot.WriteMessageBegin(ctx, "db_upperbound_i64", thrift.EXCEPTION, seqId) 19290 x.Write(ctx, oprot) 19291 oprot.WriteMessageEnd(ctx) 19292 oprot.Flush(ctx) 19293 return false, thrift.WrapTException(err2) 19294 } 19295 iprot.ReadMessageEnd(ctx) 19296 19297 tickerCancel := func() {} 19298 // Start a goroutine to do server side connectivity check. 19299 if thrift.ServerConnectivityCheckInterval > 0 { 19300 var cancel context.CancelFunc 19301 ctx, cancel = context.WithCancel(ctx) 19302 defer cancel() 19303 var tickerCtx context.Context 19304 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 19305 defer tickerCancel() 19306 go func(ctx context.Context, cancel context.CancelFunc) { 19307 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 19308 defer ticker.Stop() 19309 for { 19310 select { 19311 case <-ctx.Done(): 19312 return 19313 case <-ticker.C: 19314 if !iprot.Transport().IsOpen() { 19315 cancel() 19316 return 19317 } 19318 } 19319 } 19320 }(tickerCtx, cancel) 19321 } 19322 19323 result := ApplyDbUpperboundI64Result{} 19324 var retval int32 19325 if retval, err2 = p.handler.DbUpperboundI64(ctx, args.Code, args.Scope, args.Table, args.ID); err2 != nil { 19326 tickerCancel() 19327 if err2 == thrift.ErrAbandonRequest { 19328 return false, thrift.WrapTException(err2) 19329 } 19330 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_upperbound_i64: " + err2.Error()) 19331 oprot.WriteMessageBegin(ctx, "db_upperbound_i64", thrift.EXCEPTION, seqId) 19332 x.Write(ctx, oprot) 19333 oprot.WriteMessageEnd(ctx) 19334 oprot.Flush(ctx) 19335 return true, thrift.WrapTException(err2) 19336 } else { 19337 result.Success = &retval 19338 } 19339 tickerCancel() 19340 if err2 = oprot.WriteMessageBegin(ctx, "db_upperbound_i64", thrift.REPLY, seqId); err2 != nil { 19341 err = thrift.WrapTException(err2) 19342 } 19343 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19344 err = thrift.WrapTException(err2) 19345 } 19346 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19347 err = thrift.WrapTException(err2) 19348 } 19349 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19350 err = thrift.WrapTException(err2) 19351 } 19352 if err != nil { 19353 return 19354 } 19355 return true, err 19356 } 19357 19358 type applyProcessorDbEndI64 struct { 19359 handler Apply 19360 } 19361 19362 func (p *applyProcessorDbEndI64) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19363 args := ApplyDbEndI64Args{} 19364 var err2 error 19365 if err2 = args.Read(ctx, iprot); err2 != nil { 19366 iprot.ReadMessageEnd(ctx) 19367 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19368 oprot.WriteMessageBegin(ctx, "db_end_i64", thrift.EXCEPTION, seqId) 19369 x.Write(ctx, oprot) 19370 oprot.WriteMessageEnd(ctx) 19371 oprot.Flush(ctx) 19372 return false, thrift.WrapTException(err2) 19373 } 19374 iprot.ReadMessageEnd(ctx) 19375 19376 tickerCancel := func() {} 19377 // Start a goroutine to do server side connectivity check. 19378 if thrift.ServerConnectivityCheckInterval > 0 { 19379 var cancel context.CancelFunc 19380 ctx, cancel = context.WithCancel(ctx) 19381 defer cancel() 19382 var tickerCtx context.Context 19383 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 19384 defer tickerCancel() 19385 go func(ctx context.Context, cancel context.CancelFunc) { 19386 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 19387 defer ticker.Stop() 19388 for { 19389 select { 19390 case <-ctx.Done(): 19391 return 19392 case <-ticker.C: 19393 if !iprot.Transport().IsOpen() { 19394 cancel() 19395 return 19396 } 19397 } 19398 } 19399 }(tickerCtx, cancel) 19400 } 19401 19402 result := ApplyDbEndI64Result{} 19403 var retval int32 19404 if retval, err2 = p.handler.DbEndI64(ctx, args.Code, args.Scope, args.Table); err2 != nil { 19405 tickerCancel() 19406 if err2 == thrift.ErrAbandonRequest { 19407 return false, thrift.WrapTException(err2) 19408 } 19409 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_end_i64: " + err2.Error()) 19410 oprot.WriteMessageBegin(ctx, "db_end_i64", thrift.EXCEPTION, seqId) 19411 x.Write(ctx, oprot) 19412 oprot.WriteMessageEnd(ctx) 19413 oprot.Flush(ctx) 19414 return true, thrift.WrapTException(err2) 19415 } else { 19416 result.Success = &retval 19417 } 19418 tickerCancel() 19419 if err2 = oprot.WriteMessageBegin(ctx, "db_end_i64", thrift.REPLY, seqId); err2 != nil { 19420 err = thrift.WrapTException(err2) 19421 } 19422 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19423 err = thrift.WrapTException(err2) 19424 } 19425 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19426 err = thrift.WrapTException(err2) 19427 } 19428 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19429 err = thrift.WrapTException(err2) 19430 } 19431 if err != nil { 19432 return 19433 } 19434 return true, err 19435 } 19436 19437 type applyProcessorDbIdx64Store struct { 19438 handler Apply 19439 } 19440 19441 func (p *applyProcessorDbIdx64Store) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19442 args := ApplyDbIdx64StoreArgs{} 19443 var err2 error 19444 if err2 = args.Read(ctx, iprot); err2 != nil { 19445 iprot.ReadMessageEnd(ctx) 19446 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19447 oprot.WriteMessageBegin(ctx, "db_idx64_store", thrift.EXCEPTION, seqId) 19448 x.Write(ctx, oprot) 19449 oprot.WriteMessageEnd(ctx) 19450 oprot.Flush(ctx) 19451 return false, thrift.WrapTException(err2) 19452 } 19453 iprot.ReadMessageEnd(ctx) 19454 19455 tickerCancel := func() {} 19456 // Start a goroutine to do server side connectivity check. 19457 if thrift.ServerConnectivityCheckInterval > 0 { 19458 var cancel context.CancelFunc 19459 ctx, cancel = context.WithCancel(ctx) 19460 defer cancel() 19461 var tickerCtx context.Context 19462 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 19463 defer tickerCancel() 19464 go func(ctx context.Context, cancel context.CancelFunc) { 19465 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 19466 defer ticker.Stop() 19467 for { 19468 select { 19469 case <-ctx.Done(): 19470 return 19471 case <-ticker.C: 19472 if !iprot.Transport().IsOpen() { 19473 cancel() 19474 return 19475 } 19476 } 19477 } 19478 }(tickerCtx, cancel) 19479 } 19480 19481 result := ApplyDbIdx64StoreResult{} 19482 var retval int32 19483 if retval, err2 = p.handler.DbIdx64Store(ctx, args.Scope, args.Table, args.Payer, args.ID, args.Secondary); err2 != nil { 19484 tickerCancel() 19485 if err2 == thrift.ErrAbandonRequest { 19486 return false, thrift.WrapTException(err2) 19487 } 19488 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx64_store: " + err2.Error()) 19489 oprot.WriteMessageBegin(ctx, "db_idx64_store", thrift.EXCEPTION, seqId) 19490 x.Write(ctx, oprot) 19491 oprot.WriteMessageEnd(ctx) 19492 oprot.Flush(ctx) 19493 return true, thrift.WrapTException(err2) 19494 } else { 19495 result.Success = &retval 19496 } 19497 tickerCancel() 19498 if err2 = oprot.WriteMessageBegin(ctx, "db_idx64_store", thrift.REPLY, seqId); err2 != nil { 19499 err = thrift.WrapTException(err2) 19500 } 19501 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19502 err = thrift.WrapTException(err2) 19503 } 19504 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19505 err = thrift.WrapTException(err2) 19506 } 19507 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19508 err = thrift.WrapTException(err2) 19509 } 19510 if err != nil { 19511 return 19512 } 19513 return true, err 19514 } 19515 19516 type applyProcessorDbIdx64Update struct { 19517 handler Apply 19518 } 19519 19520 func (p *applyProcessorDbIdx64Update) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19521 args := ApplyDbIdx64UpdateArgs{} 19522 var err2 error 19523 if err2 = args.Read(ctx, iprot); err2 != nil { 19524 iprot.ReadMessageEnd(ctx) 19525 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19526 oprot.WriteMessageBegin(ctx, "db_idx64_update", thrift.EXCEPTION, seqId) 19527 x.Write(ctx, oprot) 19528 oprot.WriteMessageEnd(ctx) 19529 oprot.Flush(ctx) 19530 return false, thrift.WrapTException(err2) 19531 } 19532 iprot.ReadMessageEnd(ctx) 19533 19534 tickerCancel := func() {} 19535 // Start a goroutine to do server side connectivity check. 19536 if thrift.ServerConnectivityCheckInterval > 0 { 19537 var cancel context.CancelFunc 19538 ctx, cancel = context.WithCancel(ctx) 19539 defer cancel() 19540 var tickerCtx context.Context 19541 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 19542 defer tickerCancel() 19543 go func(ctx context.Context, cancel context.CancelFunc) { 19544 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 19545 defer ticker.Stop() 19546 for { 19547 select { 19548 case <-ctx.Done(): 19549 return 19550 case <-ticker.C: 19551 if !iprot.Transport().IsOpen() { 19552 cancel() 19553 return 19554 } 19555 } 19556 } 19557 }(tickerCtx, cancel) 19558 } 19559 19560 result := ApplyDbIdx64UpdateResult{} 19561 if err2 = p.handler.DbIdx64Update(ctx, args.Iterator, args.Payer, args.Secondary); err2 != nil { 19562 tickerCancel() 19563 if err2 == thrift.ErrAbandonRequest { 19564 return false, thrift.WrapTException(err2) 19565 } 19566 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx64_update: " + err2.Error()) 19567 oprot.WriteMessageBegin(ctx, "db_idx64_update", thrift.EXCEPTION, seqId) 19568 x.Write(ctx, oprot) 19569 oprot.WriteMessageEnd(ctx) 19570 oprot.Flush(ctx) 19571 return true, thrift.WrapTException(err2) 19572 } 19573 tickerCancel() 19574 if err2 = oprot.WriteMessageBegin(ctx, "db_idx64_update", thrift.REPLY, seqId); err2 != nil { 19575 err = thrift.WrapTException(err2) 19576 } 19577 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19578 err = thrift.WrapTException(err2) 19579 } 19580 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19581 err = thrift.WrapTException(err2) 19582 } 19583 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19584 err = thrift.WrapTException(err2) 19585 } 19586 if err != nil { 19587 return 19588 } 19589 return true, err 19590 } 19591 19592 type applyProcessorDbIdx64Remove struct { 19593 handler Apply 19594 } 19595 19596 func (p *applyProcessorDbIdx64Remove) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19597 args := ApplyDbIdx64RemoveArgs{} 19598 var err2 error 19599 if err2 = args.Read(ctx, iprot); err2 != nil { 19600 iprot.ReadMessageEnd(ctx) 19601 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19602 oprot.WriteMessageBegin(ctx, "db_idx64_remove", thrift.EXCEPTION, seqId) 19603 x.Write(ctx, oprot) 19604 oprot.WriteMessageEnd(ctx) 19605 oprot.Flush(ctx) 19606 return false, thrift.WrapTException(err2) 19607 } 19608 iprot.ReadMessageEnd(ctx) 19609 19610 tickerCancel := func() {} 19611 // Start a goroutine to do server side connectivity check. 19612 if thrift.ServerConnectivityCheckInterval > 0 { 19613 var cancel context.CancelFunc 19614 ctx, cancel = context.WithCancel(ctx) 19615 defer cancel() 19616 var tickerCtx context.Context 19617 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 19618 defer tickerCancel() 19619 go func(ctx context.Context, cancel context.CancelFunc) { 19620 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 19621 defer ticker.Stop() 19622 for { 19623 select { 19624 case <-ctx.Done(): 19625 return 19626 case <-ticker.C: 19627 if !iprot.Transport().IsOpen() { 19628 cancel() 19629 return 19630 } 19631 } 19632 } 19633 }(tickerCtx, cancel) 19634 } 19635 19636 result := ApplyDbIdx64RemoveResult{} 19637 if err2 = p.handler.DbIdx64Remove(ctx, args.Iterator); err2 != nil { 19638 tickerCancel() 19639 if err2 == thrift.ErrAbandonRequest { 19640 return false, thrift.WrapTException(err2) 19641 } 19642 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx64_remove: " + err2.Error()) 19643 oprot.WriteMessageBegin(ctx, "db_idx64_remove", thrift.EXCEPTION, seqId) 19644 x.Write(ctx, oprot) 19645 oprot.WriteMessageEnd(ctx) 19646 oprot.Flush(ctx) 19647 return true, thrift.WrapTException(err2) 19648 } 19649 tickerCancel() 19650 if err2 = oprot.WriteMessageBegin(ctx, "db_idx64_remove", thrift.REPLY, seqId); err2 != nil { 19651 err = thrift.WrapTException(err2) 19652 } 19653 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19654 err = thrift.WrapTException(err2) 19655 } 19656 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19657 err = thrift.WrapTException(err2) 19658 } 19659 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19660 err = thrift.WrapTException(err2) 19661 } 19662 if err != nil { 19663 return 19664 } 19665 return true, err 19666 } 19667 19668 type applyProcessorDbIdx64Next struct { 19669 handler Apply 19670 } 19671 19672 func (p *applyProcessorDbIdx64Next) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19673 args := ApplyDbIdx64NextArgs{} 19674 var err2 error 19675 if err2 = args.Read(ctx, iprot); err2 != nil { 19676 iprot.ReadMessageEnd(ctx) 19677 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19678 oprot.WriteMessageBegin(ctx, "db_idx64_next", thrift.EXCEPTION, seqId) 19679 x.Write(ctx, oprot) 19680 oprot.WriteMessageEnd(ctx) 19681 oprot.Flush(ctx) 19682 return false, thrift.WrapTException(err2) 19683 } 19684 iprot.ReadMessageEnd(ctx) 19685 19686 tickerCancel := func() {} 19687 // Start a goroutine to do server side connectivity check. 19688 if thrift.ServerConnectivityCheckInterval > 0 { 19689 var cancel context.CancelFunc 19690 ctx, cancel = context.WithCancel(ctx) 19691 defer cancel() 19692 var tickerCtx context.Context 19693 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 19694 defer tickerCancel() 19695 go func(ctx context.Context, cancel context.CancelFunc) { 19696 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 19697 defer ticker.Stop() 19698 for { 19699 select { 19700 case <-ctx.Done(): 19701 return 19702 case <-ticker.C: 19703 if !iprot.Transport().IsOpen() { 19704 cancel() 19705 return 19706 } 19707 } 19708 } 19709 }(tickerCtx, cancel) 19710 } 19711 19712 result := ApplyDbIdx64NextResult{} 19713 var retval *NextPreviousReturn 19714 if retval, err2 = p.handler.DbIdx64Next(ctx, args.Iterator); err2 != nil { 19715 tickerCancel() 19716 if err2 == thrift.ErrAbandonRequest { 19717 return false, thrift.WrapTException(err2) 19718 } 19719 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx64_next: " + err2.Error()) 19720 oprot.WriteMessageBegin(ctx, "db_idx64_next", thrift.EXCEPTION, seqId) 19721 x.Write(ctx, oprot) 19722 oprot.WriteMessageEnd(ctx) 19723 oprot.Flush(ctx) 19724 return true, thrift.WrapTException(err2) 19725 } else { 19726 result.Success = retval 19727 } 19728 tickerCancel() 19729 if err2 = oprot.WriteMessageBegin(ctx, "db_idx64_next", thrift.REPLY, seqId); err2 != nil { 19730 err = thrift.WrapTException(err2) 19731 } 19732 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19733 err = thrift.WrapTException(err2) 19734 } 19735 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19736 err = thrift.WrapTException(err2) 19737 } 19738 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19739 err = thrift.WrapTException(err2) 19740 } 19741 if err != nil { 19742 return 19743 } 19744 return true, err 19745 } 19746 19747 type applyProcessorDbIdx64Previous struct { 19748 handler Apply 19749 } 19750 19751 func (p *applyProcessorDbIdx64Previous) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19752 args := ApplyDbIdx64PreviousArgs{} 19753 var err2 error 19754 if err2 = args.Read(ctx, iprot); err2 != nil { 19755 iprot.ReadMessageEnd(ctx) 19756 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19757 oprot.WriteMessageBegin(ctx, "db_idx64_previous", thrift.EXCEPTION, seqId) 19758 x.Write(ctx, oprot) 19759 oprot.WriteMessageEnd(ctx) 19760 oprot.Flush(ctx) 19761 return false, thrift.WrapTException(err2) 19762 } 19763 iprot.ReadMessageEnd(ctx) 19764 19765 tickerCancel := func() {} 19766 // Start a goroutine to do server side connectivity check. 19767 if thrift.ServerConnectivityCheckInterval > 0 { 19768 var cancel context.CancelFunc 19769 ctx, cancel = context.WithCancel(ctx) 19770 defer cancel() 19771 var tickerCtx context.Context 19772 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 19773 defer tickerCancel() 19774 go func(ctx context.Context, cancel context.CancelFunc) { 19775 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 19776 defer ticker.Stop() 19777 for { 19778 select { 19779 case <-ctx.Done(): 19780 return 19781 case <-ticker.C: 19782 if !iprot.Transport().IsOpen() { 19783 cancel() 19784 return 19785 } 19786 } 19787 } 19788 }(tickerCtx, cancel) 19789 } 19790 19791 result := ApplyDbIdx64PreviousResult{} 19792 var retval *NextPreviousReturn 19793 if retval, err2 = p.handler.DbIdx64Previous(ctx, args.Iteratory); err2 != nil { 19794 tickerCancel() 19795 if err2 == thrift.ErrAbandonRequest { 19796 return false, thrift.WrapTException(err2) 19797 } 19798 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx64_previous: " + err2.Error()) 19799 oprot.WriteMessageBegin(ctx, "db_idx64_previous", thrift.EXCEPTION, seqId) 19800 x.Write(ctx, oprot) 19801 oprot.WriteMessageEnd(ctx) 19802 oprot.Flush(ctx) 19803 return true, thrift.WrapTException(err2) 19804 } else { 19805 result.Success = retval 19806 } 19807 tickerCancel() 19808 if err2 = oprot.WriteMessageBegin(ctx, "db_idx64_previous", thrift.REPLY, seqId); err2 != nil { 19809 err = thrift.WrapTException(err2) 19810 } 19811 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19812 err = thrift.WrapTException(err2) 19813 } 19814 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19815 err = thrift.WrapTException(err2) 19816 } 19817 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19818 err = thrift.WrapTException(err2) 19819 } 19820 if err != nil { 19821 return 19822 } 19823 return true, err 19824 } 19825 19826 type applyProcessorDbIdx64FindPrimary struct { 19827 handler Apply 19828 } 19829 19830 func (p *applyProcessorDbIdx64FindPrimary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19831 args := ApplyDbIdx64FindPrimaryArgs{} 19832 var err2 error 19833 if err2 = args.Read(ctx, iprot); err2 != nil { 19834 iprot.ReadMessageEnd(ctx) 19835 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19836 oprot.WriteMessageBegin(ctx, "db_idx64_find_primary", thrift.EXCEPTION, seqId) 19837 x.Write(ctx, oprot) 19838 oprot.WriteMessageEnd(ctx) 19839 oprot.Flush(ctx) 19840 return false, thrift.WrapTException(err2) 19841 } 19842 iprot.ReadMessageEnd(ctx) 19843 19844 tickerCancel := func() {} 19845 // Start a goroutine to do server side connectivity check. 19846 if thrift.ServerConnectivityCheckInterval > 0 { 19847 var cancel context.CancelFunc 19848 ctx, cancel = context.WithCancel(ctx) 19849 defer cancel() 19850 var tickerCtx context.Context 19851 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 19852 defer tickerCancel() 19853 go func(ctx context.Context, cancel context.CancelFunc) { 19854 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 19855 defer ticker.Stop() 19856 for { 19857 select { 19858 case <-ctx.Done(): 19859 return 19860 case <-ticker.C: 19861 if !iprot.Transport().IsOpen() { 19862 cancel() 19863 return 19864 } 19865 } 19866 } 19867 }(tickerCtx, cancel) 19868 } 19869 19870 result := ApplyDbIdx64FindPrimaryResult{} 19871 var retval *FindPrimaryReturn 19872 if retval, err2 = p.handler.DbIdx64FindPrimary(ctx, args.Code, args.Scope, args.Table, args.Primary); err2 != nil { 19873 tickerCancel() 19874 if err2 == thrift.ErrAbandonRequest { 19875 return false, thrift.WrapTException(err2) 19876 } 19877 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx64_find_primary: " + err2.Error()) 19878 oprot.WriteMessageBegin(ctx, "db_idx64_find_primary", thrift.EXCEPTION, seqId) 19879 x.Write(ctx, oprot) 19880 oprot.WriteMessageEnd(ctx) 19881 oprot.Flush(ctx) 19882 return true, thrift.WrapTException(err2) 19883 } else { 19884 result.Success = retval 19885 } 19886 tickerCancel() 19887 if err2 = oprot.WriteMessageBegin(ctx, "db_idx64_find_primary", thrift.REPLY, seqId); err2 != nil { 19888 err = thrift.WrapTException(err2) 19889 } 19890 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19891 err = thrift.WrapTException(err2) 19892 } 19893 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19894 err = thrift.WrapTException(err2) 19895 } 19896 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19897 err = thrift.WrapTException(err2) 19898 } 19899 if err != nil { 19900 return 19901 } 19902 return true, err 19903 } 19904 19905 type applyProcessorDbIdx64FindSecondary struct { 19906 handler Apply 19907 } 19908 19909 func (p *applyProcessorDbIdx64FindSecondary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19910 args := ApplyDbIdx64FindSecondaryArgs{} 19911 var err2 error 19912 if err2 = args.Read(ctx, iprot); err2 != nil { 19913 iprot.ReadMessageEnd(ctx) 19914 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19915 oprot.WriteMessageBegin(ctx, "db_idx64_find_secondary", thrift.EXCEPTION, seqId) 19916 x.Write(ctx, oprot) 19917 oprot.WriteMessageEnd(ctx) 19918 oprot.Flush(ctx) 19919 return false, thrift.WrapTException(err2) 19920 } 19921 iprot.ReadMessageEnd(ctx) 19922 19923 tickerCancel := func() {} 19924 // Start a goroutine to do server side connectivity check. 19925 if thrift.ServerConnectivityCheckInterval > 0 { 19926 var cancel context.CancelFunc 19927 ctx, cancel = context.WithCancel(ctx) 19928 defer cancel() 19929 var tickerCtx context.Context 19930 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 19931 defer tickerCancel() 19932 go func(ctx context.Context, cancel context.CancelFunc) { 19933 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 19934 defer ticker.Stop() 19935 for { 19936 select { 19937 case <-ctx.Done(): 19938 return 19939 case <-ticker.C: 19940 if !iprot.Transport().IsOpen() { 19941 cancel() 19942 return 19943 } 19944 } 19945 } 19946 }(tickerCtx, cancel) 19947 } 19948 19949 result := ApplyDbIdx64FindSecondaryResult{} 19950 var retval *FindSecondaryReturn 19951 if retval, err2 = p.handler.DbIdx64FindSecondary(ctx, args.Code, args.Scope, args.Table, args.Secondary); err2 != nil { 19952 tickerCancel() 19953 if err2 == thrift.ErrAbandonRequest { 19954 return false, thrift.WrapTException(err2) 19955 } 19956 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx64_find_secondary: " + err2.Error()) 19957 oprot.WriteMessageBegin(ctx, "db_idx64_find_secondary", thrift.EXCEPTION, seqId) 19958 x.Write(ctx, oprot) 19959 oprot.WriteMessageEnd(ctx) 19960 oprot.Flush(ctx) 19961 return true, thrift.WrapTException(err2) 19962 } else { 19963 result.Success = retval 19964 } 19965 tickerCancel() 19966 if err2 = oprot.WriteMessageBegin(ctx, "db_idx64_find_secondary", thrift.REPLY, seqId); err2 != nil { 19967 err = thrift.WrapTException(err2) 19968 } 19969 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 19970 err = thrift.WrapTException(err2) 19971 } 19972 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 19973 err = thrift.WrapTException(err2) 19974 } 19975 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 19976 err = thrift.WrapTException(err2) 19977 } 19978 if err != nil { 19979 return 19980 } 19981 return true, err 19982 } 19983 19984 type applyProcessorDbIdx64Lowerbound struct { 19985 handler Apply 19986 } 19987 19988 func (p *applyProcessorDbIdx64Lowerbound) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 19989 args := ApplyDbIdx64LowerboundArgs{} 19990 var err2 error 19991 if err2 = args.Read(ctx, iprot); err2 != nil { 19992 iprot.ReadMessageEnd(ctx) 19993 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 19994 oprot.WriteMessageBegin(ctx, "db_idx64_lowerbound", thrift.EXCEPTION, seqId) 19995 x.Write(ctx, oprot) 19996 oprot.WriteMessageEnd(ctx) 19997 oprot.Flush(ctx) 19998 return false, thrift.WrapTException(err2) 19999 } 20000 iprot.ReadMessageEnd(ctx) 20001 20002 tickerCancel := func() {} 20003 // Start a goroutine to do server side connectivity check. 20004 if thrift.ServerConnectivityCheckInterval > 0 { 20005 var cancel context.CancelFunc 20006 ctx, cancel = context.WithCancel(ctx) 20007 defer cancel() 20008 var tickerCtx context.Context 20009 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20010 defer tickerCancel() 20011 go func(ctx context.Context, cancel context.CancelFunc) { 20012 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20013 defer ticker.Stop() 20014 for { 20015 select { 20016 case <-ctx.Done(): 20017 return 20018 case <-ticker.C: 20019 if !iprot.Transport().IsOpen() { 20020 cancel() 20021 return 20022 } 20023 } 20024 } 20025 }(tickerCtx, cancel) 20026 } 20027 20028 result := ApplyDbIdx64LowerboundResult{} 20029 var retval *LowerBoundUpperBoundReturn 20030 if retval, err2 = p.handler.DbIdx64Lowerbound(ctx, args.Code, args.Scope, args.Table, args.Secondary, args.Primary); err2 != nil { 20031 tickerCancel() 20032 if err2 == thrift.ErrAbandonRequest { 20033 return false, thrift.WrapTException(err2) 20034 } 20035 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx64_lowerbound: " + err2.Error()) 20036 oprot.WriteMessageBegin(ctx, "db_idx64_lowerbound", thrift.EXCEPTION, seqId) 20037 x.Write(ctx, oprot) 20038 oprot.WriteMessageEnd(ctx) 20039 oprot.Flush(ctx) 20040 return true, thrift.WrapTException(err2) 20041 } else { 20042 result.Success = retval 20043 } 20044 tickerCancel() 20045 if err2 = oprot.WriteMessageBegin(ctx, "db_idx64_lowerbound", thrift.REPLY, seqId); err2 != nil { 20046 err = thrift.WrapTException(err2) 20047 } 20048 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20049 err = thrift.WrapTException(err2) 20050 } 20051 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20052 err = thrift.WrapTException(err2) 20053 } 20054 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20055 err = thrift.WrapTException(err2) 20056 } 20057 if err != nil { 20058 return 20059 } 20060 return true, err 20061 } 20062 20063 type applyProcessorDbIdx64Upperbound struct { 20064 handler Apply 20065 } 20066 20067 func (p *applyProcessorDbIdx64Upperbound) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 20068 args := ApplyDbIdx64UpperboundArgs{} 20069 var err2 error 20070 if err2 = args.Read(ctx, iprot); err2 != nil { 20071 iprot.ReadMessageEnd(ctx) 20072 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 20073 oprot.WriteMessageBegin(ctx, "db_idx64_upperbound", thrift.EXCEPTION, seqId) 20074 x.Write(ctx, oprot) 20075 oprot.WriteMessageEnd(ctx) 20076 oprot.Flush(ctx) 20077 return false, thrift.WrapTException(err2) 20078 } 20079 iprot.ReadMessageEnd(ctx) 20080 20081 tickerCancel := func() {} 20082 // Start a goroutine to do server side connectivity check. 20083 if thrift.ServerConnectivityCheckInterval > 0 { 20084 var cancel context.CancelFunc 20085 ctx, cancel = context.WithCancel(ctx) 20086 defer cancel() 20087 var tickerCtx context.Context 20088 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20089 defer tickerCancel() 20090 go func(ctx context.Context, cancel context.CancelFunc) { 20091 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20092 defer ticker.Stop() 20093 for { 20094 select { 20095 case <-ctx.Done(): 20096 return 20097 case <-ticker.C: 20098 if !iprot.Transport().IsOpen() { 20099 cancel() 20100 return 20101 } 20102 } 20103 } 20104 }(tickerCtx, cancel) 20105 } 20106 20107 result := ApplyDbIdx64UpperboundResult{} 20108 var retval *LowerBoundUpperBoundReturn 20109 if retval, err2 = p.handler.DbIdx64Upperbound(ctx, args.Code, args.Scope, args.Table, args.Secondary, args.Primary); err2 != nil { 20110 tickerCancel() 20111 if err2 == thrift.ErrAbandonRequest { 20112 return false, thrift.WrapTException(err2) 20113 } 20114 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx64_upperbound: " + err2.Error()) 20115 oprot.WriteMessageBegin(ctx, "db_idx64_upperbound", thrift.EXCEPTION, seqId) 20116 x.Write(ctx, oprot) 20117 oprot.WriteMessageEnd(ctx) 20118 oprot.Flush(ctx) 20119 return true, thrift.WrapTException(err2) 20120 } else { 20121 result.Success = retval 20122 } 20123 tickerCancel() 20124 if err2 = oprot.WriteMessageBegin(ctx, "db_idx64_upperbound", thrift.REPLY, seqId); err2 != nil { 20125 err = thrift.WrapTException(err2) 20126 } 20127 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20128 err = thrift.WrapTException(err2) 20129 } 20130 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20131 err = thrift.WrapTException(err2) 20132 } 20133 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20134 err = thrift.WrapTException(err2) 20135 } 20136 if err != nil { 20137 return 20138 } 20139 return true, err 20140 } 20141 20142 type applyProcessorDbIdx64End struct { 20143 handler Apply 20144 } 20145 20146 func (p *applyProcessorDbIdx64End) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 20147 args := ApplyDbIdx64EndArgs{} 20148 var err2 error 20149 if err2 = args.Read(ctx, iprot); err2 != nil { 20150 iprot.ReadMessageEnd(ctx) 20151 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 20152 oprot.WriteMessageBegin(ctx, "db_idx64_end", thrift.EXCEPTION, seqId) 20153 x.Write(ctx, oprot) 20154 oprot.WriteMessageEnd(ctx) 20155 oprot.Flush(ctx) 20156 return false, thrift.WrapTException(err2) 20157 } 20158 iprot.ReadMessageEnd(ctx) 20159 20160 tickerCancel := func() {} 20161 // Start a goroutine to do server side connectivity check. 20162 if thrift.ServerConnectivityCheckInterval > 0 { 20163 var cancel context.CancelFunc 20164 ctx, cancel = context.WithCancel(ctx) 20165 defer cancel() 20166 var tickerCtx context.Context 20167 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20168 defer tickerCancel() 20169 go func(ctx context.Context, cancel context.CancelFunc) { 20170 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20171 defer ticker.Stop() 20172 for { 20173 select { 20174 case <-ctx.Done(): 20175 return 20176 case <-ticker.C: 20177 if !iprot.Transport().IsOpen() { 20178 cancel() 20179 return 20180 } 20181 } 20182 } 20183 }(tickerCtx, cancel) 20184 } 20185 20186 result := ApplyDbIdx64EndResult{} 20187 var retval int32 20188 if retval, err2 = p.handler.DbIdx64End(ctx, args.Code, args.Scope, args.Table); err2 != nil { 20189 tickerCancel() 20190 if err2 == thrift.ErrAbandonRequest { 20191 return false, thrift.WrapTException(err2) 20192 } 20193 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx64_end: " + err2.Error()) 20194 oprot.WriteMessageBegin(ctx, "db_idx64_end", thrift.EXCEPTION, seqId) 20195 x.Write(ctx, oprot) 20196 oprot.WriteMessageEnd(ctx) 20197 oprot.Flush(ctx) 20198 return true, thrift.WrapTException(err2) 20199 } else { 20200 result.Success = &retval 20201 } 20202 tickerCancel() 20203 if err2 = oprot.WriteMessageBegin(ctx, "db_idx64_end", thrift.REPLY, seqId); err2 != nil { 20204 err = thrift.WrapTException(err2) 20205 } 20206 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20207 err = thrift.WrapTException(err2) 20208 } 20209 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20210 err = thrift.WrapTException(err2) 20211 } 20212 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20213 err = thrift.WrapTException(err2) 20214 } 20215 if err != nil { 20216 return 20217 } 20218 return true, err 20219 } 20220 20221 type applyProcessorDbIdx128Store struct { 20222 handler Apply 20223 } 20224 20225 func (p *applyProcessorDbIdx128Store) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 20226 args := ApplyDbIdx128StoreArgs{} 20227 var err2 error 20228 if err2 = args.Read(ctx, iprot); err2 != nil { 20229 iprot.ReadMessageEnd(ctx) 20230 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 20231 oprot.WriteMessageBegin(ctx, "db_idx128_store", thrift.EXCEPTION, seqId) 20232 x.Write(ctx, oprot) 20233 oprot.WriteMessageEnd(ctx) 20234 oprot.Flush(ctx) 20235 return false, thrift.WrapTException(err2) 20236 } 20237 iprot.ReadMessageEnd(ctx) 20238 20239 tickerCancel := func() {} 20240 // Start a goroutine to do server side connectivity check. 20241 if thrift.ServerConnectivityCheckInterval > 0 { 20242 var cancel context.CancelFunc 20243 ctx, cancel = context.WithCancel(ctx) 20244 defer cancel() 20245 var tickerCtx context.Context 20246 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20247 defer tickerCancel() 20248 go func(ctx context.Context, cancel context.CancelFunc) { 20249 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20250 defer ticker.Stop() 20251 for { 20252 select { 20253 case <-ctx.Done(): 20254 return 20255 case <-ticker.C: 20256 if !iprot.Transport().IsOpen() { 20257 cancel() 20258 return 20259 } 20260 } 20261 } 20262 }(tickerCtx, cancel) 20263 } 20264 20265 result := ApplyDbIdx128StoreResult{} 20266 var retval int32 20267 if retval, err2 = p.handler.DbIdx128Store(ctx, args.Scope, args.Table, args.Payer, args.ID, args.Secondary); err2 != nil { 20268 tickerCancel() 20269 if err2 == thrift.ErrAbandonRequest { 20270 return false, thrift.WrapTException(err2) 20271 } 20272 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx128_store: " + err2.Error()) 20273 oprot.WriteMessageBegin(ctx, "db_idx128_store", thrift.EXCEPTION, seqId) 20274 x.Write(ctx, oprot) 20275 oprot.WriteMessageEnd(ctx) 20276 oprot.Flush(ctx) 20277 return true, thrift.WrapTException(err2) 20278 } else { 20279 result.Success = &retval 20280 } 20281 tickerCancel() 20282 if err2 = oprot.WriteMessageBegin(ctx, "db_idx128_store", thrift.REPLY, seqId); err2 != nil { 20283 err = thrift.WrapTException(err2) 20284 } 20285 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20286 err = thrift.WrapTException(err2) 20287 } 20288 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20289 err = thrift.WrapTException(err2) 20290 } 20291 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20292 err = thrift.WrapTException(err2) 20293 } 20294 if err != nil { 20295 return 20296 } 20297 return true, err 20298 } 20299 20300 type applyProcessorDbIdx128Update struct { 20301 handler Apply 20302 } 20303 20304 func (p *applyProcessorDbIdx128Update) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 20305 args := ApplyDbIdx128UpdateArgs{} 20306 var err2 error 20307 if err2 = args.Read(ctx, iprot); err2 != nil { 20308 iprot.ReadMessageEnd(ctx) 20309 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 20310 oprot.WriteMessageBegin(ctx, "db_idx128_update", thrift.EXCEPTION, seqId) 20311 x.Write(ctx, oprot) 20312 oprot.WriteMessageEnd(ctx) 20313 oprot.Flush(ctx) 20314 return false, thrift.WrapTException(err2) 20315 } 20316 iprot.ReadMessageEnd(ctx) 20317 20318 tickerCancel := func() {} 20319 // Start a goroutine to do server side connectivity check. 20320 if thrift.ServerConnectivityCheckInterval > 0 { 20321 var cancel context.CancelFunc 20322 ctx, cancel = context.WithCancel(ctx) 20323 defer cancel() 20324 var tickerCtx context.Context 20325 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20326 defer tickerCancel() 20327 go func(ctx context.Context, cancel context.CancelFunc) { 20328 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20329 defer ticker.Stop() 20330 for { 20331 select { 20332 case <-ctx.Done(): 20333 return 20334 case <-ticker.C: 20335 if !iprot.Transport().IsOpen() { 20336 cancel() 20337 return 20338 } 20339 } 20340 } 20341 }(tickerCtx, cancel) 20342 } 20343 20344 result := ApplyDbIdx128UpdateResult{} 20345 if err2 = p.handler.DbIdx128Update(ctx, args.Iterator, args.Payer, args.Secondary); err2 != nil { 20346 tickerCancel() 20347 if err2 == thrift.ErrAbandonRequest { 20348 return false, thrift.WrapTException(err2) 20349 } 20350 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx128_update: " + err2.Error()) 20351 oprot.WriteMessageBegin(ctx, "db_idx128_update", thrift.EXCEPTION, seqId) 20352 x.Write(ctx, oprot) 20353 oprot.WriteMessageEnd(ctx) 20354 oprot.Flush(ctx) 20355 return true, thrift.WrapTException(err2) 20356 } 20357 tickerCancel() 20358 if err2 = oprot.WriteMessageBegin(ctx, "db_idx128_update", thrift.REPLY, seqId); err2 != nil { 20359 err = thrift.WrapTException(err2) 20360 } 20361 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20362 err = thrift.WrapTException(err2) 20363 } 20364 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20365 err = thrift.WrapTException(err2) 20366 } 20367 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20368 err = thrift.WrapTException(err2) 20369 } 20370 if err != nil { 20371 return 20372 } 20373 return true, err 20374 } 20375 20376 type applyProcessorDbIdx128Remove struct { 20377 handler Apply 20378 } 20379 20380 func (p *applyProcessorDbIdx128Remove) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 20381 args := ApplyDbIdx128RemoveArgs{} 20382 var err2 error 20383 if err2 = args.Read(ctx, iprot); err2 != nil { 20384 iprot.ReadMessageEnd(ctx) 20385 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 20386 oprot.WriteMessageBegin(ctx, "db_idx128_remove", thrift.EXCEPTION, seqId) 20387 x.Write(ctx, oprot) 20388 oprot.WriteMessageEnd(ctx) 20389 oprot.Flush(ctx) 20390 return false, thrift.WrapTException(err2) 20391 } 20392 iprot.ReadMessageEnd(ctx) 20393 20394 tickerCancel := func() {} 20395 // Start a goroutine to do server side connectivity check. 20396 if thrift.ServerConnectivityCheckInterval > 0 { 20397 var cancel context.CancelFunc 20398 ctx, cancel = context.WithCancel(ctx) 20399 defer cancel() 20400 var tickerCtx context.Context 20401 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20402 defer tickerCancel() 20403 go func(ctx context.Context, cancel context.CancelFunc) { 20404 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20405 defer ticker.Stop() 20406 for { 20407 select { 20408 case <-ctx.Done(): 20409 return 20410 case <-ticker.C: 20411 if !iprot.Transport().IsOpen() { 20412 cancel() 20413 return 20414 } 20415 } 20416 } 20417 }(tickerCtx, cancel) 20418 } 20419 20420 result := ApplyDbIdx128RemoveResult{} 20421 if err2 = p.handler.DbIdx128Remove(ctx, args.Iterator); err2 != nil { 20422 tickerCancel() 20423 if err2 == thrift.ErrAbandonRequest { 20424 return false, thrift.WrapTException(err2) 20425 } 20426 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx128_remove: " + err2.Error()) 20427 oprot.WriteMessageBegin(ctx, "db_idx128_remove", thrift.EXCEPTION, seqId) 20428 x.Write(ctx, oprot) 20429 oprot.WriteMessageEnd(ctx) 20430 oprot.Flush(ctx) 20431 return true, thrift.WrapTException(err2) 20432 } 20433 tickerCancel() 20434 if err2 = oprot.WriteMessageBegin(ctx, "db_idx128_remove", thrift.REPLY, seqId); err2 != nil { 20435 err = thrift.WrapTException(err2) 20436 } 20437 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20438 err = thrift.WrapTException(err2) 20439 } 20440 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20441 err = thrift.WrapTException(err2) 20442 } 20443 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20444 err = thrift.WrapTException(err2) 20445 } 20446 if err != nil { 20447 return 20448 } 20449 return true, err 20450 } 20451 20452 type applyProcessorDbIdx128Next struct { 20453 handler Apply 20454 } 20455 20456 func (p *applyProcessorDbIdx128Next) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 20457 args := ApplyDbIdx128NextArgs{} 20458 var err2 error 20459 if err2 = args.Read(ctx, iprot); err2 != nil { 20460 iprot.ReadMessageEnd(ctx) 20461 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 20462 oprot.WriteMessageBegin(ctx, "db_idx128_next", thrift.EXCEPTION, seqId) 20463 x.Write(ctx, oprot) 20464 oprot.WriteMessageEnd(ctx) 20465 oprot.Flush(ctx) 20466 return false, thrift.WrapTException(err2) 20467 } 20468 iprot.ReadMessageEnd(ctx) 20469 20470 tickerCancel := func() {} 20471 // Start a goroutine to do server side connectivity check. 20472 if thrift.ServerConnectivityCheckInterval > 0 { 20473 var cancel context.CancelFunc 20474 ctx, cancel = context.WithCancel(ctx) 20475 defer cancel() 20476 var tickerCtx context.Context 20477 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20478 defer tickerCancel() 20479 go func(ctx context.Context, cancel context.CancelFunc) { 20480 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20481 defer ticker.Stop() 20482 for { 20483 select { 20484 case <-ctx.Done(): 20485 return 20486 case <-ticker.C: 20487 if !iprot.Transport().IsOpen() { 20488 cancel() 20489 return 20490 } 20491 } 20492 } 20493 }(tickerCtx, cancel) 20494 } 20495 20496 result := ApplyDbIdx128NextResult{} 20497 var retval *NextPreviousReturn 20498 if retval, err2 = p.handler.DbIdx128Next(ctx, args.Iterator); err2 != nil { 20499 tickerCancel() 20500 if err2 == thrift.ErrAbandonRequest { 20501 return false, thrift.WrapTException(err2) 20502 } 20503 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx128_next: " + err2.Error()) 20504 oprot.WriteMessageBegin(ctx, "db_idx128_next", thrift.EXCEPTION, seqId) 20505 x.Write(ctx, oprot) 20506 oprot.WriteMessageEnd(ctx) 20507 oprot.Flush(ctx) 20508 return true, thrift.WrapTException(err2) 20509 } else { 20510 result.Success = retval 20511 } 20512 tickerCancel() 20513 if err2 = oprot.WriteMessageBegin(ctx, "db_idx128_next", thrift.REPLY, seqId); err2 != nil { 20514 err = thrift.WrapTException(err2) 20515 } 20516 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20517 err = thrift.WrapTException(err2) 20518 } 20519 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20520 err = thrift.WrapTException(err2) 20521 } 20522 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20523 err = thrift.WrapTException(err2) 20524 } 20525 if err != nil { 20526 return 20527 } 20528 return true, err 20529 } 20530 20531 type applyProcessorDbIdx128Previous struct { 20532 handler Apply 20533 } 20534 20535 func (p *applyProcessorDbIdx128Previous) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 20536 args := ApplyDbIdx128PreviousArgs{} 20537 var err2 error 20538 if err2 = args.Read(ctx, iprot); err2 != nil { 20539 iprot.ReadMessageEnd(ctx) 20540 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 20541 oprot.WriteMessageBegin(ctx, "db_idx128_previous", thrift.EXCEPTION, seqId) 20542 x.Write(ctx, oprot) 20543 oprot.WriteMessageEnd(ctx) 20544 oprot.Flush(ctx) 20545 return false, thrift.WrapTException(err2) 20546 } 20547 iprot.ReadMessageEnd(ctx) 20548 20549 tickerCancel := func() {} 20550 // Start a goroutine to do server side connectivity check. 20551 if thrift.ServerConnectivityCheckInterval > 0 { 20552 var cancel context.CancelFunc 20553 ctx, cancel = context.WithCancel(ctx) 20554 defer cancel() 20555 var tickerCtx context.Context 20556 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20557 defer tickerCancel() 20558 go func(ctx context.Context, cancel context.CancelFunc) { 20559 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20560 defer ticker.Stop() 20561 for { 20562 select { 20563 case <-ctx.Done(): 20564 return 20565 case <-ticker.C: 20566 if !iprot.Transport().IsOpen() { 20567 cancel() 20568 return 20569 } 20570 } 20571 } 20572 }(tickerCtx, cancel) 20573 } 20574 20575 result := ApplyDbIdx128PreviousResult{} 20576 var retval *NextPreviousReturn 20577 if retval, err2 = p.handler.DbIdx128Previous(ctx, args.Iterator); err2 != nil { 20578 tickerCancel() 20579 if err2 == thrift.ErrAbandonRequest { 20580 return false, thrift.WrapTException(err2) 20581 } 20582 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx128_previous: " + err2.Error()) 20583 oprot.WriteMessageBegin(ctx, "db_idx128_previous", thrift.EXCEPTION, seqId) 20584 x.Write(ctx, oprot) 20585 oprot.WriteMessageEnd(ctx) 20586 oprot.Flush(ctx) 20587 return true, thrift.WrapTException(err2) 20588 } else { 20589 result.Success = retval 20590 } 20591 tickerCancel() 20592 if err2 = oprot.WriteMessageBegin(ctx, "db_idx128_previous", thrift.REPLY, seqId); err2 != nil { 20593 err = thrift.WrapTException(err2) 20594 } 20595 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20596 err = thrift.WrapTException(err2) 20597 } 20598 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20599 err = thrift.WrapTException(err2) 20600 } 20601 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20602 err = thrift.WrapTException(err2) 20603 } 20604 if err != nil { 20605 return 20606 } 20607 return true, err 20608 } 20609 20610 type applyProcessorDbIdx128FindPrimary struct { 20611 handler Apply 20612 } 20613 20614 func (p *applyProcessorDbIdx128FindPrimary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 20615 args := ApplyDbIdx128FindPrimaryArgs{} 20616 var err2 error 20617 if err2 = args.Read(ctx, iprot); err2 != nil { 20618 iprot.ReadMessageEnd(ctx) 20619 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 20620 oprot.WriteMessageBegin(ctx, "db_idx128_find_primary", thrift.EXCEPTION, seqId) 20621 x.Write(ctx, oprot) 20622 oprot.WriteMessageEnd(ctx) 20623 oprot.Flush(ctx) 20624 return false, thrift.WrapTException(err2) 20625 } 20626 iprot.ReadMessageEnd(ctx) 20627 20628 tickerCancel := func() {} 20629 // Start a goroutine to do server side connectivity check. 20630 if thrift.ServerConnectivityCheckInterval > 0 { 20631 var cancel context.CancelFunc 20632 ctx, cancel = context.WithCancel(ctx) 20633 defer cancel() 20634 var tickerCtx context.Context 20635 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20636 defer tickerCancel() 20637 go func(ctx context.Context, cancel context.CancelFunc) { 20638 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20639 defer ticker.Stop() 20640 for { 20641 select { 20642 case <-ctx.Done(): 20643 return 20644 case <-ticker.C: 20645 if !iprot.Transport().IsOpen() { 20646 cancel() 20647 return 20648 } 20649 } 20650 } 20651 }(tickerCtx, cancel) 20652 } 20653 20654 result := ApplyDbIdx128FindPrimaryResult{} 20655 var retval *FindPrimaryReturn 20656 if retval, err2 = p.handler.DbIdx128FindPrimary(ctx, args.Code, args.Scope, args.Table, args.Primary); err2 != nil { 20657 tickerCancel() 20658 if err2 == thrift.ErrAbandonRequest { 20659 return false, thrift.WrapTException(err2) 20660 } 20661 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx128_find_primary: " + err2.Error()) 20662 oprot.WriteMessageBegin(ctx, "db_idx128_find_primary", thrift.EXCEPTION, seqId) 20663 x.Write(ctx, oprot) 20664 oprot.WriteMessageEnd(ctx) 20665 oprot.Flush(ctx) 20666 return true, thrift.WrapTException(err2) 20667 } else { 20668 result.Success = retval 20669 } 20670 tickerCancel() 20671 if err2 = oprot.WriteMessageBegin(ctx, "db_idx128_find_primary", thrift.REPLY, seqId); err2 != nil { 20672 err = thrift.WrapTException(err2) 20673 } 20674 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20675 err = thrift.WrapTException(err2) 20676 } 20677 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20678 err = thrift.WrapTException(err2) 20679 } 20680 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20681 err = thrift.WrapTException(err2) 20682 } 20683 if err != nil { 20684 return 20685 } 20686 return true, err 20687 } 20688 20689 type applyProcessorDbIdx128FindSecondary struct { 20690 handler Apply 20691 } 20692 20693 func (p *applyProcessorDbIdx128FindSecondary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 20694 args := ApplyDbIdx128FindSecondaryArgs{} 20695 var err2 error 20696 if err2 = args.Read(ctx, iprot); err2 != nil { 20697 iprot.ReadMessageEnd(ctx) 20698 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 20699 oprot.WriteMessageBegin(ctx, "db_idx128_find_secondary", thrift.EXCEPTION, seqId) 20700 x.Write(ctx, oprot) 20701 oprot.WriteMessageEnd(ctx) 20702 oprot.Flush(ctx) 20703 return false, thrift.WrapTException(err2) 20704 } 20705 iprot.ReadMessageEnd(ctx) 20706 20707 tickerCancel := func() {} 20708 // Start a goroutine to do server side connectivity check. 20709 if thrift.ServerConnectivityCheckInterval > 0 { 20710 var cancel context.CancelFunc 20711 ctx, cancel = context.WithCancel(ctx) 20712 defer cancel() 20713 var tickerCtx context.Context 20714 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20715 defer tickerCancel() 20716 go func(ctx context.Context, cancel context.CancelFunc) { 20717 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20718 defer ticker.Stop() 20719 for { 20720 select { 20721 case <-ctx.Done(): 20722 return 20723 case <-ticker.C: 20724 if !iprot.Transport().IsOpen() { 20725 cancel() 20726 return 20727 } 20728 } 20729 } 20730 }(tickerCtx, cancel) 20731 } 20732 20733 result := ApplyDbIdx128FindSecondaryResult{} 20734 var retval *FindSecondaryReturn 20735 if retval, err2 = p.handler.DbIdx128FindSecondary(ctx, args.Code, args.Scope, args.Table, args.Secondary); err2 != nil { 20736 tickerCancel() 20737 if err2 == thrift.ErrAbandonRequest { 20738 return false, thrift.WrapTException(err2) 20739 } 20740 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx128_find_secondary: " + err2.Error()) 20741 oprot.WriteMessageBegin(ctx, "db_idx128_find_secondary", thrift.EXCEPTION, seqId) 20742 x.Write(ctx, oprot) 20743 oprot.WriteMessageEnd(ctx) 20744 oprot.Flush(ctx) 20745 return true, thrift.WrapTException(err2) 20746 } else { 20747 result.Success = retval 20748 } 20749 tickerCancel() 20750 if err2 = oprot.WriteMessageBegin(ctx, "db_idx128_find_secondary", thrift.REPLY, seqId); err2 != nil { 20751 err = thrift.WrapTException(err2) 20752 } 20753 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20754 err = thrift.WrapTException(err2) 20755 } 20756 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20757 err = thrift.WrapTException(err2) 20758 } 20759 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20760 err = thrift.WrapTException(err2) 20761 } 20762 if err != nil { 20763 return 20764 } 20765 return true, err 20766 } 20767 20768 type applyProcessorDbIdx128Lowerbound struct { 20769 handler Apply 20770 } 20771 20772 func (p *applyProcessorDbIdx128Lowerbound) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 20773 args := ApplyDbIdx128LowerboundArgs{} 20774 var err2 error 20775 if err2 = args.Read(ctx, iprot); err2 != nil { 20776 iprot.ReadMessageEnd(ctx) 20777 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 20778 oprot.WriteMessageBegin(ctx, "db_idx128_lowerbound", thrift.EXCEPTION, seqId) 20779 x.Write(ctx, oprot) 20780 oprot.WriteMessageEnd(ctx) 20781 oprot.Flush(ctx) 20782 return false, thrift.WrapTException(err2) 20783 } 20784 iprot.ReadMessageEnd(ctx) 20785 20786 tickerCancel := func() {} 20787 // Start a goroutine to do server side connectivity check. 20788 if thrift.ServerConnectivityCheckInterval > 0 { 20789 var cancel context.CancelFunc 20790 ctx, cancel = context.WithCancel(ctx) 20791 defer cancel() 20792 var tickerCtx context.Context 20793 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20794 defer tickerCancel() 20795 go func(ctx context.Context, cancel context.CancelFunc) { 20796 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20797 defer ticker.Stop() 20798 for { 20799 select { 20800 case <-ctx.Done(): 20801 return 20802 case <-ticker.C: 20803 if !iprot.Transport().IsOpen() { 20804 cancel() 20805 return 20806 } 20807 } 20808 } 20809 }(tickerCtx, cancel) 20810 } 20811 20812 result := ApplyDbIdx128LowerboundResult{} 20813 var retval *LowerBoundUpperBoundReturn 20814 if retval, err2 = p.handler.DbIdx128Lowerbound(ctx, args.Code, args.Scope, args.Table, args.Secondary, args.Primary); err2 != nil { 20815 tickerCancel() 20816 if err2 == thrift.ErrAbandonRequest { 20817 return false, thrift.WrapTException(err2) 20818 } 20819 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx128_lowerbound: " + err2.Error()) 20820 oprot.WriteMessageBegin(ctx, "db_idx128_lowerbound", thrift.EXCEPTION, seqId) 20821 x.Write(ctx, oprot) 20822 oprot.WriteMessageEnd(ctx) 20823 oprot.Flush(ctx) 20824 return true, thrift.WrapTException(err2) 20825 } else { 20826 result.Success = retval 20827 } 20828 tickerCancel() 20829 if err2 = oprot.WriteMessageBegin(ctx, "db_idx128_lowerbound", thrift.REPLY, seqId); err2 != nil { 20830 err = thrift.WrapTException(err2) 20831 } 20832 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20833 err = thrift.WrapTException(err2) 20834 } 20835 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20836 err = thrift.WrapTException(err2) 20837 } 20838 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20839 err = thrift.WrapTException(err2) 20840 } 20841 if err != nil { 20842 return 20843 } 20844 return true, err 20845 } 20846 20847 type applyProcessorDbIdx128Upperbound struct { 20848 handler Apply 20849 } 20850 20851 func (p *applyProcessorDbIdx128Upperbound) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 20852 args := ApplyDbIdx128UpperboundArgs{} 20853 var err2 error 20854 if err2 = args.Read(ctx, iprot); err2 != nil { 20855 iprot.ReadMessageEnd(ctx) 20856 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 20857 oprot.WriteMessageBegin(ctx, "db_idx128_upperbound", thrift.EXCEPTION, seqId) 20858 x.Write(ctx, oprot) 20859 oprot.WriteMessageEnd(ctx) 20860 oprot.Flush(ctx) 20861 return false, thrift.WrapTException(err2) 20862 } 20863 iprot.ReadMessageEnd(ctx) 20864 20865 tickerCancel := func() {} 20866 // Start a goroutine to do server side connectivity check. 20867 if thrift.ServerConnectivityCheckInterval > 0 { 20868 var cancel context.CancelFunc 20869 ctx, cancel = context.WithCancel(ctx) 20870 defer cancel() 20871 var tickerCtx context.Context 20872 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20873 defer tickerCancel() 20874 go func(ctx context.Context, cancel context.CancelFunc) { 20875 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20876 defer ticker.Stop() 20877 for { 20878 select { 20879 case <-ctx.Done(): 20880 return 20881 case <-ticker.C: 20882 if !iprot.Transport().IsOpen() { 20883 cancel() 20884 return 20885 } 20886 } 20887 } 20888 }(tickerCtx, cancel) 20889 } 20890 20891 result := ApplyDbIdx128UpperboundResult{} 20892 var retval *LowerBoundUpperBoundReturn 20893 if retval, err2 = p.handler.DbIdx128Upperbound(ctx, args.Code, args.Scope, args.Table, args.Secondary, args.Primary); err2 != nil { 20894 tickerCancel() 20895 if err2 == thrift.ErrAbandonRequest { 20896 return false, thrift.WrapTException(err2) 20897 } 20898 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx128_upperbound: " + err2.Error()) 20899 oprot.WriteMessageBegin(ctx, "db_idx128_upperbound", thrift.EXCEPTION, seqId) 20900 x.Write(ctx, oprot) 20901 oprot.WriteMessageEnd(ctx) 20902 oprot.Flush(ctx) 20903 return true, thrift.WrapTException(err2) 20904 } else { 20905 result.Success = retval 20906 } 20907 tickerCancel() 20908 if err2 = oprot.WriteMessageBegin(ctx, "db_idx128_upperbound", thrift.REPLY, seqId); err2 != nil { 20909 err = thrift.WrapTException(err2) 20910 } 20911 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20912 err = thrift.WrapTException(err2) 20913 } 20914 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20915 err = thrift.WrapTException(err2) 20916 } 20917 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20918 err = thrift.WrapTException(err2) 20919 } 20920 if err != nil { 20921 return 20922 } 20923 return true, err 20924 } 20925 20926 type applyProcessorDbIdx128End struct { 20927 handler Apply 20928 } 20929 20930 func (p *applyProcessorDbIdx128End) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 20931 args := ApplyDbIdx128EndArgs{} 20932 var err2 error 20933 if err2 = args.Read(ctx, iprot); err2 != nil { 20934 iprot.ReadMessageEnd(ctx) 20935 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 20936 oprot.WriteMessageBegin(ctx, "db_idx128_end", thrift.EXCEPTION, seqId) 20937 x.Write(ctx, oprot) 20938 oprot.WriteMessageEnd(ctx) 20939 oprot.Flush(ctx) 20940 return false, thrift.WrapTException(err2) 20941 } 20942 iprot.ReadMessageEnd(ctx) 20943 20944 tickerCancel := func() {} 20945 // Start a goroutine to do server side connectivity check. 20946 if thrift.ServerConnectivityCheckInterval > 0 { 20947 var cancel context.CancelFunc 20948 ctx, cancel = context.WithCancel(ctx) 20949 defer cancel() 20950 var tickerCtx context.Context 20951 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 20952 defer tickerCancel() 20953 go func(ctx context.Context, cancel context.CancelFunc) { 20954 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 20955 defer ticker.Stop() 20956 for { 20957 select { 20958 case <-ctx.Done(): 20959 return 20960 case <-ticker.C: 20961 if !iprot.Transport().IsOpen() { 20962 cancel() 20963 return 20964 } 20965 } 20966 } 20967 }(tickerCtx, cancel) 20968 } 20969 20970 result := ApplyDbIdx128EndResult{} 20971 var retval int32 20972 if retval, err2 = p.handler.DbIdx128End(ctx, args.Code, args.Scope, args.Table); err2 != nil { 20973 tickerCancel() 20974 if err2 == thrift.ErrAbandonRequest { 20975 return false, thrift.WrapTException(err2) 20976 } 20977 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx128_end: " + err2.Error()) 20978 oprot.WriteMessageBegin(ctx, "db_idx128_end", thrift.EXCEPTION, seqId) 20979 x.Write(ctx, oprot) 20980 oprot.WriteMessageEnd(ctx) 20981 oprot.Flush(ctx) 20982 return true, thrift.WrapTException(err2) 20983 } else { 20984 result.Success = &retval 20985 } 20986 tickerCancel() 20987 if err2 = oprot.WriteMessageBegin(ctx, "db_idx128_end", thrift.REPLY, seqId); err2 != nil { 20988 err = thrift.WrapTException(err2) 20989 } 20990 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 20991 err = thrift.WrapTException(err2) 20992 } 20993 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 20994 err = thrift.WrapTException(err2) 20995 } 20996 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 20997 err = thrift.WrapTException(err2) 20998 } 20999 if err != nil { 21000 return 21001 } 21002 return true, err 21003 } 21004 21005 type applyProcessorDbIdx256Store struct { 21006 handler Apply 21007 } 21008 21009 func (p *applyProcessorDbIdx256Store) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21010 args := ApplyDbIdx256StoreArgs{} 21011 var err2 error 21012 if err2 = args.Read(ctx, iprot); err2 != nil { 21013 iprot.ReadMessageEnd(ctx) 21014 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21015 oprot.WriteMessageBegin(ctx, "db_idx256_store", thrift.EXCEPTION, seqId) 21016 x.Write(ctx, oprot) 21017 oprot.WriteMessageEnd(ctx) 21018 oprot.Flush(ctx) 21019 return false, thrift.WrapTException(err2) 21020 } 21021 iprot.ReadMessageEnd(ctx) 21022 21023 tickerCancel := func() {} 21024 // Start a goroutine to do server side connectivity check. 21025 if thrift.ServerConnectivityCheckInterval > 0 { 21026 var cancel context.CancelFunc 21027 ctx, cancel = context.WithCancel(ctx) 21028 defer cancel() 21029 var tickerCtx context.Context 21030 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21031 defer tickerCancel() 21032 go func(ctx context.Context, cancel context.CancelFunc) { 21033 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21034 defer ticker.Stop() 21035 for { 21036 select { 21037 case <-ctx.Done(): 21038 return 21039 case <-ticker.C: 21040 if !iprot.Transport().IsOpen() { 21041 cancel() 21042 return 21043 } 21044 } 21045 } 21046 }(tickerCtx, cancel) 21047 } 21048 21049 result := ApplyDbIdx256StoreResult{} 21050 var retval int32 21051 if retval, err2 = p.handler.DbIdx256Store(ctx, args.Scope, args.Table, args.Payer, args.ID, args.Data); err2 != nil { 21052 tickerCancel() 21053 if err2 == thrift.ErrAbandonRequest { 21054 return false, thrift.WrapTException(err2) 21055 } 21056 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx256_store: " + err2.Error()) 21057 oprot.WriteMessageBegin(ctx, "db_idx256_store", thrift.EXCEPTION, seqId) 21058 x.Write(ctx, oprot) 21059 oprot.WriteMessageEnd(ctx) 21060 oprot.Flush(ctx) 21061 return true, thrift.WrapTException(err2) 21062 } else { 21063 result.Success = &retval 21064 } 21065 tickerCancel() 21066 if err2 = oprot.WriteMessageBegin(ctx, "db_idx256_store", thrift.REPLY, seqId); err2 != nil { 21067 err = thrift.WrapTException(err2) 21068 } 21069 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 21070 err = thrift.WrapTException(err2) 21071 } 21072 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 21073 err = thrift.WrapTException(err2) 21074 } 21075 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 21076 err = thrift.WrapTException(err2) 21077 } 21078 if err != nil { 21079 return 21080 } 21081 return true, err 21082 } 21083 21084 type applyProcessorDbIdx256Update struct { 21085 handler Apply 21086 } 21087 21088 func (p *applyProcessorDbIdx256Update) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21089 args := ApplyDbIdx256UpdateArgs{} 21090 var err2 error 21091 if err2 = args.Read(ctx, iprot); err2 != nil { 21092 iprot.ReadMessageEnd(ctx) 21093 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21094 oprot.WriteMessageBegin(ctx, "db_idx256_update", thrift.EXCEPTION, seqId) 21095 x.Write(ctx, oprot) 21096 oprot.WriteMessageEnd(ctx) 21097 oprot.Flush(ctx) 21098 return false, thrift.WrapTException(err2) 21099 } 21100 iprot.ReadMessageEnd(ctx) 21101 21102 tickerCancel := func() {} 21103 // Start a goroutine to do server side connectivity check. 21104 if thrift.ServerConnectivityCheckInterval > 0 { 21105 var cancel context.CancelFunc 21106 ctx, cancel = context.WithCancel(ctx) 21107 defer cancel() 21108 var tickerCtx context.Context 21109 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21110 defer tickerCancel() 21111 go func(ctx context.Context, cancel context.CancelFunc) { 21112 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21113 defer ticker.Stop() 21114 for { 21115 select { 21116 case <-ctx.Done(): 21117 return 21118 case <-ticker.C: 21119 if !iprot.Transport().IsOpen() { 21120 cancel() 21121 return 21122 } 21123 } 21124 } 21125 }(tickerCtx, cancel) 21126 } 21127 21128 result := ApplyDbIdx256UpdateResult{} 21129 if err2 = p.handler.DbIdx256Update(ctx, args.Iterator, args.Payer, args.Data); err2 != nil { 21130 tickerCancel() 21131 if err2 == thrift.ErrAbandonRequest { 21132 return false, thrift.WrapTException(err2) 21133 } 21134 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx256_update: " + err2.Error()) 21135 oprot.WriteMessageBegin(ctx, "db_idx256_update", thrift.EXCEPTION, seqId) 21136 x.Write(ctx, oprot) 21137 oprot.WriteMessageEnd(ctx) 21138 oprot.Flush(ctx) 21139 return true, thrift.WrapTException(err2) 21140 } 21141 tickerCancel() 21142 if err2 = oprot.WriteMessageBegin(ctx, "db_idx256_update", thrift.REPLY, seqId); err2 != nil { 21143 err = thrift.WrapTException(err2) 21144 } 21145 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 21146 err = thrift.WrapTException(err2) 21147 } 21148 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 21149 err = thrift.WrapTException(err2) 21150 } 21151 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 21152 err = thrift.WrapTException(err2) 21153 } 21154 if err != nil { 21155 return 21156 } 21157 return true, err 21158 } 21159 21160 type applyProcessorDbIdx256Remove struct { 21161 handler Apply 21162 } 21163 21164 func (p *applyProcessorDbIdx256Remove) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21165 args := ApplyDbIdx256RemoveArgs{} 21166 var err2 error 21167 if err2 = args.Read(ctx, iprot); err2 != nil { 21168 iprot.ReadMessageEnd(ctx) 21169 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21170 oprot.WriteMessageBegin(ctx, "db_idx256_remove", thrift.EXCEPTION, seqId) 21171 x.Write(ctx, oprot) 21172 oprot.WriteMessageEnd(ctx) 21173 oprot.Flush(ctx) 21174 return false, thrift.WrapTException(err2) 21175 } 21176 iprot.ReadMessageEnd(ctx) 21177 21178 tickerCancel := func() {} 21179 // Start a goroutine to do server side connectivity check. 21180 if thrift.ServerConnectivityCheckInterval > 0 { 21181 var cancel context.CancelFunc 21182 ctx, cancel = context.WithCancel(ctx) 21183 defer cancel() 21184 var tickerCtx context.Context 21185 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21186 defer tickerCancel() 21187 go func(ctx context.Context, cancel context.CancelFunc) { 21188 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21189 defer ticker.Stop() 21190 for { 21191 select { 21192 case <-ctx.Done(): 21193 return 21194 case <-ticker.C: 21195 if !iprot.Transport().IsOpen() { 21196 cancel() 21197 return 21198 } 21199 } 21200 } 21201 }(tickerCtx, cancel) 21202 } 21203 21204 result := ApplyDbIdx256RemoveResult{} 21205 if err2 = p.handler.DbIdx256Remove(ctx, args.Iterator); err2 != nil { 21206 tickerCancel() 21207 if err2 == thrift.ErrAbandonRequest { 21208 return false, thrift.WrapTException(err2) 21209 } 21210 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx256_remove: " + err2.Error()) 21211 oprot.WriteMessageBegin(ctx, "db_idx256_remove", thrift.EXCEPTION, seqId) 21212 x.Write(ctx, oprot) 21213 oprot.WriteMessageEnd(ctx) 21214 oprot.Flush(ctx) 21215 return true, thrift.WrapTException(err2) 21216 } 21217 tickerCancel() 21218 if err2 = oprot.WriteMessageBegin(ctx, "db_idx256_remove", thrift.REPLY, seqId); err2 != nil { 21219 err = thrift.WrapTException(err2) 21220 } 21221 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 21222 err = thrift.WrapTException(err2) 21223 } 21224 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 21225 err = thrift.WrapTException(err2) 21226 } 21227 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 21228 err = thrift.WrapTException(err2) 21229 } 21230 if err != nil { 21231 return 21232 } 21233 return true, err 21234 } 21235 21236 type applyProcessorDbIdx256Next struct { 21237 handler Apply 21238 } 21239 21240 func (p *applyProcessorDbIdx256Next) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21241 args := ApplyDbIdx256NextArgs{} 21242 var err2 error 21243 if err2 = args.Read(ctx, iprot); err2 != nil { 21244 iprot.ReadMessageEnd(ctx) 21245 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21246 oprot.WriteMessageBegin(ctx, "db_idx256_next", thrift.EXCEPTION, seqId) 21247 x.Write(ctx, oprot) 21248 oprot.WriteMessageEnd(ctx) 21249 oprot.Flush(ctx) 21250 return false, thrift.WrapTException(err2) 21251 } 21252 iprot.ReadMessageEnd(ctx) 21253 21254 tickerCancel := func() {} 21255 // Start a goroutine to do server side connectivity check. 21256 if thrift.ServerConnectivityCheckInterval > 0 { 21257 var cancel context.CancelFunc 21258 ctx, cancel = context.WithCancel(ctx) 21259 defer cancel() 21260 var tickerCtx context.Context 21261 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21262 defer tickerCancel() 21263 go func(ctx context.Context, cancel context.CancelFunc) { 21264 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21265 defer ticker.Stop() 21266 for { 21267 select { 21268 case <-ctx.Done(): 21269 return 21270 case <-ticker.C: 21271 if !iprot.Transport().IsOpen() { 21272 cancel() 21273 return 21274 } 21275 } 21276 } 21277 }(tickerCtx, cancel) 21278 } 21279 21280 result := ApplyDbIdx256NextResult{} 21281 var retval *NextPreviousReturn 21282 if retval, err2 = p.handler.DbIdx256Next(ctx, args.Iterator); err2 != nil { 21283 tickerCancel() 21284 if err2 == thrift.ErrAbandonRequest { 21285 return false, thrift.WrapTException(err2) 21286 } 21287 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx256_next: " + err2.Error()) 21288 oprot.WriteMessageBegin(ctx, "db_idx256_next", thrift.EXCEPTION, seqId) 21289 x.Write(ctx, oprot) 21290 oprot.WriteMessageEnd(ctx) 21291 oprot.Flush(ctx) 21292 return true, thrift.WrapTException(err2) 21293 } else { 21294 result.Success = retval 21295 } 21296 tickerCancel() 21297 if err2 = oprot.WriteMessageBegin(ctx, "db_idx256_next", thrift.REPLY, seqId); err2 != nil { 21298 err = thrift.WrapTException(err2) 21299 } 21300 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 21301 err = thrift.WrapTException(err2) 21302 } 21303 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 21304 err = thrift.WrapTException(err2) 21305 } 21306 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 21307 err = thrift.WrapTException(err2) 21308 } 21309 if err != nil { 21310 return 21311 } 21312 return true, err 21313 } 21314 21315 type applyProcessorDbIdx256Previous struct { 21316 handler Apply 21317 } 21318 21319 func (p *applyProcessorDbIdx256Previous) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21320 args := ApplyDbIdx256PreviousArgs{} 21321 var err2 error 21322 if err2 = args.Read(ctx, iprot); err2 != nil { 21323 iprot.ReadMessageEnd(ctx) 21324 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21325 oprot.WriteMessageBegin(ctx, "db_idx256_previous", thrift.EXCEPTION, seqId) 21326 x.Write(ctx, oprot) 21327 oprot.WriteMessageEnd(ctx) 21328 oprot.Flush(ctx) 21329 return false, thrift.WrapTException(err2) 21330 } 21331 iprot.ReadMessageEnd(ctx) 21332 21333 tickerCancel := func() {} 21334 // Start a goroutine to do server side connectivity check. 21335 if thrift.ServerConnectivityCheckInterval > 0 { 21336 var cancel context.CancelFunc 21337 ctx, cancel = context.WithCancel(ctx) 21338 defer cancel() 21339 var tickerCtx context.Context 21340 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21341 defer tickerCancel() 21342 go func(ctx context.Context, cancel context.CancelFunc) { 21343 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21344 defer ticker.Stop() 21345 for { 21346 select { 21347 case <-ctx.Done(): 21348 return 21349 case <-ticker.C: 21350 if !iprot.Transport().IsOpen() { 21351 cancel() 21352 return 21353 } 21354 } 21355 } 21356 }(tickerCtx, cancel) 21357 } 21358 21359 result := ApplyDbIdx256PreviousResult{} 21360 var retval *NextPreviousReturn 21361 if retval, err2 = p.handler.DbIdx256Previous(ctx, args.Iterator); err2 != nil { 21362 tickerCancel() 21363 if err2 == thrift.ErrAbandonRequest { 21364 return false, thrift.WrapTException(err2) 21365 } 21366 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx256_previous: " + err2.Error()) 21367 oprot.WriteMessageBegin(ctx, "db_idx256_previous", thrift.EXCEPTION, seqId) 21368 x.Write(ctx, oprot) 21369 oprot.WriteMessageEnd(ctx) 21370 oprot.Flush(ctx) 21371 return true, thrift.WrapTException(err2) 21372 } else { 21373 result.Success = retval 21374 } 21375 tickerCancel() 21376 if err2 = oprot.WriteMessageBegin(ctx, "db_idx256_previous", thrift.REPLY, seqId); err2 != nil { 21377 err = thrift.WrapTException(err2) 21378 } 21379 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 21380 err = thrift.WrapTException(err2) 21381 } 21382 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 21383 err = thrift.WrapTException(err2) 21384 } 21385 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 21386 err = thrift.WrapTException(err2) 21387 } 21388 if err != nil { 21389 return 21390 } 21391 return true, err 21392 } 21393 21394 type applyProcessorDbIdx256FindPrimary struct { 21395 handler Apply 21396 } 21397 21398 func (p *applyProcessorDbIdx256FindPrimary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21399 args := ApplyDbIdx256FindPrimaryArgs{} 21400 var err2 error 21401 if err2 = args.Read(ctx, iprot); err2 != nil { 21402 iprot.ReadMessageEnd(ctx) 21403 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21404 oprot.WriteMessageBegin(ctx, "db_idx256_find_primary", thrift.EXCEPTION, seqId) 21405 x.Write(ctx, oprot) 21406 oprot.WriteMessageEnd(ctx) 21407 oprot.Flush(ctx) 21408 return false, thrift.WrapTException(err2) 21409 } 21410 iprot.ReadMessageEnd(ctx) 21411 21412 tickerCancel := func() {} 21413 // Start a goroutine to do server side connectivity check. 21414 if thrift.ServerConnectivityCheckInterval > 0 { 21415 var cancel context.CancelFunc 21416 ctx, cancel = context.WithCancel(ctx) 21417 defer cancel() 21418 var tickerCtx context.Context 21419 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21420 defer tickerCancel() 21421 go func(ctx context.Context, cancel context.CancelFunc) { 21422 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21423 defer ticker.Stop() 21424 for { 21425 select { 21426 case <-ctx.Done(): 21427 return 21428 case <-ticker.C: 21429 if !iprot.Transport().IsOpen() { 21430 cancel() 21431 return 21432 } 21433 } 21434 } 21435 }(tickerCtx, cancel) 21436 } 21437 21438 result := ApplyDbIdx256FindPrimaryResult{} 21439 var retval *FindPrimaryReturn 21440 if retval, err2 = p.handler.DbIdx256FindPrimary(ctx, args.Code, args.Scope, args.Table, args.Primary); err2 != nil { 21441 tickerCancel() 21442 if err2 == thrift.ErrAbandonRequest { 21443 return false, thrift.WrapTException(err2) 21444 } 21445 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx256_find_primary: " + err2.Error()) 21446 oprot.WriteMessageBegin(ctx, "db_idx256_find_primary", thrift.EXCEPTION, seqId) 21447 x.Write(ctx, oprot) 21448 oprot.WriteMessageEnd(ctx) 21449 oprot.Flush(ctx) 21450 return true, thrift.WrapTException(err2) 21451 } else { 21452 result.Success = retval 21453 } 21454 tickerCancel() 21455 if err2 = oprot.WriteMessageBegin(ctx, "db_idx256_find_primary", thrift.REPLY, seqId); err2 != nil { 21456 err = thrift.WrapTException(err2) 21457 } 21458 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 21459 err = thrift.WrapTException(err2) 21460 } 21461 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 21462 err = thrift.WrapTException(err2) 21463 } 21464 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 21465 err = thrift.WrapTException(err2) 21466 } 21467 if err != nil { 21468 return 21469 } 21470 return true, err 21471 } 21472 21473 type applyProcessorDbIdx256FindSecondary struct { 21474 handler Apply 21475 } 21476 21477 func (p *applyProcessorDbIdx256FindSecondary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21478 args := ApplyDbIdx256FindSecondaryArgs{} 21479 var err2 error 21480 if err2 = args.Read(ctx, iprot); err2 != nil { 21481 iprot.ReadMessageEnd(ctx) 21482 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21483 oprot.WriteMessageBegin(ctx, "db_idx256_find_secondary", thrift.EXCEPTION, seqId) 21484 x.Write(ctx, oprot) 21485 oprot.WriteMessageEnd(ctx) 21486 oprot.Flush(ctx) 21487 return false, thrift.WrapTException(err2) 21488 } 21489 iprot.ReadMessageEnd(ctx) 21490 21491 tickerCancel := func() {} 21492 // Start a goroutine to do server side connectivity check. 21493 if thrift.ServerConnectivityCheckInterval > 0 { 21494 var cancel context.CancelFunc 21495 ctx, cancel = context.WithCancel(ctx) 21496 defer cancel() 21497 var tickerCtx context.Context 21498 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21499 defer tickerCancel() 21500 go func(ctx context.Context, cancel context.CancelFunc) { 21501 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21502 defer ticker.Stop() 21503 for { 21504 select { 21505 case <-ctx.Done(): 21506 return 21507 case <-ticker.C: 21508 if !iprot.Transport().IsOpen() { 21509 cancel() 21510 return 21511 } 21512 } 21513 } 21514 }(tickerCtx, cancel) 21515 } 21516 21517 result := ApplyDbIdx256FindSecondaryResult{} 21518 var retval *FindSecondaryReturn 21519 if retval, err2 = p.handler.DbIdx256FindSecondary(ctx, args.Code, args.Scope, args.Table, args.Data); err2 != nil { 21520 tickerCancel() 21521 if err2 == thrift.ErrAbandonRequest { 21522 return false, thrift.WrapTException(err2) 21523 } 21524 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx256_find_secondary: " + err2.Error()) 21525 oprot.WriteMessageBegin(ctx, "db_idx256_find_secondary", thrift.EXCEPTION, seqId) 21526 x.Write(ctx, oprot) 21527 oprot.WriteMessageEnd(ctx) 21528 oprot.Flush(ctx) 21529 return true, thrift.WrapTException(err2) 21530 } else { 21531 result.Success = retval 21532 } 21533 tickerCancel() 21534 if err2 = oprot.WriteMessageBegin(ctx, "db_idx256_find_secondary", thrift.REPLY, seqId); err2 != nil { 21535 err = thrift.WrapTException(err2) 21536 } 21537 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 21538 err = thrift.WrapTException(err2) 21539 } 21540 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 21541 err = thrift.WrapTException(err2) 21542 } 21543 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 21544 err = thrift.WrapTException(err2) 21545 } 21546 if err != nil { 21547 return 21548 } 21549 return true, err 21550 } 21551 21552 type applyProcessorDbIdx256Lowerbound struct { 21553 handler Apply 21554 } 21555 21556 func (p *applyProcessorDbIdx256Lowerbound) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21557 args := ApplyDbIdx256LowerboundArgs{} 21558 var err2 error 21559 if err2 = args.Read(ctx, iprot); err2 != nil { 21560 iprot.ReadMessageEnd(ctx) 21561 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21562 oprot.WriteMessageBegin(ctx, "db_idx256_lowerbound", thrift.EXCEPTION, seqId) 21563 x.Write(ctx, oprot) 21564 oprot.WriteMessageEnd(ctx) 21565 oprot.Flush(ctx) 21566 return false, thrift.WrapTException(err2) 21567 } 21568 iprot.ReadMessageEnd(ctx) 21569 21570 tickerCancel := func() {} 21571 // Start a goroutine to do server side connectivity check. 21572 if thrift.ServerConnectivityCheckInterval > 0 { 21573 var cancel context.CancelFunc 21574 ctx, cancel = context.WithCancel(ctx) 21575 defer cancel() 21576 var tickerCtx context.Context 21577 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21578 defer tickerCancel() 21579 go func(ctx context.Context, cancel context.CancelFunc) { 21580 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21581 defer ticker.Stop() 21582 for { 21583 select { 21584 case <-ctx.Done(): 21585 return 21586 case <-ticker.C: 21587 if !iprot.Transport().IsOpen() { 21588 cancel() 21589 return 21590 } 21591 } 21592 } 21593 }(tickerCtx, cancel) 21594 } 21595 21596 result := ApplyDbIdx256LowerboundResult{} 21597 var retval *LowerBoundUpperBoundReturn 21598 if retval, err2 = p.handler.DbIdx256Lowerbound(ctx, args.Code, args.Scope, args.Table, args.Data, args.Primary); err2 != nil { 21599 tickerCancel() 21600 if err2 == thrift.ErrAbandonRequest { 21601 return false, thrift.WrapTException(err2) 21602 } 21603 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx256_lowerbound: " + err2.Error()) 21604 oprot.WriteMessageBegin(ctx, "db_idx256_lowerbound", thrift.EXCEPTION, seqId) 21605 x.Write(ctx, oprot) 21606 oprot.WriteMessageEnd(ctx) 21607 oprot.Flush(ctx) 21608 return true, thrift.WrapTException(err2) 21609 } else { 21610 result.Success = retval 21611 } 21612 tickerCancel() 21613 if err2 = oprot.WriteMessageBegin(ctx, "db_idx256_lowerbound", thrift.REPLY, seqId); err2 != nil { 21614 err = thrift.WrapTException(err2) 21615 } 21616 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 21617 err = thrift.WrapTException(err2) 21618 } 21619 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 21620 err = thrift.WrapTException(err2) 21621 } 21622 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 21623 err = thrift.WrapTException(err2) 21624 } 21625 if err != nil { 21626 return 21627 } 21628 return true, err 21629 } 21630 21631 type applyProcessorDbIdx256Upperbound struct { 21632 handler Apply 21633 } 21634 21635 func (p *applyProcessorDbIdx256Upperbound) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21636 args := ApplyDbIdx256UpperboundArgs{} 21637 var err2 error 21638 if err2 = args.Read(ctx, iprot); err2 != nil { 21639 iprot.ReadMessageEnd(ctx) 21640 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21641 oprot.WriteMessageBegin(ctx, "db_idx256_upperbound", thrift.EXCEPTION, seqId) 21642 x.Write(ctx, oprot) 21643 oprot.WriteMessageEnd(ctx) 21644 oprot.Flush(ctx) 21645 return false, thrift.WrapTException(err2) 21646 } 21647 iprot.ReadMessageEnd(ctx) 21648 21649 tickerCancel := func() {} 21650 // Start a goroutine to do server side connectivity check. 21651 if thrift.ServerConnectivityCheckInterval > 0 { 21652 var cancel context.CancelFunc 21653 ctx, cancel = context.WithCancel(ctx) 21654 defer cancel() 21655 var tickerCtx context.Context 21656 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21657 defer tickerCancel() 21658 go func(ctx context.Context, cancel context.CancelFunc) { 21659 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21660 defer ticker.Stop() 21661 for { 21662 select { 21663 case <-ctx.Done(): 21664 return 21665 case <-ticker.C: 21666 if !iprot.Transport().IsOpen() { 21667 cancel() 21668 return 21669 } 21670 } 21671 } 21672 }(tickerCtx, cancel) 21673 } 21674 21675 result := ApplyDbIdx256UpperboundResult{} 21676 var retval *LowerBoundUpperBoundReturn 21677 if retval, err2 = p.handler.DbIdx256Upperbound(ctx, args.Code, args.Scope, args.Table, args.Data, args.Primary); err2 != nil { 21678 tickerCancel() 21679 if err2 == thrift.ErrAbandonRequest { 21680 return false, thrift.WrapTException(err2) 21681 } 21682 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx256_upperbound: " + err2.Error()) 21683 oprot.WriteMessageBegin(ctx, "db_idx256_upperbound", thrift.EXCEPTION, seqId) 21684 x.Write(ctx, oprot) 21685 oprot.WriteMessageEnd(ctx) 21686 oprot.Flush(ctx) 21687 return true, thrift.WrapTException(err2) 21688 } else { 21689 result.Success = retval 21690 } 21691 tickerCancel() 21692 if err2 = oprot.WriteMessageBegin(ctx, "db_idx256_upperbound", thrift.REPLY, seqId); err2 != nil { 21693 err = thrift.WrapTException(err2) 21694 } 21695 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 21696 err = thrift.WrapTException(err2) 21697 } 21698 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 21699 err = thrift.WrapTException(err2) 21700 } 21701 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 21702 err = thrift.WrapTException(err2) 21703 } 21704 if err != nil { 21705 return 21706 } 21707 return true, err 21708 } 21709 21710 type applyProcessorDbIdx256End struct { 21711 handler Apply 21712 } 21713 21714 func (p *applyProcessorDbIdx256End) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21715 args := ApplyDbIdx256EndArgs{} 21716 var err2 error 21717 if err2 = args.Read(ctx, iprot); err2 != nil { 21718 iprot.ReadMessageEnd(ctx) 21719 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21720 oprot.WriteMessageBegin(ctx, "db_idx256_end", thrift.EXCEPTION, seqId) 21721 x.Write(ctx, oprot) 21722 oprot.WriteMessageEnd(ctx) 21723 oprot.Flush(ctx) 21724 return false, thrift.WrapTException(err2) 21725 } 21726 iprot.ReadMessageEnd(ctx) 21727 21728 tickerCancel := func() {} 21729 // Start a goroutine to do server side connectivity check. 21730 if thrift.ServerConnectivityCheckInterval > 0 { 21731 var cancel context.CancelFunc 21732 ctx, cancel = context.WithCancel(ctx) 21733 defer cancel() 21734 var tickerCtx context.Context 21735 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21736 defer tickerCancel() 21737 go func(ctx context.Context, cancel context.CancelFunc) { 21738 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21739 defer ticker.Stop() 21740 for { 21741 select { 21742 case <-ctx.Done(): 21743 return 21744 case <-ticker.C: 21745 if !iprot.Transport().IsOpen() { 21746 cancel() 21747 return 21748 } 21749 } 21750 } 21751 }(tickerCtx, cancel) 21752 } 21753 21754 result := ApplyDbIdx256EndResult{} 21755 var retval int32 21756 if retval, err2 = p.handler.DbIdx256End(ctx, args.Code, args.Scope, args.Table); err2 != nil { 21757 tickerCancel() 21758 if err2 == thrift.ErrAbandonRequest { 21759 return false, thrift.WrapTException(err2) 21760 } 21761 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx256_end: " + err2.Error()) 21762 oprot.WriteMessageBegin(ctx, "db_idx256_end", thrift.EXCEPTION, seqId) 21763 x.Write(ctx, oprot) 21764 oprot.WriteMessageEnd(ctx) 21765 oprot.Flush(ctx) 21766 return true, thrift.WrapTException(err2) 21767 } else { 21768 result.Success = &retval 21769 } 21770 tickerCancel() 21771 if err2 = oprot.WriteMessageBegin(ctx, "db_idx256_end", thrift.REPLY, seqId); err2 != nil { 21772 err = thrift.WrapTException(err2) 21773 } 21774 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 21775 err = thrift.WrapTException(err2) 21776 } 21777 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 21778 err = thrift.WrapTException(err2) 21779 } 21780 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 21781 err = thrift.WrapTException(err2) 21782 } 21783 if err != nil { 21784 return 21785 } 21786 return true, err 21787 } 21788 21789 type applyProcessorDbIdxDoubleStore struct { 21790 handler Apply 21791 } 21792 21793 func (p *applyProcessorDbIdxDoubleStore) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21794 args := ApplyDbIdxDoubleStoreArgs{} 21795 var err2 error 21796 if err2 = args.Read(ctx, iprot); err2 != nil { 21797 iprot.ReadMessageEnd(ctx) 21798 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21799 oprot.WriteMessageBegin(ctx, "db_idx_double_store", thrift.EXCEPTION, seqId) 21800 x.Write(ctx, oprot) 21801 oprot.WriteMessageEnd(ctx) 21802 oprot.Flush(ctx) 21803 return false, thrift.WrapTException(err2) 21804 } 21805 iprot.ReadMessageEnd(ctx) 21806 21807 tickerCancel := func() {} 21808 // Start a goroutine to do server side connectivity check. 21809 if thrift.ServerConnectivityCheckInterval > 0 { 21810 var cancel context.CancelFunc 21811 ctx, cancel = context.WithCancel(ctx) 21812 defer cancel() 21813 var tickerCtx context.Context 21814 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21815 defer tickerCancel() 21816 go func(ctx context.Context, cancel context.CancelFunc) { 21817 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21818 defer ticker.Stop() 21819 for { 21820 select { 21821 case <-ctx.Done(): 21822 return 21823 case <-ticker.C: 21824 if !iprot.Transport().IsOpen() { 21825 cancel() 21826 return 21827 } 21828 } 21829 } 21830 }(tickerCtx, cancel) 21831 } 21832 21833 result := ApplyDbIdxDoubleStoreResult{} 21834 var retval int32 21835 if retval, err2 = p.handler.DbIdxDoubleStore(ctx, args.Scope, args.Table, args.Payer, args.ID, args.Secondary); err2 != nil { 21836 tickerCancel() 21837 if err2 == thrift.ErrAbandonRequest { 21838 return false, thrift.WrapTException(err2) 21839 } 21840 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_double_store: " + err2.Error()) 21841 oprot.WriteMessageBegin(ctx, "db_idx_double_store", thrift.EXCEPTION, seqId) 21842 x.Write(ctx, oprot) 21843 oprot.WriteMessageEnd(ctx) 21844 oprot.Flush(ctx) 21845 return true, thrift.WrapTException(err2) 21846 } else { 21847 result.Success = &retval 21848 } 21849 tickerCancel() 21850 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_double_store", thrift.REPLY, seqId); err2 != nil { 21851 err = thrift.WrapTException(err2) 21852 } 21853 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 21854 err = thrift.WrapTException(err2) 21855 } 21856 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 21857 err = thrift.WrapTException(err2) 21858 } 21859 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 21860 err = thrift.WrapTException(err2) 21861 } 21862 if err != nil { 21863 return 21864 } 21865 return true, err 21866 } 21867 21868 type applyProcessorDbIdxDoubleUpdate struct { 21869 handler Apply 21870 } 21871 21872 func (p *applyProcessorDbIdxDoubleUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21873 args := ApplyDbIdxDoubleUpdateArgs{} 21874 var err2 error 21875 if err2 = args.Read(ctx, iprot); err2 != nil { 21876 iprot.ReadMessageEnd(ctx) 21877 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21878 oprot.WriteMessageBegin(ctx, "db_idx_double_update", thrift.EXCEPTION, seqId) 21879 x.Write(ctx, oprot) 21880 oprot.WriteMessageEnd(ctx) 21881 oprot.Flush(ctx) 21882 return false, thrift.WrapTException(err2) 21883 } 21884 iprot.ReadMessageEnd(ctx) 21885 21886 tickerCancel := func() {} 21887 // Start a goroutine to do server side connectivity check. 21888 if thrift.ServerConnectivityCheckInterval > 0 { 21889 var cancel context.CancelFunc 21890 ctx, cancel = context.WithCancel(ctx) 21891 defer cancel() 21892 var tickerCtx context.Context 21893 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21894 defer tickerCancel() 21895 go func(ctx context.Context, cancel context.CancelFunc) { 21896 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21897 defer ticker.Stop() 21898 for { 21899 select { 21900 case <-ctx.Done(): 21901 return 21902 case <-ticker.C: 21903 if !iprot.Transport().IsOpen() { 21904 cancel() 21905 return 21906 } 21907 } 21908 } 21909 }(tickerCtx, cancel) 21910 } 21911 21912 result := ApplyDbIdxDoubleUpdateResult{} 21913 if err2 = p.handler.DbIdxDoubleUpdate(ctx, args.Iterator, args.Payer, args.Secondary); err2 != nil { 21914 tickerCancel() 21915 if err2 == thrift.ErrAbandonRequest { 21916 return false, thrift.WrapTException(err2) 21917 } 21918 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_double_update: " + err2.Error()) 21919 oprot.WriteMessageBegin(ctx, "db_idx_double_update", thrift.EXCEPTION, seqId) 21920 x.Write(ctx, oprot) 21921 oprot.WriteMessageEnd(ctx) 21922 oprot.Flush(ctx) 21923 return true, thrift.WrapTException(err2) 21924 } 21925 tickerCancel() 21926 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_double_update", thrift.REPLY, seqId); err2 != nil { 21927 err = thrift.WrapTException(err2) 21928 } 21929 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 21930 err = thrift.WrapTException(err2) 21931 } 21932 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 21933 err = thrift.WrapTException(err2) 21934 } 21935 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 21936 err = thrift.WrapTException(err2) 21937 } 21938 if err != nil { 21939 return 21940 } 21941 return true, err 21942 } 21943 21944 type applyProcessorDbIdxDoubleRemove struct { 21945 handler Apply 21946 } 21947 21948 func (p *applyProcessorDbIdxDoubleRemove) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 21949 args := ApplyDbIdxDoubleRemoveArgs{} 21950 var err2 error 21951 if err2 = args.Read(ctx, iprot); err2 != nil { 21952 iprot.ReadMessageEnd(ctx) 21953 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 21954 oprot.WriteMessageBegin(ctx, "db_idx_double_remove", thrift.EXCEPTION, seqId) 21955 x.Write(ctx, oprot) 21956 oprot.WriteMessageEnd(ctx) 21957 oprot.Flush(ctx) 21958 return false, thrift.WrapTException(err2) 21959 } 21960 iprot.ReadMessageEnd(ctx) 21961 21962 tickerCancel := func() {} 21963 // Start a goroutine to do server side connectivity check. 21964 if thrift.ServerConnectivityCheckInterval > 0 { 21965 var cancel context.CancelFunc 21966 ctx, cancel = context.WithCancel(ctx) 21967 defer cancel() 21968 var tickerCtx context.Context 21969 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 21970 defer tickerCancel() 21971 go func(ctx context.Context, cancel context.CancelFunc) { 21972 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 21973 defer ticker.Stop() 21974 for { 21975 select { 21976 case <-ctx.Done(): 21977 return 21978 case <-ticker.C: 21979 if !iprot.Transport().IsOpen() { 21980 cancel() 21981 return 21982 } 21983 } 21984 } 21985 }(tickerCtx, cancel) 21986 } 21987 21988 result := ApplyDbIdxDoubleRemoveResult{} 21989 if err2 = p.handler.DbIdxDoubleRemove(ctx, args.Iterator); err2 != nil { 21990 tickerCancel() 21991 if err2 == thrift.ErrAbandonRequest { 21992 return false, thrift.WrapTException(err2) 21993 } 21994 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_double_remove: " + err2.Error()) 21995 oprot.WriteMessageBegin(ctx, "db_idx_double_remove", thrift.EXCEPTION, seqId) 21996 x.Write(ctx, oprot) 21997 oprot.WriteMessageEnd(ctx) 21998 oprot.Flush(ctx) 21999 return true, thrift.WrapTException(err2) 22000 } 22001 tickerCancel() 22002 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_double_remove", thrift.REPLY, seqId); err2 != nil { 22003 err = thrift.WrapTException(err2) 22004 } 22005 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22006 err = thrift.WrapTException(err2) 22007 } 22008 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22009 err = thrift.WrapTException(err2) 22010 } 22011 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22012 err = thrift.WrapTException(err2) 22013 } 22014 if err != nil { 22015 return 22016 } 22017 return true, err 22018 } 22019 22020 type applyProcessorDbIdxDoubleNext struct { 22021 handler Apply 22022 } 22023 22024 func (p *applyProcessorDbIdxDoubleNext) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22025 args := ApplyDbIdxDoubleNextArgs{} 22026 var err2 error 22027 if err2 = args.Read(ctx, iprot); err2 != nil { 22028 iprot.ReadMessageEnd(ctx) 22029 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22030 oprot.WriteMessageBegin(ctx, "db_idx_double_next", thrift.EXCEPTION, seqId) 22031 x.Write(ctx, oprot) 22032 oprot.WriteMessageEnd(ctx) 22033 oprot.Flush(ctx) 22034 return false, thrift.WrapTException(err2) 22035 } 22036 iprot.ReadMessageEnd(ctx) 22037 22038 tickerCancel := func() {} 22039 // Start a goroutine to do server side connectivity check. 22040 if thrift.ServerConnectivityCheckInterval > 0 { 22041 var cancel context.CancelFunc 22042 ctx, cancel = context.WithCancel(ctx) 22043 defer cancel() 22044 var tickerCtx context.Context 22045 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22046 defer tickerCancel() 22047 go func(ctx context.Context, cancel context.CancelFunc) { 22048 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22049 defer ticker.Stop() 22050 for { 22051 select { 22052 case <-ctx.Done(): 22053 return 22054 case <-ticker.C: 22055 if !iprot.Transport().IsOpen() { 22056 cancel() 22057 return 22058 } 22059 } 22060 } 22061 }(tickerCtx, cancel) 22062 } 22063 22064 result := ApplyDbIdxDoubleNextResult{} 22065 var retval *NextPreviousReturn 22066 if retval, err2 = p.handler.DbIdxDoubleNext(ctx, args.Iterator); err2 != nil { 22067 tickerCancel() 22068 if err2 == thrift.ErrAbandonRequest { 22069 return false, thrift.WrapTException(err2) 22070 } 22071 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_double_next: " + err2.Error()) 22072 oprot.WriteMessageBegin(ctx, "db_idx_double_next", thrift.EXCEPTION, seqId) 22073 x.Write(ctx, oprot) 22074 oprot.WriteMessageEnd(ctx) 22075 oprot.Flush(ctx) 22076 return true, thrift.WrapTException(err2) 22077 } else { 22078 result.Success = retval 22079 } 22080 tickerCancel() 22081 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_double_next", thrift.REPLY, seqId); err2 != nil { 22082 err = thrift.WrapTException(err2) 22083 } 22084 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22085 err = thrift.WrapTException(err2) 22086 } 22087 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22088 err = thrift.WrapTException(err2) 22089 } 22090 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22091 err = thrift.WrapTException(err2) 22092 } 22093 if err != nil { 22094 return 22095 } 22096 return true, err 22097 } 22098 22099 type applyProcessorDbIdxDoublePrevious struct { 22100 handler Apply 22101 } 22102 22103 func (p *applyProcessorDbIdxDoublePrevious) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22104 args := ApplyDbIdxDoublePreviousArgs{} 22105 var err2 error 22106 if err2 = args.Read(ctx, iprot); err2 != nil { 22107 iprot.ReadMessageEnd(ctx) 22108 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22109 oprot.WriteMessageBegin(ctx, "db_idx_double_previous", thrift.EXCEPTION, seqId) 22110 x.Write(ctx, oprot) 22111 oprot.WriteMessageEnd(ctx) 22112 oprot.Flush(ctx) 22113 return false, thrift.WrapTException(err2) 22114 } 22115 iprot.ReadMessageEnd(ctx) 22116 22117 tickerCancel := func() {} 22118 // Start a goroutine to do server side connectivity check. 22119 if thrift.ServerConnectivityCheckInterval > 0 { 22120 var cancel context.CancelFunc 22121 ctx, cancel = context.WithCancel(ctx) 22122 defer cancel() 22123 var tickerCtx context.Context 22124 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22125 defer tickerCancel() 22126 go func(ctx context.Context, cancel context.CancelFunc) { 22127 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22128 defer ticker.Stop() 22129 for { 22130 select { 22131 case <-ctx.Done(): 22132 return 22133 case <-ticker.C: 22134 if !iprot.Transport().IsOpen() { 22135 cancel() 22136 return 22137 } 22138 } 22139 } 22140 }(tickerCtx, cancel) 22141 } 22142 22143 result := ApplyDbIdxDoublePreviousResult{} 22144 var retval *NextPreviousReturn 22145 if retval, err2 = p.handler.DbIdxDoublePrevious(ctx, args.Iterator); err2 != nil { 22146 tickerCancel() 22147 if err2 == thrift.ErrAbandonRequest { 22148 return false, thrift.WrapTException(err2) 22149 } 22150 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_double_previous: " + err2.Error()) 22151 oprot.WriteMessageBegin(ctx, "db_idx_double_previous", thrift.EXCEPTION, seqId) 22152 x.Write(ctx, oprot) 22153 oprot.WriteMessageEnd(ctx) 22154 oprot.Flush(ctx) 22155 return true, thrift.WrapTException(err2) 22156 } else { 22157 result.Success = retval 22158 } 22159 tickerCancel() 22160 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_double_previous", thrift.REPLY, seqId); err2 != nil { 22161 err = thrift.WrapTException(err2) 22162 } 22163 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22164 err = thrift.WrapTException(err2) 22165 } 22166 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22167 err = thrift.WrapTException(err2) 22168 } 22169 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22170 err = thrift.WrapTException(err2) 22171 } 22172 if err != nil { 22173 return 22174 } 22175 return true, err 22176 } 22177 22178 type applyProcessorDbIdxDoubleFindPrimary struct { 22179 handler Apply 22180 } 22181 22182 func (p *applyProcessorDbIdxDoubleFindPrimary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22183 args := ApplyDbIdxDoubleFindPrimaryArgs{} 22184 var err2 error 22185 if err2 = args.Read(ctx, iprot); err2 != nil { 22186 iprot.ReadMessageEnd(ctx) 22187 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22188 oprot.WriteMessageBegin(ctx, "db_idx_double_find_primary", thrift.EXCEPTION, seqId) 22189 x.Write(ctx, oprot) 22190 oprot.WriteMessageEnd(ctx) 22191 oprot.Flush(ctx) 22192 return false, thrift.WrapTException(err2) 22193 } 22194 iprot.ReadMessageEnd(ctx) 22195 22196 tickerCancel := func() {} 22197 // Start a goroutine to do server side connectivity check. 22198 if thrift.ServerConnectivityCheckInterval > 0 { 22199 var cancel context.CancelFunc 22200 ctx, cancel = context.WithCancel(ctx) 22201 defer cancel() 22202 var tickerCtx context.Context 22203 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22204 defer tickerCancel() 22205 go func(ctx context.Context, cancel context.CancelFunc) { 22206 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22207 defer ticker.Stop() 22208 for { 22209 select { 22210 case <-ctx.Done(): 22211 return 22212 case <-ticker.C: 22213 if !iprot.Transport().IsOpen() { 22214 cancel() 22215 return 22216 } 22217 } 22218 } 22219 }(tickerCtx, cancel) 22220 } 22221 22222 result := ApplyDbIdxDoubleFindPrimaryResult{} 22223 var retval *FindPrimaryReturn 22224 if retval, err2 = p.handler.DbIdxDoubleFindPrimary(ctx, args.Code, args.Scope, args.Table, args.Primary); err2 != nil { 22225 tickerCancel() 22226 if err2 == thrift.ErrAbandonRequest { 22227 return false, thrift.WrapTException(err2) 22228 } 22229 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_double_find_primary: " + err2.Error()) 22230 oprot.WriteMessageBegin(ctx, "db_idx_double_find_primary", thrift.EXCEPTION, seqId) 22231 x.Write(ctx, oprot) 22232 oprot.WriteMessageEnd(ctx) 22233 oprot.Flush(ctx) 22234 return true, thrift.WrapTException(err2) 22235 } else { 22236 result.Success = retval 22237 } 22238 tickerCancel() 22239 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_double_find_primary", thrift.REPLY, seqId); err2 != nil { 22240 err = thrift.WrapTException(err2) 22241 } 22242 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22243 err = thrift.WrapTException(err2) 22244 } 22245 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22246 err = thrift.WrapTException(err2) 22247 } 22248 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22249 err = thrift.WrapTException(err2) 22250 } 22251 if err != nil { 22252 return 22253 } 22254 return true, err 22255 } 22256 22257 type applyProcessorDbIdxDoubleFindSecondary struct { 22258 handler Apply 22259 } 22260 22261 func (p *applyProcessorDbIdxDoubleFindSecondary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22262 args := ApplyDbIdxDoubleFindSecondaryArgs{} 22263 var err2 error 22264 if err2 = args.Read(ctx, iprot); err2 != nil { 22265 iprot.ReadMessageEnd(ctx) 22266 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22267 oprot.WriteMessageBegin(ctx, "db_idx_double_find_secondary", thrift.EXCEPTION, seqId) 22268 x.Write(ctx, oprot) 22269 oprot.WriteMessageEnd(ctx) 22270 oprot.Flush(ctx) 22271 return false, thrift.WrapTException(err2) 22272 } 22273 iprot.ReadMessageEnd(ctx) 22274 22275 tickerCancel := func() {} 22276 // Start a goroutine to do server side connectivity check. 22277 if thrift.ServerConnectivityCheckInterval > 0 { 22278 var cancel context.CancelFunc 22279 ctx, cancel = context.WithCancel(ctx) 22280 defer cancel() 22281 var tickerCtx context.Context 22282 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22283 defer tickerCancel() 22284 go func(ctx context.Context, cancel context.CancelFunc) { 22285 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22286 defer ticker.Stop() 22287 for { 22288 select { 22289 case <-ctx.Done(): 22290 return 22291 case <-ticker.C: 22292 if !iprot.Transport().IsOpen() { 22293 cancel() 22294 return 22295 } 22296 } 22297 } 22298 }(tickerCtx, cancel) 22299 } 22300 22301 result := ApplyDbIdxDoubleFindSecondaryResult{} 22302 var retval *FindSecondaryReturn 22303 if retval, err2 = p.handler.DbIdxDoubleFindSecondary(ctx, args.Code, args.Scope, args.Table, args.Secondary); err2 != nil { 22304 tickerCancel() 22305 if err2 == thrift.ErrAbandonRequest { 22306 return false, thrift.WrapTException(err2) 22307 } 22308 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_double_find_secondary: " + err2.Error()) 22309 oprot.WriteMessageBegin(ctx, "db_idx_double_find_secondary", thrift.EXCEPTION, seqId) 22310 x.Write(ctx, oprot) 22311 oprot.WriteMessageEnd(ctx) 22312 oprot.Flush(ctx) 22313 return true, thrift.WrapTException(err2) 22314 } else { 22315 result.Success = retval 22316 } 22317 tickerCancel() 22318 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_double_find_secondary", thrift.REPLY, seqId); err2 != nil { 22319 err = thrift.WrapTException(err2) 22320 } 22321 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22322 err = thrift.WrapTException(err2) 22323 } 22324 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22325 err = thrift.WrapTException(err2) 22326 } 22327 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22328 err = thrift.WrapTException(err2) 22329 } 22330 if err != nil { 22331 return 22332 } 22333 return true, err 22334 } 22335 22336 type applyProcessorDbIdxDoubleLowerbound struct { 22337 handler Apply 22338 } 22339 22340 func (p *applyProcessorDbIdxDoubleLowerbound) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22341 args := ApplyDbIdxDoubleLowerboundArgs{} 22342 var err2 error 22343 if err2 = args.Read(ctx, iprot); err2 != nil { 22344 iprot.ReadMessageEnd(ctx) 22345 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22346 oprot.WriteMessageBegin(ctx, "db_idx_double_lowerbound", thrift.EXCEPTION, seqId) 22347 x.Write(ctx, oprot) 22348 oprot.WriteMessageEnd(ctx) 22349 oprot.Flush(ctx) 22350 return false, thrift.WrapTException(err2) 22351 } 22352 iprot.ReadMessageEnd(ctx) 22353 22354 tickerCancel := func() {} 22355 // Start a goroutine to do server side connectivity check. 22356 if thrift.ServerConnectivityCheckInterval > 0 { 22357 var cancel context.CancelFunc 22358 ctx, cancel = context.WithCancel(ctx) 22359 defer cancel() 22360 var tickerCtx context.Context 22361 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22362 defer tickerCancel() 22363 go func(ctx context.Context, cancel context.CancelFunc) { 22364 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22365 defer ticker.Stop() 22366 for { 22367 select { 22368 case <-ctx.Done(): 22369 return 22370 case <-ticker.C: 22371 if !iprot.Transport().IsOpen() { 22372 cancel() 22373 return 22374 } 22375 } 22376 } 22377 }(tickerCtx, cancel) 22378 } 22379 22380 result := ApplyDbIdxDoubleLowerboundResult{} 22381 var retval *LowerBoundUpperBoundReturn 22382 if retval, err2 = p.handler.DbIdxDoubleLowerbound(ctx, args.Code, args.Scope, args.Table, args.Secondary, args.Primary); err2 != nil { 22383 tickerCancel() 22384 if err2 == thrift.ErrAbandonRequest { 22385 return false, thrift.WrapTException(err2) 22386 } 22387 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_double_lowerbound: " + err2.Error()) 22388 oprot.WriteMessageBegin(ctx, "db_idx_double_lowerbound", thrift.EXCEPTION, seqId) 22389 x.Write(ctx, oprot) 22390 oprot.WriteMessageEnd(ctx) 22391 oprot.Flush(ctx) 22392 return true, thrift.WrapTException(err2) 22393 } else { 22394 result.Success = retval 22395 } 22396 tickerCancel() 22397 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_double_lowerbound", thrift.REPLY, seqId); err2 != nil { 22398 err = thrift.WrapTException(err2) 22399 } 22400 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22401 err = thrift.WrapTException(err2) 22402 } 22403 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22404 err = thrift.WrapTException(err2) 22405 } 22406 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22407 err = thrift.WrapTException(err2) 22408 } 22409 if err != nil { 22410 return 22411 } 22412 return true, err 22413 } 22414 22415 type applyProcessorDbIdxDoubleUpperbound struct { 22416 handler Apply 22417 } 22418 22419 func (p *applyProcessorDbIdxDoubleUpperbound) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22420 args := ApplyDbIdxDoubleUpperboundArgs{} 22421 var err2 error 22422 if err2 = args.Read(ctx, iprot); err2 != nil { 22423 iprot.ReadMessageEnd(ctx) 22424 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22425 oprot.WriteMessageBegin(ctx, "db_idx_double_upperbound", thrift.EXCEPTION, seqId) 22426 x.Write(ctx, oprot) 22427 oprot.WriteMessageEnd(ctx) 22428 oprot.Flush(ctx) 22429 return false, thrift.WrapTException(err2) 22430 } 22431 iprot.ReadMessageEnd(ctx) 22432 22433 tickerCancel := func() {} 22434 // Start a goroutine to do server side connectivity check. 22435 if thrift.ServerConnectivityCheckInterval > 0 { 22436 var cancel context.CancelFunc 22437 ctx, cancel = context.WithCancel(ctx) 22438 defer cancel() 22439 var tickerCtx context.Context 22440 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22441 defer tickerCancel() 22442 go func(ctx context.Context, cancel context.CancelFunc) { 22443 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22444 defer ticker.Stop() 22445 for { 22446 select { 22447 case <-ctx.Done(): 22448 return 22449 case <-ticker.C: 22450 if !iprot.Transport().IsOpen() { 22451 cancel() 22452 return 22453 } 22454 } 22455 } 22456 }(tickerCtx, cancel) 22457 } 22458 22459 result := ApplyDbIdxDoubleUpperboundResult{} 22460 var retval *LowerBoundUpperBoundReturn 22461 if retval, err2 = p.handler.DbIdxDoubleUpperbound(ctx, args.Code, args.Scope, args.Table, args.Secondary, args.Primary); err2 != nil { 22462 tickerCancel() 22463 if err2 == thrift.ErrAbandonRequest { 22464 return false, thrift.WrapTException(err2) 22465 } 22466 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_double_upperbound: " + err2.Error()) 22467 oprot.WriteMessageBegin(ctx, "db_idx_double_upperbound", thrift.EXCEPTION, seqId) 22468 x.Write(ctx, oprot) 22469 oprot.WriteMessageEnd(ctx) 22470 oprot.Flush(ctx) 22471 return true, thrift.WrapTException(err2) 22472 } else { 22473 result.Success = retval 22474 } 22475 tickerCancel() 22476 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_double_upperbound", thrift.REPLY, seqId); err2 != nil { 22477 err = thrift.WrapTException(err2) 22478 } 22479 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22480 err = thrift.WrapTException(err2) 22481 } 22482 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22483 err = thrift.WrapTException(err2) 22484 } 22485 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22486 err = thrift.WrapTException(err2) 22487 } 22488 if err != nil { 22489 return 22490 } 22491 return true, err 22492 } 22493 22494 type applyProcessorDbIdxDoubleEnd struct { 22495 handler Apply 22496 } 22497 22498 func (p *applyProcessorDbIdxDoubleEnd) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22499 args := ApplyDbIdxDoubleEndArgs{} 22500 var err2 error 22501 if err2 = args.Read(ctx, iprot); err2 != nil { 22502 iprot.ReadMessageEnd(ctx) 22503 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22504 oprot.WriteMessageBegin(ctx, "db_idx_double_end", thrift.EXCEPTION, seqId) 22505 x.Write(ctx, oprot) 22506 oprot.WriteMessageEnd(ctx) 22507 oprot.Flush(ctx) 22508 return false, thrift.WrapTException(err2) 22509 } 22510 iprot.ReadMessageEnd(ctx) 22511 22512 tickerCancel := func() {} 22513 // Start a goroutine to do server side connectivity check. 22514 if thrift.ServerConnectivityCheckInterval > 0 { 22515 var cancel context.CancelFunc 22516 ctx, cancel = context.WithCancel(ctx) 22517 defer cancel() 22518 var tickerCtx context.Context 22519 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22520 defer tickerCancel() 22521 go func(ctx context.Context, cancel context.CancelFunc) { 22522 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22523 defer ticker.Stop() 22524 for { 22525 select { 22526 case <-ctx.Done(): 22527 return 22528 case <-ticker.C: 22529 if !iprot.Transport().IsOpen() { 22530 cancel() 22531 return 22532 } 22533 } 22534 } 22535 }(tickerCtx, cancel) 22536 } 22537 22538 result := ApplyDbIdxDoubleEndResult{} 22539 var retval int32 22540 if retval, err2 = p.handler.DbIdxDoubleEnd(ctx, args.Code, args.Scope, args.Table); err2 != nil { 22541 tickerCancel() 22542 if err2 == thrift.ErrAbandonRequest { 22543 return false, thrift.WrapTException(err2) 22544 } 22545 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_double_end: " + err2.Error()) 22546 oprot.WriteMessageBegin(ctx, "db_idx_double_end", thrift.EXCEPTION, seqId) 22547 x.Write(ctx, oprot) 22548 oprot.WriteMessageEnd(ctx) 22549 oprot.Flush(ctx) 22550 return true, thrift.WrapTException(err2) 22551 } else { 22552 result.Success = &retval 22553 } 22554 tickerCancel() 22555 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_double_end", thrift.REPLY, seqId); err2 != nil { 22556 err = thrift.WrapTException(err2) 22557 } 22558 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22559 err = thrift.WrapTException(err2) 22560 } 22561 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22562 err = thrift.WrapTException(err2) 22563 } 22564 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22565 err = thrift.WrapTException(err2) 22566 } 22567 if err != nil { 22568 return 22569 } 22570 return true, err 22571 } 22572 22573 type applyProcessorDbIdxLongDoubleStore struct { 22574 handler Apply 22575 } 22576 22577 func (p *applyProcessorDbIdxLongDoubleStore) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22578 args := ApplyDbIdxLongDoubleStoreArgs{} 22579 var err2 error 22580 if err2 = args.Read(ctx, iprot); err2 != nil { 22581 iprot.ReadMessageEnd(ctx) 22582 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22583 oprot.WriteMessageBegin(ctx, "db_idx_long_double_store", thrift.EXCEPTION, seqId) 22584 x.Write(ctx, oprot) 22585 oprot.WriteMessageEnd(ctx) 22586 oprot.Flush(ctx) 22587 return false, thrift.WrapTException(err2) 22588 } 22589 iprot.ReadMessageEnd(ctx) 22590 22591 tickerCancel := func() {} 22592 // Start a goroutine to do server side connectivity check. 22593 if thrift.ServerConnectivityCheckInterval > 0 { 22594 var cancel context.CancelFunc 22595 ctx, cancel = context.WithCancel(ctx) 22596 defer cancel() 22597 var tickerCtx context.Context 22598 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22599 defer tickerCancel() 22600 go func(ctx context.Context, cancel context.CancelFunc) { 22601 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22602 defer ticker.Stop() 22603 for { 22604 select { 22605 case <-ctx.Done(): 22606 return 22607 case <-ticker.C: 22608 if !iprot.Transport().IsOpen() { 22609 cancel() 22610 return 22611 } 22612 } 22613 } 22614 }(tickerCtx, cancel) 22615 } 22616 22617 result := ApplyDbIdxLongDoubleStoreResult{} 22618 var retval int32 22619 if retval, err2 = p.handler.DbIdxLongDoubleStore(ctx, args.Scope, args.Table, args.Payer, args.ID, args.Secondary); err2 != nil { 22620 tickerCancel() 22621 if err2 == thrift.ErrAbandonRequest { 22622 return false, thrift.WrapTException(err2) 22623 } 22624 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_long_double_store: " + err2.Error()) 22625 oprot.WriteMessageBegin(ctx, "db_idx_long_double_store", thrift.EXCEPTION, seqId) 22626 x.Write(ctx, oprot) 22627 oprot.WriteMessageEnd(ctx) 22628 oprot.Flush(ctx) 22629 return true, thrift.WrapTException(err2) 22630 } else { 22631 result.Success = &retval 22632 } 22633 tickerCancel() 22634 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_long_double_store", thrift.REPLY, seqId); err2 != nil { 22635 err = thrift.WrapTException(err2) 22636 } 22637 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22638 err = thrift.WrapTException(err2) 22639 } 22640 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22641 err = thrift.WrapTException(err2) 22642 } 22643 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22644 err = thrift.WrapTException(err2) 22645 } 22646 if err != nil { 22647 return 22648 } 22649 return true, err 22650 } 22651 22652 type applyProcessorDbIdxLongDoubleUpdate struct { 22653 handler Apply 22654 } 22655 22656 func (p *applyProcessorDbIdxLongDoubleUpdate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22657 args := ApplyDbIdxLongDoubleUpdateArgs{} 22658 var err2 error 22659 if err2 = args.Read(ctx, iprot); err2 != nil { 22660 iprot.ReadMessageEnd(ctx) 22661 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22662 oprot.WriteMessageBegin(ctx, "db_idx_long_double_update", thrift.EXCEPTION, seqId) 22663 x.Write(ctx, oprot) 22664 oprot.WriteMessageEnd(ctx) 22665 oprot.Flush(ctx) 22666 return false, thrift.WrapTException(err2) 22667 } 22668 iprot.ReadMessageEnd(ctx) 22669 22670 tickerCancel := func() {} 22671 // Start a goroutine to do server side connectivity check. 22672 if thrift.ServerConnectivityCheckInterval > 0 { 22673 var cancel context.CancelFunc 22674 ctx, cancel = context.WithCancel(ctx) 22675 defer cancel() 22676 var tickerCtx context.Context 22677 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22678 defer tickerCancel() 22679 go func(ctx context.Context, cancel context.CancelFunc) { 22680 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22681 defer ticker.Stop() 22682 for { 22683 select { 22684 case <-ctx.Done(): 22685 return 22686 case <-ticker.C: 22687 if !iprot.Transport().IsOpen() { 22688 cancel() 22689 return 22690 } 22691 } 22692 } 22693 }(tickerCtx, cancel) 22694 } 22695 22696 result := ApplyDbIdxLongDoubleUpdateResult{} 22697 if err2 = p.handler.DbIdxLongDoubleUpdate(ctx, args.Iterator, args.Payer, args.Secondary); err2 != nil { 22698 tickerCancel() 22699 if err2 == thrift.ErrAbandonRequest { 22700 return false, thrift.WrapTException(err2) 22701 } 22702 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_long_double_update: " + err2.Error()) 22703 oprot.WriteMessageBegin(ctx, "db_idx_long_double_update", thrift.EXCEPTION, seqId) 22704 x.Write(ctx, oprot) 22705 oprot.WriteMessageEnd(ctx) 22706 oprot.Flush(ctx) 22707 return true, thrift.WrapTException(err2) 22708 } 22709 tickerCancel() 22710 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_long_double_update", thrift.REPLY, seqId); err2 != nil { 22711 err = thrift.WrapTException(err2) 22712 } 22713 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22714 err = thrift.WrapTException(err2) 22715 } 22716 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22717 err = thrift.WrapTException(err2) 22718 } 22719 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22720 err = thrift.WrapTException(err2) 22721 } 22722 if err != nil { 22723 return 22724 } 22725 return true, err 22726 } 22727 22728 type applyProcessorDbIdxLongDoubleRemove struct { 22729 handler Apply 22730 } 22731 22732 func (p *applyProcessorDbIdxLongDoubleRemove) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22733 args := ApplyDbIdxLongDoubleRemoveArgs{} 22734 var err2 error 22735 if err2 = args.Read(ctx, iprot); err2 != nil { 22736 iprot.ReadMessageEnd(ctx) 22737 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22738 oprot.WriteMessageBegin(ctx, "db_idx_long_double_remove", thrift.EXCEPTION, seqId) 22739 x.Write(ctx, oprot) 22740 oprot.WriteMessageEnd(ctx) 22741 oprot.Flush(ctx) 22742 return false, thrift.WrapTException(err2) 22743 } 22744 iprot.ReadMessageEnd(ctx) 22745 22746 tickerCancel := func() {} 22747 // Start a goroutine to do server side connectivity check. 22748 if thrift.ServerConnectivityCheckInterval > 0 { 22749 var cancel context.CancelFunc 22750 ctx, cancel = context.WithCancel(ctx) 22751 defer cancel() 22752 var tickerCtx context.Context 22753 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22754 defer tickerCancel() 22755 go func(ctx context.Context, cancel context.CancelFunc) { 22756 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22757 defer ticker.Stop() 22758 for { 22759 select { 22760 case <-ctx.Done(): 22761 return 22762 case <-ticker.C: 22763 if !iprot.Transport().IsOpen() { 22764 cancel() 22765 return 22766 } 22767 } 22768 } 22769 }(tickerCtx, cancel) 22770 } 22771 22772 result := ApplyDbIdxLongDoubleRemoveResult{} 22773 if err2 = p.handler.DbIdxLongDoubleRemove(ctx, args.Iterator); err2 != nil { 22774 tickerCancel() 22775 if err2 == thrift.ErrAbandonRequest { 22776 return false, thrift.WrapTException(err2) 22777 } 22778 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_long_double_remove: " + err2.Error()) 22779 oprot.WriteMessageBegin(ctx, "db_idx_long_double_remove", thrift.EXCEPTION, seqId) 22780 x.Write(ctx, oprot) 22781 oprot.WriteMessageEnd(ctx) 22782 oprot.Flush(ctx) 22783 return true, thrift.WrapTException(err2) 22784 } 22785 tickerCancel() 22786 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_long_double_remove", thrift.REPLY, seqId); err2 != nil { 22787 err = thrift.WrapTException(err2) 22788 } 22789 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22790 err = thrift.WrapTException(err2) 22791 } 22792 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22793 err = thrift.WrapTException(err2) 22794 } 22795 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22796 err = thrift.WrapTException(err2) 22797 } 22798 if err != nil { 22799 return 22800 } 22801 return true, err 22802 } 22803 22804 type applyProcessorDbIdxLongDoubleNext struct { 22805 handler Apply 22806 } 22807 22808 func (p *applyProcessorDbIdxLongDoubleNext) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22809 args := ApplyDbIdxLongDoubleNextArgs{} 22810 var err2 error 22811 if err2 = args.Read(ctx, iprot); err2 != nil { 22812 iprot.ReadMessageEnd(ctx) 22813 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22814 oprot.WriteMessageBegin(ctx, "db_idx_long_double_next", thrift.EXCEPTION, seqId) 22815 x.Write(ctx, oprot) 22816 oprot.WriteMessageEnd(ctx) 22817 oprot.Flush(ctx) 22818 return false, thrift.WrapTException(err2) 22819 } 22820 iprot.ReadMessageEnd(ctx) 22821 22822 tickerCancel := func() {} 22823 // Start a goroutine to do server side connectivity check. 22824 if thrift.ServerConnectivityCheckInterval > 0 { 22825 var cancel context.CancelFunc 22826 ctx, cancel = context.WithCancel(ctx) 22827 defer cancel() 22828 var tickerCtx context.Context 22829 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22830 defer tickerCancel() 22831 go func(ctx context.Context, cancel context.CancelFunc) { 22832 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22833 defer ticker.Stop() 22834 for { 22835 select { 22836 case <-ctx.Done(): 22837 return 22838 case <-ticker.C: 22839 if !iprot.Transport().IsOpen() { 22840 cancel() 22841 return 22842 } 22843 } 22844 } 22845 }(tickerCtx, cancel) 22846 } 22847 22848 result := ApplyDbIdxLongDoubleNextResult{} 22849 var retval *NextPreviousReturn 22850 if retval, err2 = p.handler.DbIdxLongDoubleNext(ctx, args.Iterator); err2 != nil { 22851 tickerCancel() 22852 if err2 == thrift.ErrAbandonRequest { 22853 return false, thrift.WrapTException(err2) 22854 } 22855 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_long_double_next: " + err2.Error()) 22856 oprot.WriteMessageBegin(ctx, "db_idx_long_double_next", thrift.EXCEPTION, seqId) 22857 x.Write(ctx, oprot) 22858 oprot.WriteMessageEnd(ctx) 22859 oprot.Flush(ctx) 22860 return true, thrift.WrapTException(err2) 22861 } else { 22862 result.Success = retval 22863 } 22864 tickerCancel() 22865 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_long_double_next", thrift.REPLY, seqId); err2 != nil { 22866 err = thrift.WrapTException(err2) 22867 } 22868 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22869 err = thrift.WrapTException(err2) 22870 } 22871 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22872 err = thrift.WrapTException(err2) 22873 } 22874 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22875 err = thrift.WrapTException(err2) 22876 } 22877 if err != nil { 22878 return 22879 } 22880 return true, err 22881 } 22882 22883 type applyProcessorDbIdxLongDoublePrevious struct { 22884 handler Apply 22885 } 22886 22887 func (p *applyProcessorDbIdxLongDoublePrevious) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22888 args := ApplyDbIdxLongDoublePreviousArgs{} 22889 var err2 error 22890 if err2 = args.Read(ctx, iprot); err2 != nil { 22891 iprot.ReadMessageEnd(ctx) 22892 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22893 oprot.WriteMessageBegin(ctx, "db_idx_long_double_previous", thrift.EXCEPTION, seqId) 22894 x.Write(ctx, oprot) 22895 oprot.WriteMessageEnd(ctx) 22896 oprot.Flush(ctx) 22897 return false, thrift.WrapTException(err2) 22898 } 22899 iprot.ReadMessageEnd(ctx) 22900 22901 tickerCancel := func() {} 22902 // Start a goroutine to do server side connectivity check. 22903 if thrift.ServerConnectivityCheckInterval > 0 { 22904 var cancel context.CancelFunc 22905 ctx, cancel = context.WithCancel(ctx) 22906 defer cancel() 22907 var tickerCtx context.Context 22908 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22909 defer tickerCancel() 22910 go func(ctx context.Context, cancel context.CancelFunc) { 22911 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22912 defer ticker.Stop() 22913 for { 22914 select { 22915 case <-ctx.Done(): 22916 return 22917 case <-ticker.C: 22918 if !iprot.Transport().IsOpen() { 22919 cancel() 22920 return 22921 } 22922 } 22923 } 22924 }(tickerCtx, cancel) 22925 } 22926 22927 result := ApplyDbIdxLongDoublePreviousResult{} 22928 var retval *NextPreviousReturn 22929 if retval, err2 = p.handler.DbIdxLongDoublePrevious(ctx, args.Iterator); err2 != nil { 22930 tickerCancel() 22931 if err2 == thrift.ErrAbandonRequest { 22932 return false, thrift.WrapTException(err2) 22933 } 22934 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_long_double_previous: " + err2.Error()) 22935 oprot.WriteMessageBegin(ctx, "db_idx_long_double_previous", thrift.EXCEPTION, seqId) 22936 x.Write(ctx, oprot) 22937 oprot.WriteMessageEnd(ctx) 22938 oprot.Flush(ctx) 22939 return true, thrift.WrapTException(err2) 22940 } else { 22941 result.Success = retval 22942 } 22943 tickerCancel() 22944 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_long_double_previous", thrift.REPLY, seqId); err2 != nil { 22945 err = thrift.WrapTException(err2) 22946 } 22947 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 22948 err = thrift.WrapTException(err2) 22949 } 22950 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 22951 err = thrift.WrapTException(err2) 22952 } 22953 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 22954 err = thrift.WrapTException(err2) 22955 } 22956 if err != nil { 22957 return 22958 } 22959 return true, err 22960 } 22961 22962 type applyProcessorDbIdxLongDoubleFindPrimary struct { 22963 handler Apply 22964 } 22965 22966 func (p *applyProcessorDbIdxLongDoubleFindPrimary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 22967 args := ApplyDbIdxLongDoubleFindPrimaryArgs{} 22968 var err2 error 22969 if err2 = args.Read(ctx, iprot); err2 != nil { 22970 iprot.ReadMessageEnd(ctx) 22971 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 22972 oprot.WriteMessageBegin(ctx, "db_idx_long_double_find_primary", thrift.EXCEPTION, seqId) 22973 x.Write(ctx, oprot) 22974 oprot.WriteMessageEnd(ctx) 22975 oprot.Flush(ctx) 22976 return false, thrift.WrapTException(err2) 22977 } 22978 iprot.ReadMessageEnd(ctx) 22979 22980 tickerCancel := func() {} 22981 // Start a goroutine to do server side connectivity check. 22982 if thrift.ServerConnectivityCheckInterval > 0 { 22983 var cancel context.CancelFunc 22984 ctx, cancel = context.WithCancel(ctx) 22985 defer cancel() 22986 var tickerCtx context.Context 22987 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 22988 defer tickerCancel() 22989 go func(ctx context.Context, cancel context.CancelFunc) { 22990 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 22991 defer ticker.Stop() 22992 for { 22993 select { 22994 case <-ctx.Done(): 22995 return 22996 case <-ticker.C: 22997 if !iprot.Transport().IsOpen() { 22998 cancel() 22999 return 23000 } 23001 } 23002 } 23003 }(tickerCtx, cancel) 23004 } 23005 23006 result := ApplyDbIdxLongDoubleFindPrimaryResult{} 23007 var retval *FindPrimaryReturn 23008 if retval, err2 = p.handler.DbIdxLongDoubleFindPrimary(ctx, args.Code, args.Scope, args.Table, args.Primary); err2 != nil { 23009 tickerCancel() 23010 if err2 == thrift.ErrAbandonRequest { 23011 return false, thrift.WrapTException(err2) 23012 } 23013 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_long_double_find_primary: " + err2.Error()) 23014 oprot.WriteMessageBegin(ctx, "db_idx_long_double_find_primary", thrift.EXCEPTION, seqId) 23015 x.Write(ctx, oprot) 23016 oprot.WriteMessageEnd(ctx) 23017 oprot.Flush(ctx) 23018 return true, thrift.WrapTException(err2) 23019 } else { 23020 result.Success = retval 23021 } 23022 tickerCancel() 23023 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_long_double_find_primary", thrift.REPLY, seqId); err2 != nil { 23024 err = thrift.WrapTException(err2) 23025 } 23026 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23027 err = thrift.WrapTException(err2) 23028 } 23029 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23030 err = thrift.WrapTException(err2) 23031 } 23032 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23033 err = thrift.WrapTException(err2) 23034 } 23035 if err != nil { 23036 return 23037 } 23038 return true, err 23039 } 23040 23041 type applyProcessorDbIdxLongDoubleFindSecondary struct { 23042 handler Apply 23043 } 23044 23045 func (p *applyProcessorDbIdxLongDoubleFindSecondary) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23046 args := ApplyDbIdxLongDoubleFindSecondaryArgs{} 23047 var err2 error 23048 if err2 = args.Read(ctx, iprot); err2 != nil { 23049 iprot.ReadMessageEnd(ctx) 23050 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23051 oprot.WriteMessageBegin(ctx, "db_idx_long_double_find_secondary", thrift.EXCEPTION, seqId) 23052 x.Write(ctx, oprot) 23053 oprot.WriteMessageEnd(ctx) 23054 oprot.Flush(ctx) 23055 return false, thrift.WrapTException(err2) 23056 } 23057 iprot.ReadMessageEnd(ctx) 23058 23059 tickerCancel := func() {} 23060 // Start a goroutine to do server side connectivity check. 23061 if thrift.ServerConnectivityCheckInterval > 0 { 23062 var cancel context.CancelFunc 23063 ctx, cancel = context.WithCancel(ctx) 23064 defer cancel() 23065 var tickerCtx context.Context 23066 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 23067 defer tickerCancel() 23068 go func(ctx context.Context, cancel context.CancelFunc) { 23069 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 23070 defer ticker.Stop() 23071 for { 23072 select { 23073 case <-ctx.Done(): 23074 return 23075 case <-ticker.C: 23076 if !iprot.Transport().IsOpen() { 23077 cancel() 23078 return 23079 } 23080 } 23081 } 23082 }(tickerCtx, cancel) 23083 } 23084 23085 result := ApplyDbIdxLongDoubleFindSecondaryResult{} 23086 var retval *FindSecondaryReturn 23087 if retval, err2 = p.handler.DbIdxLongDoubleFindSecondary(ctx, args.Code, args.Scope, args.Table, args.Secondary); err2 != nil { 23088 tickerCancel() 23089 if err2 == thrift.ErrAbandonRequest { 23090 return false, thrift.WrapTException(err2) 23091 } 23092 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_long_double_find_secondary: " + err2.Error()) 23093 oprot.WriteMessageBegin(ctx, "db_idx_long_double_find_secondary", thrift.EXCEPTION, seqId) 23094 x.Write(ctx, oprot) 23095 oprot.WriteMessageEnd(ctx) 23096 oprot.Flush(ctx) 23097 return true, thrift.WrapTException(err2) 23098 } else { 23099 result.Success = retval 23100 } 23101 tickerCancel() 23102 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_long_double_find_secondary", thrift.REPLY, seqId); err2 != nil { 23103 err = thrift.WrapTException(err2) 23104 } 23105 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23106 err = thrift.WrapTException(err2) 23107 } 23108 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23109 err = thrift.WrapTException(err2) 23110 } 23111 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23112 err = thrift.WrapTException(err2) 23113 } 23114 if err != nil { 23115 return 23116 } 23117 return true, err 23118 } 23119 23120 type applyProcessorDbIdxLongDoubleLowerbound struct { 23121 handler Apply 23122 } 23123 23124 func (p *applyProcessorDbIdxLongDoubleLowerbound) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23125 args := ApplyDbIdxLongDoubleLowerboundArgs{} 23126 var err2 error 23127 if err2 = args.Read(ctx, iprot); err2 != nil { 23128 iprot.ReadMessageEnd(ctx) 23129 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23130 oprot.WriteMessageBegin(ctx, "db_idx_long_double_lowerbound", thrift.EXCEPTION, seqId) 23131 x.Write(ctx, oprot) 23132 oprot.WriteMessageEnd(ctx) 23133 oprot.Flush(ctx) 23134 return false, thrift.WrapTException(err2) 23135 } 23136 iprot.ReadMessageEnd(ctx) 23137 23138 tickerCancel := func() {} 23139 // Start a goroutine to do server side connectivity check. 23140 if thrift.ServerConnectivityCheckInterval > 0 { 23141 var cancel context.CancelFunc 23142 ctx, cancel = context.WithCancel(ctx) 23143 defer cancel() 23144 var tickerCtx context.Context 23145 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 23146 defer tickerCancel() 23147 go func(ctx context.Context, cancel context.CancelFunc) { 23148 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 23149 defer ticker.Stop() 23150 for { 23151 select { 23152 case <-ctx.Done(): 23153 return 23154 case <-ticker.C: 23155 if !iprot.Transport().IsOpen() { 23156 cancel() 23157 return 23158 } 23159 } 23160 } 23161 }(tickerCtx, cancel) 23162 } 23163 23164 result := ApplyDbIdxLongDoubleLowerboundResult{} 23165 var retval *LowerBoundUpperBoundReturn 23166 if retval, err2 = p.handler.DbIdxLongDoubleLowerbound(ctx, args.Code, args.Scope, args.Table, args.Secondary, args.Primary); err2 != nil { 23167 tickerCancel() 23168 if err2 == thrift.ErrAbandonRequest { 23169 return false, thrift.WrapTException(err2) 23170 } 23171 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_long_double_lowerbound: " + err2.Error()) 23172 oprot.WriteMessageBegin(ctx, "db_idx_long_double_lowerbound", thrift.EXCEPTION, seqId) 23173 x.Write(ctx, oprot) 23174 oprot.WriteMessageEnd(ctx) 23175 oprot.Flush(ctx) 23176 return true, thrift.WrapTException(err2) 23177 } else { 23178 result.Success = retval 23179 } 23180 tickerCancel() 23181 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_long_double_lowerbound", thrift.REPLY, seqId); err2 != nil { 23182 err = thrift.WrapTException(err2) 23183 } 23184 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23185 err = thrift.WrapTException(err2) 23186 } 23187 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23188 err = thrift.WrapTException(err2) 23189 } 23190 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23191 err = thrift.WrapTException(err2) 23192 } 23193 if err != nil { 23194 return 23195 } 23196 return true, err 23197 } 23198 23199 type applyProcessorDbIdxLongDoubleUpperbound struct { 23200 handler Apply 23201 } 23202 23203 func (p *applyProcessorDbIdxLongDoubleUpperbound) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23204 args := ApplyDbIdxLongDoubleUpperboundArgs{} 23205 var err2 error 23206 if err2 = args.Read(ctx, iprot); err2 != nil { 23207 iprot.ReadMessageEnd(ctx) 23208 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23209 oprot.WriteMessageBegin(ctx, "db_idx_long_double_upperbound", thrift.EXCEPTION, seqId) 23210 x.Write(ctx, oprot) 23211 oprot.WriteMessageEnd(ctx) 23212 oprot.Flush(ctx) 23213 return false, thrift.WrapTException(err2) 23214 } 23215 iprot.ReadMessageEnd(ctx) 23216 23217 tickerCancel := func() {} 23218 // Start a goroutine to do server side connectivity check. 23219 if thrift.ServerConnectivityCheckInterval > 0 { 23220 var cancel context.CancelFunc 23221 ctx, cancel = context.WithCancel(ctx) 23222 defer cancel() 23223 var tickerCtx context.Context 23224 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 23225 defer tickerCancel() 23226 go func(ctx context.Context, cancel context.CancelFunc) { 23227 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 23228 defer ticker.Stop() 23229 for { 23230 select { 23231 case <-ctx.Done(): 23232 return 23233 case <-ticker.C: 23234 if !iprot.Transport().IsOpen() { 23235 cancel() 23236 return 23237 } 23238 } 23239 } 23240 }(tickerCtx, cancel) 23241 } 23242 23243 result := ApplyDbIdxLongDoubleUpperboundResult{} 23244 var retval *LowerBoundUpperBoundReturn 23245 if retval, err2 = p.handler.DbIdxLongDoubleUpperbound(ctx, args.Code, args.Scope, args.Table, args.Secondary, args.Primary); err2 != nil { 23246 tickerCancel() 23247 if err2 == thrift.ErrAbandonRequest { 23248 return false, thrift.WrapTException(err2) 23249 } 23250 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_long_double_upperbound: " + err2.Error()) 23251 oprot.WriteMessageBegin(ctx, "db_idx_long_double_upperbound", thrift.EXCEPTION, seqId) 23252 x.Write(ctx, oprot) 23253 oprot.WriteMessageEnd(ctx) 23254 oprot.Flush(ctx) 23255 return true, thrift.WrapTException(err2) 23256 } else { 23257 result.Success = retval 23258 } 23259 tickerCancel() 23260 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_long_double_upperbound", thrift.REPLY, seqId); err2 != nil { 23261 err = thrift.WrapTException(err2) 23262 } 23263 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23264 err = thrift.WrapTException(err2) 23265 } 23266 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23267 err = thrift.WrapTException(err2) 23268 } 23269 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23270 err = thrift.WrapTException(err2) 23271 } 23272 if err != nil { 23273 return 23274 } 23275 return true, err 23276 } 23277 23278 type applyProcessorDbIdxLongDoubleEnd struct { 23279 handler Apply 23280 } 23281 23282 func (p *applyProcessorDbIdxLongDoubleEnd) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23283 args := ApplyDbIdxLongDoubleEndArgs{} 23284 var err2 error 23285 if err2 = args.Read(ctx, iprot); err2 != nil { 23286 iprot.ReadMessageEnd(ctx) 23287 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23288 oprot.WriteMessageBegin(ctx, "db_idx_long_double_end", thrift.EXCEPTION, seqId) 23289 x.Write(ctx, oprot) 23290 oprot.WriteMessageEnd(ctx) 23291 oprot.Flush(ctx) 23292 return false, thrift.WrapTException(err2) 23293 } 23294 iprot.ReadMessageEnd(ctx) 23295 23296 tickerCancel := func() {} 23297 // Start a goroutine to do server side connectivity check. 23298 if thrift.ServerConnectivityCheckInterval > 0 { 23299 var cancel context.CancelFunc 23300 ctx, cancel = context.WithCancel(ctx) 23301 defer cancel() 23302 var tickerCtx context.Context 23303 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 23304 defer tickerCancel() 23305 go func(ctx context.Context, cancel context.CancelFunc) { 23306 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 23307 defer ticker.Stop() 23308 for { 23309 select { 23310 case <-ctx.Done(): 23311 return 23312 case <-ticker.C: 23313 if !iprot.Transport().IsOpen() { 23314 cancel() 23315 return 23316 } 23317 } 23318 } 23319 }(tickerCtx, cancel) 23320 } 23321 23322 result := ApplyDbIdxLongDoubleEndResult{} 23323 var retval int32 23324 if retval, err2 = p.handler.DbIdxLongDoubleEnd(ctx, args.Code, args.Scope, args.Table); err2 != nil { 23325 tickerCancel() 23326 if err2 == thrift.ErrAbandonRequest { 23327 return false, thrift.WrapTException(err2) 23328 } 23329 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing db_idx_long_double_end: " + err2.Error()) 23330 oprot.WriteMessageBegin(ctx, "db_idx_long_double_end", thrift.EXCEPTION, seqId) 23331 x.Write(ctx, oprot) 23332 oprot.WriteMessageEnd(ctx) 23333 oprot.Flush(ctx) 23334 return true, thrift.WrapTException(err2) 23335 } else { 23336 result.Success = &retval 23337 } 23338 tickerCancel() 23339 if err2 = oprot.WriteMessageBegin(ctx, "db_idx_long_double_end", thrift.REPLY, seqId); err2 != nil { 23340 err = thrift.WrapTException(err2) 23341 } 23342 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23343 err = thrift.WrapTException(err2) 23344 } 23345 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23346 err = thrift.WrapTException(err2) 23347 } 23348 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23349 err = thrift.WrapTException(err2) 23350 } 23351 if err != nil { 23352 return 23353 } 23354 return true, err 23355 } 23356 23357 type applyProcessorSetActionReturnValue struct { 23358 handler Apply 23359 } 23360 23361 func (p *applyProcessorSetActionReturnValue) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23362 args := ApplySetActionReturnValueArgs{} 23363 var err2 error 23364 if err2 = args.Read(ctx, iprot); err2 != nil { 23365 iprot.ReadMessageEnd(ctx) 23366 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23367 oprot.WriteMessageBegin(ctx, "set_action_return_value", thrift.EXCEPTION, seqId) 23368 x.Write(ctx, oprot) 23369 oprot.WriteMessageEnd(ctx) 23370 oprot.Flush(ctx) 23371 return false, thrift.WrapTException(err2) 23372 } 23373 iprot.ReadMessageEnd(ctx) 23374 23375 tickerCancel := func() {} 23376 // Start a goroutine to do server side connectivity check. 23377 if thrift.ServerConnectivityCheckInterval > 0 { 23378 var cancel context.CancelFunc 23379 ctx, cancel = context.WithCancel(ctx) 23380 defer cancel() 23381 var tickerCtx context.Context 23382 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 23383 defer tickerCancel() 23384 go func(ctx context.Context, cancel context.CancelFunc) { 23385 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 23386 defer ticker.Stop() 23387 for { 23388 select { 23389 case <-ctx.Done(): 23390 return 23391 case <-ticker.C: 23392 if !iprot.Transport().IsOpen() { 23393 cancel() 23394 return 23395 } 23396 } 23397 } 23398 }(tickerCtx, cancel) 23399 } 23400 23401 result := ApplySetActionReturnValueResult{} 23402 if err2 = p.handler.SetActionReturnValue(ctx, args.Data); err2 != nil { 23403 tickerCancel() 23404 if err2 == thrift.ErrAbandonRequest { 23405 return false, thrift.WrapTException(err2) 23406 } 23407 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing set_action_return_value: " + err2.Error()) 23408 oprot.WriteMessageBegin(ctx, "set_action_return_value", thrift.EXCEPTION, seqId) 23409 x.Write(ctx, oprot) 23410 oprot.WriteMessageEnd(ctx) 23411 oprot.Flush(ctx) 23412 return true, thrift.WrapTException(err2) 23413 } 23414 tickerCancel() 23415 if err2 = oprot.WriteMessageBegin(ctx, "set_action_return_value", thrift.REPLY, seqId); err2 != nil { 23416 err = thrift.WrapTException(err2) 23417 } 23418 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23419 err = thrift.WrapTException(err2) 23420 } 23421 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23422 err = thrift.WrapTException(err2) 23423 } 23424 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23425 err = thrift.WrapTException(err2) 23426 } 23427 if err != nil { 23428 return 23429 } 23430 return true, err 23431 } 23432 23433 type applyProcessorGetCodeHash struct { 23434 handler Apply 23435 } 23436 23437 func (p *applyProcessorGetCodeHash) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23438 args := ApplyGetCodeHashArgs{} 23439 var err2 error 23440 if err2 = args.Read(ctx, iprot); err2 != nil { 23441 iprot.ReadMessageEnd(ctx) 23442 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23443 oprot.WriteMessageBegin(ctx, "get_code_hash", thrift.EXCEPTION, seqId) 23444 x.Write(ctx, oprot) 23445 oprot.WriteMessageEnd(ctx) 23446 oprot.Flush(ctx) 23447 return false, thrift.WrapTException(err2) 23448 } 23449 iprot.ReadMessageEnd(ctx) 23450 23451 tickerCancel := func() {} 23452 // Start a goroutine to do server side connectivity check. 23453 if thrift.ServerConnectivityCheckInterval > 0 { 23454 var cancel context.CancelFunc 23455 ctx, cancel = context.WithCancel(ctx) 23456 defer cancel() 23457 var tickerCtx context.Context 23458 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 23459 defer tickerCancel() 23460 go func(ctx context.Context, cancel context.CancelFunc) { 23461 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 23462 defer ticker.Stop() 23463 for { 23464 select { 23465 case <-ctx.Done(): 23466 return 23467 case <-ticker.C: 23468 if !iprot.Transport().IsOpen() { 23469 cancel() 23470 return 23471 } 23472 } 23473 } 23474 }(tickerCtx, cancel) 23475 } 23476 23477 result := ApplyGetCodeHashResult{} 23478 var retval []byte 23479 if retval, err2 = p.handler.GetCodeHash(ctx, args.Account, args.StructVersion); err2 != nil { 23480 tickerCancel() 23481 if err2 == thrift.ErrAbandonRequest { 23482 return false, thrift.WrapTException(err2) 23483 } 23484 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_code_hash: " + err2.Error()) 23485 oprot.WriteMessageBegin(ctx, "get_code_hash", thrift.EXCEPTION, seqId) 23486 x.Write(ctx, oprot) 23487 oprot.WriteMessageEnd(ctx) 23488 oprot.Flush(ctx) 23489 return true, thrift.WrapTException(err2) 23490 } else { 23491 result.Success = retval 23492 } 23493 tickerCancel() 23494 if err2 = oprot.WriteMessageBegin(ctx, "get_code_hash", thrift.REPLY, seqId); err2 != nil { 23495 err = thrift.WrapTException(err2) 23496 } 23497 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23498 err = thrift.WrapTException(err2) 23499 } 23500 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23501 err = thrift.WrapTException(err2) 23502 } 23503 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23504 err = thrift.WrapTException(err2) 23505 } 23506 if err != nil { 23507 return 23508 } 23509 return true, err 23510 } 23511 23512 type applyProcessorGetBlockNum struct { 23513 handler Apply 23514 } 23515 23516 func (p *applyProcessorGetBlockNum) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23517 args := ApplyGetBlockNumArgs{} 23518 var err2 error 23519 if err2 = args.Read(ctx, iprot); err2 != nil { 23520 iprot.ReadMessageEnd(ctx) 23521 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23522 oprot.WriteMessageBegin(ctx, "get_block_num", thrift.EXCEPTION, seqId) 23523 x.Write(ctx, oprot) 23524 oprot.WriteMessageEnd(ctx) 23525 oprot.Flush(ctx) 23526 return false, thrift.WrapTException(err2) 23527 } 23528 iprot.ReadMessageEnd(ctx) 23529 23530 tickerCancel := func() {} 23531 // Start a goroutine to do server side connectivity check. 23532 if thrift.ServerConnectivityCheckInterval > 0 { 23533 var cancel context.CancelFunc 23534 ctx, cancel = context.WithCancel(ctx) 23535 defer cancel() 23536 var tickerCtx context.Context 23537 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 23538 defer tickerCancel() 23539 go func(ctx context.Context, cancel context.CancelFunc) { 23540 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 23541 defer ticker.Stop() 23542 for { 23543 select { 23544 case <-ctx.Done(): 23545 return 23546 case <-ticker.C: 23547 if !iprot.Transport().IsOpen() { 23548 cancel() 23549 return 23550 } 23551 } 23552 } 23553 }(tickerCtx, cancel) 23554 } 23555 23556 result := ApplyGetBlockNumResult{} 23557 var retval int64 23558 if retval, err2 = p.handler.GetBlockNum(ctx); err2 != nil { 23559 tickerCancel() 23560 if err2 == thrift.ErrAbandonRequest { 23561 return false, thrift.WrapTException(err2) 23562 } 23563 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get_block_num: " + err2.Error()) 23564 oprot.WriteMessageBegin(ctx, "get_block_num", thrift.EXCEPTION, seqId) 23565 x.Write(ctx, oprot) 23566 oprot.WriteMessageEnd(ctx) 23567 oprot.Flush(ctx) 23568 return true, thrift.WrapTException(err2) 23569 } else { 23570 result.Success = &retval 23571 } 23572 tickerCancel() 23573 if err2 = oprot.WriteMessageBegin(ctx, "get_block_num", thrift.REPLY, seqId); err2 != nil { 23574 err = thrift.WrapTException(err2) 23575 } 23576 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23577 err = thrift.WrapTException(err2) 23578 } 23579 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23580 err = thrift.WrapTException(err2) 23581 } 23582 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23583 err = thrift.WrapTException(err2) 23584 } 23585 if err != nil { 23586 return 23587 } 23588 return true, err 23589 } 23590 23591 type applyProcessorSha3 struct { 23592 handler Apply 23593 } 23594 23595 func (p *applyProcessorSha3) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23596 args := ApplySha3Args{} 23597 var err2 error 23598 if err2 = args.Read(ctx, iprot); err2 != nil { 23599 iprot.ReadMessageEnd(ctx) 23600 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23601 oprot.WriteMessageBegin(ctx, "sha3", thrift.EXCEPTION, seqId) 23602 x.Write(ctx, oprot) 23603 oprot.WriteMessageEnd(ctx) 23604 oprot.Flush(ctx) 23605 return false, thrift.WrapTException(err2) 23606 } 23607 iprot.ReadMessageEnd(ctx) 23608 23609 tickerCancel := func() {} 23610 // Start a goroutine to do server side connectivity check. 23611 if thrift.ServerConnectivityCheckInterval > 0 { 23612 var cancel context.CancelFunc 23613 ctx, cancel = context.WithCancel(ctx) 23614 defer cancel() 23615 var tickerCtx context.Context 23616 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 23617 defer tickerCancel() 23618 go func(ctx context.Context, cancel context.CancelFunc) { 23619 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 23620 defer ticker.Stop() 23621 for { 23622 select { 23623 case <-ctx.Done(): 23624 return 23625 case <-ticker.C: 23626 if !iprot.Transport().IsOpen() { 23627 cancel() 23628 return 23629 } 23630 } 23631 } 23632 }(tickerCtx, cancel) 23633 } 23634 23635 result := ApplySha3Result{} 23636 var retval []byte 23637 if retval, err2 = p.handler.Sha3(ctx, args.Data, args.Keccak); err2 != nil { 23638 tickerCancel() 23639 if err2 == thrift.ErrAbandonRequest { 23640 return false, thrift.WrapTException(err2) 23641 } 23642 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing sha3: " + err2.Error()) 23643 oprot.WriteMessageBegin(ctx, "sha3", thrift.EXCEPTION, seqId) 23644 x.Write(ctx, oprot) 23645 oprot.WriteMessageEnd(ctx) 23646 oprot.Flush(ctx) 23647 return true, thrift.WrapTException(err2) 23648 } else { 23649 result.Success = retval 23650 } 23651 tickerCancel() 23652 if err2 = oprot.WriteMessageBegin(ctx, "sha3", thrift.REPLY, seqId); err2 != nil { 23653 err = thrift.WrapTException(err2) 23654 } 23655 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23656 err = thrift.WrapTException(err2) 23657 } 23658 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23659 err = thrift.WrapTException(err2) 23660 } 23661 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23662 err = thrift.WrapTException(err2) 23663 } 23664 if err != nil { 23665 return 23666 } 23667 return true, err 23668 } 23669 23670 type applyProcessorBlake2F struct { 23671 handler Apply 23672 } 23673 23674 func (p *applyProcessorBlake2F) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23675 args := ApplyBlake2FArgs{} 23676 var err2 error 23677 if err2 = args.Read(ctx, iprot); err2 != nil { 23678 iprot.ReadMessageEnd(ctx) 23679 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23680 oprot.WriteMessageBegin(ctx, "blake2_f", thrift.EXCEPTION, seqId) 23681 x.Write(ctx, oprot) 23682 oprot.WriteMessageEnd(ctx) 23683 oprot.Flush(ctx) 23684 return false, thrift.WrapTException(err2) 23685 } 23686 iprot.ReadMessageEnd(ctx) 23687 23688 tickerCancel := func() {} 23689 // Start a goroutine to do server side connectivity check. 23690 if thrift.ServerConnectivityCheckInterval > 0 { 23691 var cancel context.CancelFunc 23692 ctx, cancel = context.WithCancel(ctx) 23693 defer cancel() 23694 var tickerCtx context.Context 23695 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 23696 defer tickerCancel() 23697 go func(ctx context.Context, cancel context.CancelFunc) { 23698 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 23699 defer ticker.Stop() 23700 for { 23701 select { 23702 case <-ctx.Done(): 23703 return 23704 case <-ticker.C: 23705 if !iprot.Transport().IsOpen() { 23706 cancel() 23707 return 23708 } 23709 } 23710 } 23711 }(tickerCtx, cancel) 23712 } 23713 23714 result := ApplyBlake2FResult{} 23715 var retval []byte 23716 if retval, err2 = p.handler.Blake2F(ctx, args.Rounds, args.State, args.Msg, args.T0Offset, args.T1Offset, args.Final); err2 != nil { 23717 tickerCancel() 23718 if err2 == thrift.ErrAbandonRequest { 23719 return false, thrift.WrapTException(err2) 23720 } 23721 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing blake2_f: " + err2.Error()) 23722 oprot.WriteMessageBegin(ctx, "blake2_f", thrift.EXCEPTION, seqId) 23723 x.Write(ctx, oprot) 23724 oprot.WriteMessageEnd(ctx) 23725 oprot.Flush(ctx) 23726 return true, thrift.WrapTException(err2) 23727 } else { 23728 result.Success = retval 23729 } 23730 tickerCancel() 23731 if err2 = oprot.WriteMessageBegin(ctx, "blake2_f", thrift.REPLY, seqId); err2 != nil { 23732 err = thrift.WrapTException(err2) 23733 } 23734 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23735 err = thrift.WrapTException(err2) 23736 } 23737 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23738 err = thrift.WrapTException(err2) 23739 } 23740 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23741 err = thrift.WrapTException(err2) 23742 } 23743 if err != nil { 23744 return 23745 } 23746 return true, err 23747 } 23748 23749 type applyProcessorK1Recover struct { 23750 handler Apply 23751 } 23752 23753 func (p *applyProcessorK1Recover) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23754 args := ApplyK1RecoverArgs{} 23755 var err2 error 23756 if err2 = args.Read(ctx, iprot); err2 != nil { 23757 iprot.ReadMessageEnd(ctx) 23758 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23759 oprot.WriteMessageBegin(ctx, "k1_recover", thrift.EXCEPTION, seqId) 23760 x.Write(ctx, oprot) 23761 oprot.WriteMessageEnd(ctx) 23762 oprot.Flush(ctx) 23763 return false, thrift.WrapTException(err2) 23764 } 23765 iprot.ReadMessageEnd(ctx) 23766 23767 tickerCancel := func() {} 23768 // Start a goroutine to do server side connectivity check. 23769 if thrift.ServerConnectivityCheckInterval > 0 { 23770 var cancel context.CancelFunc 23771 ctx, cancel = context.WithCancel(ctx) 23772 defer cancel() 23773 var tickerCtx context.Context 23774 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 23775 defer tickerCancel() 23776 go func(ctx context.Context, cancel context.CancelFunc) { 23777 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 23778 defer ticker.Stop() 23779 for { 23780 select { 23781 case <-ctx.Done(): 23782 return 23783 case <-ticker.C: 23784 if !iprot.Transport().IsOpen() { 23785 cancel() 23786 return 23787 } 23788 } 23789 } 23790 }(tickerCtx, cancel) 23791 } 23792 23793 result := ApplyK1RecoverResult{} 23794 var retval []byte 23795 if retval, err2 = p.handler.K1Recover(ctx, args.Sig, args.Dig); err2 != nil { 23796 tickerCancel() 23797 if err2 == thrift.ErrAbandonRequest { 23798 return false, thrift.WrapTException(err2) 23799 } 23800 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing k1_recover: " + err2.Error()) 23801 oprot.WriteMessageBegin(ctx, "k1_recover", thrift.EXCEPTION, seqId) 23802 x.Write(ctx, oprot) 23803 oprot.WriteMessageEnd(ctx) 23804 oprot.Flush(ctx) 23805 return true, thrift.WrapTException(err2) 23806 } else { 23807 result.Success = retval 23808 } 23809 tickerCancel() 23810 if err2 = oprot.WriteMessageBegin(ctx, "k1_recover", thrift.REPLY, seqId); err2 != nil { 23811 err = thrift.WrapTException(err2) 23812 } 23813 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23814 err = thrift.WrapTException(err2) 23815 } 23816 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23817 err = thrift.WrapTException(err2) 23818 } 23819 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23820 err = thrift.WrapTException(err2) 23821 } 23822 if err != nil { 23823 return 23824 } 23825 return true, err 23826 } 23827 23828 type applyProcessorAltBn128Add struct { 23829 handler Apply 23830 } 23831 23832 func (p *applyProcessorAltBn128Add) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23833 args := ApplyAltBn128AddArgs{} 23834 var err2 error 23835 if err2 = args.Read(ctx, iprot); err2 != nil { 23836 iprot.ReadMessageEnd(ctx) 23837 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23838 oprot.WriteMessageBegin(ctx, "alt_bn128_add", thrift.EXCEPTION, seqId) 23839 x.Write(ctx, oprot) 23840 oprot.WriteMessageEnd(ctx) 23841 oprot.Flush(ctx) 23842 return false, thrift.WrapTException(err2) 23843 } 23844 iprot.ReadMessageEnd(ctx) 23845 23846 tickerCancel := func() {} 23847 // Start a goroutine to do server side connectivity check. 23848 if thrift.ServerConnectivityCheckInterval > 0 { 23849 var cancel context.CancelFunc 23850 ctx, cancel = context.WithCancel(ctx) 23851 defer cancel() 23852 var tickerCtx context.Context 23853 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 23854 defer tickerCancel() 23855 go func(ctx context.Context, cancel context.CancelFunc) { 23856 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 23857 defer ticker.Stop() 23858 for { 23859 select { 23860 case <-ctx.Done(): 23861 return 23862 case <-ticker.C: 23863 if !iprot.Transport().IsOpen() { 23864 cancel() 23865 return 23866 } 23867 } 23868 } 23869 }(tickerCtx, cancel) 23870 } 23871 23872 result := ApplyAltBn128AddResult{} 23873 var retval []byte 23874 if retval, err2 = p.handler.AltBn128Add(ctx, args.Op1, args.Op2); err2 != nil { 23875 tickerCancel() 23876 if err2 == thrift.ErrAbandonRequest { 23877 return false, thrift.WrapTException(err2) 23878 } 23879 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing alt_bn128_add: " + err2.Error()) 23880 oprot.WriteMessageBegin(ctx, "alt_bn128_add", thrift.EXCEPTION, seqId) 23881 x.Write(ctx, oprot) 23882 oprot.WriteMessageEnd(ctx) 23883 oprot.Flush(ctx) 23884 return true, thrift.WrapTException(err2) 23885 } else { 23886 result.Success = retval 23887 } 23888 tickerCancel() 23889 if err2 = oprot.WriteMessageBegin(ctx, "alt_bn128_add", thrift.REPLY, seqId); err2 != nil { 23890 err = thrift.WrapTException(err2) 23891 } 23892 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23893 err = thrift.WrapTException(err2) 23894 } 23895 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23896 err = thrift.WrapTException(err2) 23897 } 23898 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23899 err = thrift.WrapTException(err2) 23900 } 23901 if err != nil { 23902 return 23903 } 23904 return true, err 23905 } 23906 23907 type applyProcessorAltBn128Mul struct { 23908 handler Apply 23909 } 23910 23911 func (p *applyProcessorAltBn128Mul) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23912 args := ApplyAltBn128MulArgs{} 23913 var err2 error 23914 if err2 = args.Read(ctx, iprot); err2 != nil { 23915 iprot.ReadMessageEnd(ctx) 23916 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23917 oprot.WriteMessageBegin(ctx, "alt_bn128_mul", thrift.EXCEPTION, seqId) 23918 x.Write(ctx, oprot) 23919 oprot.WriteMessageEnd(ctx) 23920 oprot.Flush(ctx) 23921 return false, thrift.WrapTException(err2) 23922 } 23923 iprot.ReadMessageEnd(ctx) 23924 23925 tickerCancel := func() {} 23926 // Start a goroutine to do server side connectivity check. 23927 if thrift.ServerConnectivityCheckInterval > 0 { 23928 var cancel context.CancelFunc 23929 ctx, cancel = context.WithCancel(ctx) 23930 defer cancel() 23931 var tickerCtx context.Context 23932 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 23933 defer tickerCancel() 23934 go func(ctx context.Context, cancel context.CancelFunc) { 23935 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 23936 defer ticker.Stop() 23937 for { 23938 select { 23939 case <-ctx.Done(): 23940 return 23941 case <-ticker.C: 23942 if !iprot.Transport().IsOpen() { 23943 cancel() 23944 return 23945 } 23946 } 23947 } 23948 }(tickerCtx, cancel) 23949 } 23950 23951 result := ApplyAltBn128MulResult{} 23952 var retval []byte 23953 if retval, err2 = p.handler.AltBn128Mul(ctx, args.G1, args.Scalar); err2 != nil { 23954 tickerCancel() 23955 if err2 == thrift.ErrAbandonRequest { 23956 return false, thrift.WrapTException(err2) 23957 } 23958 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing alt_bn128_mul: " + err2.Error()) 23959 oprot.WriteMessageBegin(ctx, "alt_bn128_mul", thrift.EXCEPTION, seqId) 23960 x.Write(ctx, oprot) 23961 oprot.WriteMessageEnd(ctx) 23962 oprot.Flush(ctx) 23963 return true, thrift.WrapTException(err2) 23964 } else { 23965 result.Success = retval 23966 } 23967 tickerCancel() 23968 if err2 = oprot.WriteMessageBegin(ctx, "alt_bn128_mul", thrift.REPLY, seqId); err2 != nil { 23969 err = thrift.WrapTException(err2) 23970 } 23971 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 23972 err = thrift.WrapTException(err2) 23973 } 23974 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 23975 err = thrift.WrapTException(err2) 23976 } 23977 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 23978 err = thrift.WrapTException(err2) 23979 } 23980 if err != nil { 23981 return 23982 } 23983 return true, err 23984 } 23985 23986 type applyProcessorAltBn128Pair struct { 23987 handler Apply 23988 } 23989 23990 func (p *applyProcessorAltBn128Pair) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 23991 args := ApplyAltBn128PairArgs{} 23992 var err2 error 23993 if err2 = args.Read(ctx, iprot); err2 != nil { 23994 iprot.ReadMessageEnd(ctx) 23995 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 23996 oprot.WriteMessageBegin(ctx, "alt_bn128_pair", thrift.EXCEPTION, seqId) 23997 x.Write(ctx, oprot) 23998 oprot.WriteMessageEnd(ctx) 23999 oprot.Flush(ctx) 24000 return false, thrift.WrapTException(err2) 24001 } 24002 iprot.ReadMessageEnd(ctx) 24003 24004 tickerCancel := func() {} 24005 // Start a goroutine to do server side connectivity check. 24006 if thrift.ServerConnectivityCheckInterval > 0 { 24007 var cancel context.CancelFunc 24008 ctx, cancel = context.WithCancel(ctx) 24009 defer cancel() 24010 var tickerCtx context.Context 24011 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 24012 defer tickerCancel() 24013 go func(ctx context.Context, cancel context.CancelFunc) { 24014 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 24015 defer ticker.Stop() 24016 for { 24017 select { 24018 case <-ctx.Done(): 24019 return 24020 case <-ticker.C: 24021 if !iprot.Transport().IsOpen() { 24022 cancel() 24023 return 24024 } 24025 } 24026 } 24027 }(tickerCtx, cancel) 24028 } 24029 24030 result := ApplyAltBn128PairResult{} 24031 var retval int32 24032 if retval, err2 = p.handler.AltBn128Pair(ctx, args.Pairs); err2 != nil { 24033 tickerCancel() 24034 if err2 == thrift.ErrAbandonRequest { 24035 return false, thrift.WrapTException(err2) 24036 } 24037 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing alt_bn128_pair: " + err2.Error()) 24038 oprot.WriteMessageBegin(ctx, "alt_bn128_pair", thrift.EXCEPTION, seqId) 24039 x.Write(ctx, oprot) 24040 oprot.WriteMessageEnd(ctx) 24041 oprot.Flush(ctx) 24042 return true, thrift.WrapTException(err2) 24043 } else { 24044 result.Success = &retval 24045 } 24046 tickerCancel() 24047 if err2 = oprot.WriteMessageBegin(ctx, "alt_bn128_pair", thrift.REPLY, seqId); err2 != nil { 24048 err = thrift.WrapTException(err2) 24049 } 24050 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 24051 err = thrift.WrapTException(err2) 24052 } 24053 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 24054 err = thrift.WrapTException(err2) 24055 } 24056 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 24057 err = thrift.WrapTException(err2) 24058 } 24059 if err != nil { 24060 return 24061 } 24062 return true, err 24063 } 24064 24065 type applyProcessorModExp struct { 24066 handler Apply 24067 } 24068 24069 func (p *applyProcessorModExp) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { 24070 args := ApplyModExpArgs{} 24071 var err2 error 24072 if err2 = args.Read(ctx, iprot); err2 != nil { 24073 iprot.ReadMessageEnd(ctx) 24074 x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) 24075 oprot.WriteMessageBegin(ctx, "mod_exp", thrift.EXCEPTION, seqId) 24076 x.Write(ctx, oprot) 24077 oprot.WriteMessageEnd(ctx) 24078 oprot.Flush(ctx) 24079 return false, thrift.WrapTException(err2) 24080 } 24081 iprot.ReadMessageEnd(ctx) 24082 24083 tickerCancel := func() {} 24084 // Start a goroutine to do server side connectivity check. 24085 if thrift.ServerConnectivityCheckInterval > 0 { 24086 var cancel context.CancelFunc 24087 ctx, cancel = context.WithCancel(ctx) 24088 defer cancel() 24089 var tickerCtx context.Context 24090 tickerCtx, tickerCancel = context.WithCancel(context.Background()) 24091 defer tickerCancel() 24092 go func(ctx context.Context, cancel context.CancelFunc) { 24093 ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) 24094 defer ticker.Stop() 24095 for { 24096 select { 24097 case <-ctx.Done(): 24098 return 24099 case <-ticker.C: 24100 if !iprot.Transport().IsOpen() { 24101 cancel() 24102 return 24103 } 24104 } 24105 } 24106 }(tickerCtx, cancel) 24107 } 24108 24109 result := ApplyModExpResult{} 24110 var retval []byte 24111 if retval, err2 = p.handler.ModExp(ctx, args.Base, args.Exp, args.Mod); err2 != nil { 24112 tickerCancel() 24113 if err2 == thrift.ErrAbandonRequest { 24114 return false, thrift.WrapTException(err2) 24115 } 24116 x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing mod_exp: " + err2.Error()) 24117 oprot.WriteMessageBegin(ctx, "mod_exp", thrift.EXCEPTION, seqId) 24118 x.Write(ctx, oprot) 24119 oprot.WriteMessageEnd(ctx) 24120 oprot.Flush(ctx) 24121 return true, thrift.WrapTException(err2) 24122 } else { 24123 result.Success = retval 24124 } 24125 tickerCancel() 24126 if err2 = oprot.WriteMessageBegin(ctx, "mod_exp", thrift.REPLY, seqId); err2 != nil { 24127 err = thrift.WrapTException(err2) 24128 } 24129 if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { 24130 err = thrift.WrapTException(err2) 24131 } 24132 if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { 24133 err = thrift.WrapTException(err2) 24134 } 24135 if err2 = oprot.Flush(ctx); err == nil && err2 != nil { 24136 err = thrift.WrapTException(err2) 24137 } 24138 if err != nil { 24139 return 24140 } 24141 return true, err 24142 } 24143 24144 24145 // HELPER FUNCTIONS AND STRUCTURES 24146 24147 type ApplyEndApplyArgs struct { 24148 } 24149 24150 func NewApplyEndApplyArgs() *ApplyEndApplyArgs { 24151 return &ApplyEndApplyArgs{} 24152 } 24153 24154 func (p *ApplyEndApplyArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 24155 if _, err := iprot.ReadStructBegin(ctx); err != nil { 24156 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 24157 } 24158 24159 24160 for { 24161 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 24162 if err != nil { 24163 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 24164 } 24165 if fieldTypeId == thrift.STOP { break; } 24166 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24167 return err 24168 } 24169 if err := iprot.ReadFieldEnd(ctx); err != nil { 24170 return err 24171 } 24172 } 24173 if err := iprot.ReadStructEnd(ctx); err != nil { 24174 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 24175 } 24176 return nil 24177 } 24178 24179 func (p *ApplyEndApplyArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 24180 if err := oprot.WriteStructBegin(ctx, "end_apply_args"); err != nil { 24181 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 24182 if p != nil { 24183 } 24184 if err := oprot.WriteFieldStop(ctx); err != nil { 24185 return thrift.PrependError("write field stop error: ", err) } 24186 if err := oprot.WriteStructEnd(ctx); err != nil { 24187 return thrift.PrependError("write struct stop error: ", err) } 24188 return nil 24189 } 24190 24191 func (p *ApplyEndApplyArgs) String() string { 24192 if p == nil { 24193 return "<nil>" 24194 } 24195 return fmt.Sprintf("ApplyEndApplyArgs(%+v)", *p) 24196 } 24197 24198 // Attributes: 24199 // - Success 24200 type ApplyEndApplyResult struct { 24201 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 24202 } 24203 24204 func NewApplyEndApplyResult() *ApplyEndApplyResult { 24205 return &ApplyEndApplyResult{} 24206 } 24207 24208 var ApplyEndApplyResult_Success_DEFAULT int32 24209 func (p *ApplyEndApplyResult) GetSuccess() int32 { 24210 if !p.IsSetSuccess() { 24211 return ApplyEndApplyResult_Success_DEFAULT 24212 } 24213 return *p.Success 24214 } 24215 func (p *ApplyEndApplyResult) IsSetSuccess() bool { 24216 return p.Success != nil 24217 } 24218 24219 func (p *ApplyEndApplyResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 24220 if _, err := iprot.ReadStructBegin(ctx); err != nil { 24221 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 24222 } 24223 24224 24225 for { 24226 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 24227 if err != nil { 24228 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 24229 } 24230 if fieldTypeId == thrift.STOP { break; } 24231 switch fieldId { 24232 case 0: 24233 if fieldTypeId == thrift.I32 { 24234 if err := p.ReadField0(ctx, iprot); err != nil { 24235 return err 24236 } 24237 } else { 24238 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24239 return err 24240 } 24241 } 24242 default: 24243 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24244 return err 24245 } 24246 } 24247 if err := iprot.ReadFieldEnd(ctx); err != nil { 24248 return err 24249 } 24250 } 24251 if err := iprot.ReadStructEnd(ctx); err != nil { 24252 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 24253 } 24254 return nil 24255 } 24256 24257 func (p *ApplyEndApplyResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 24258 if v, err := iprot.ReadI32(ctx); err != nil { 24259 return thrift.PrependError("error reading field 0: ", err) 24260 } else { 24261 p.Success = &v 24262 } 24263 return nil 24264 } 24265 24266 func (p *ApplyEndApplyResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 24267 if err := oprot.WriteStructBegin(ctx, "end_apply_result"); err != nil { 24268 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 24269 if p != nil { 24270 if err := p.writeField0(ctx, oprot); err != nil { return err } 24271 } 24272 if err := oprot.WriteFieldStop(ctx); err != nil { 24273 return thrift.PrependError("write field stop error: ", err) } 24274 if err := oprot.WriteStructEnd(ctx); err != nil { 24275 return thrift.PrependError("write struct stop error: ", err) } 24276 return nil 24277 } 24278 24279 func (p *ApplyEndApplyResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 24280 if p.IsSetSuccess() { 24281 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 24282 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 24283 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 24284 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 24285 if err := oprot.WriteFieldEnd(ctx); err != nil { 24286 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 24287 } 24288 return err 24289 } 24290 24291 func (p *ApplyEndApplyResult) String() string { 24292 if p == nil { 24293 return "<nil>" 24294 } 24295 return fmt.Sprintf("ApplyEndApplyResult(%+v)", *p) 24296 } 24297 24298 type ApplyGetActiveProducersArgs struct { 24299 } 24300 24301 func NewApplyGetActiveProducersArgs() *ApplyGetActiveProducersArgs { 24302 return &ApplyGetActiveProducersArgs{} 24303 } 24304 24305 func (p *ApplyGetActiveProducersArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 24306 if _, err := iprot.ReadStructBegin(ctx); err != nil { 24307 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 24308 } 24309 24310 24311 for { 24312 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 24313 if err != nil { 24314 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 24315 } 24316 if fieldTypeId == thrift.STOP { break; } 24317 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24318 return err 24319 } 24320 if err := iprot.ReadFieldEnd(ctx); err != nil { 24321 return err 24322 } 24323 } 24324 if err := iprot.ReadStructEnd(ctx); err != nil { 24325 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 24326 } 24327 return nil 24328 } 24329 24330 func (p *ApplyGetActiveProducersArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 24331 if err := oprot.WriteStructBegin(ctx, "get_active_producers_args"); err != nil { 24332 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 24333 if p != nil { 24334 } 24335 if err := oprot.WriteFieldStop(ctx); err != nil { 24336 return thrift.PrependError("write field stop error: ", err) } 24337 if err := oprot.WriteStructEnd(ctx); err != nil { 24338 return thrift.PrependError("write struct stop error: ", err) } 24339 return nil 24340 } 24341 24342 func (p *ApplyGetActiveProducersArgs) String() string { 24343 if p == nil { 24344 return "<nil>" 24345 } 24346 return fmt.Sprintf("ApplyGetActiveProducersArgs(%+v)", *p) 24347 } 24348 24349 // Attributes: 24350 // - Success 24351 type ApplyGetActiveProducersResult struct { 24352 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 24353 } 24354 24355 func NewApplyGetActiveProducersResult() *ApplyGetActiveProducersResult { 24356 return &ApplyGetActiveProducersResult{} 24357 } 24358 24359 var ApplyGetActiveProducersResult_Success_DEFAULT []byte 24360 24361 func (p *ApplyGetActiveProducersResult) GetSuccess() []byte { 24362 return p.Success 24363 } 24364 func (p *ApplyGetActiveProducersResult) IsSetSuccess() bool { 24365 return p.Success != nil 24366 } 24367 24368 func (p *ApplyGetActiveProducersResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 24369 if _, err := iprot.ReadStructBegin(ctx); err != nil { 24370 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 24371 } 24372 24373 24374 for { 24375 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 24376 if err != nil { 24377 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 24378 } 24379 if fieldTypeId == thrift.STOP { break; } 24380 switch fieldId { 24381 case 0: 24382 if fieldTypeId == thrift.STRING { 24383 if err := p.ReadField0(ctx, iprot); err != nil { 24384 return err 24385 } 24386 } else { 24387 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24388 return err 24389 } 24390 } 24391 default: 24392 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24393 return err 24394 } 24395 } 24396 if err := iprot.ReadFieldEnd(ctx); err != nil { 24397 return err 24398 } 24399 } 24400 if err := iprot.ReadStructEnd(ctx); err != nil { 24401 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 24402 } 24403 return nil 24404 } 24405 24406 func (p *ApplyGetActiveProducersResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 24407 if v, err := iprot.ReadBinary(ctx); err != nil { 24408 return thrift.PrependError("error reading field 0: ", err) 24409 } else { 24410 p.Success = v 24411 } 24412 return nil 24413 } 24414 24415 func (p *ApplyGetActiveProducersResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 24416 if err := oprot.WriteStructBegin(ctx, "get_active_producers_result"); err != nil { 24417 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 24418 if p != nil { 24419 if err := p.writeField0(ctx, oprot); err != nil { return err } 24420 } 24421 if err := oprot.WriteFieldStop(ctx); err != nil { 24422 return thrift.PrependError("write field stop error: ", err) } 24423 if err := oprot.WriteStructEnd(ctx); err != nil { 24424 return thrift.PrependError("write struct stop error: ", err) } 24425 return nil 24426 } 24427 24428 func (p *ApplyGetActiveProducersResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 24429 if p.IsSetSuccess() { 24430 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 24431 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 24432 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 24433 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 24434 if err := oprot.WriteFieldEnd(ctx); err != nil { 24435 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 24436 } 24437 return err 24438 } 24439 24440 func (p *ApplyGetActiveProducersResult) String() string { 24441 if p == nil { 24442 return "<nil>" 24443 } 24444 return fmt.Sprintf("ApplyGetActiveProducersResult(%+v)", *p) 24445 } 24446 24447 // Attributes: 24448 // - Account 24449 type ApplyGetResourceLimitsArgs struct { 24450 Account *Uint64 `thrift:"account,1" db:"account" json:"account"` 24451 } 24452 24453 func NewApplyGetResourceLimitsArgs() *ApplyGetResourceLimitsArgs { 24454 return &ApplyGetResourceLimitsArgs{} 24455 } 24456 24457 var ApplyGetResourceLimitsArgs_Account_DEFAULT *Uint64 24458 func (p *ApplyGetResourceLimitsArgs) GetAccount() *Uint64 { 24459 if !p.IsSetAccount() { 24460 return ApplyGetResourceLimitsArgs_Account_DEFAULT 24461 } 24462 return p.Account 24463 } 24464 func (p *ApplyGetResourceLimitsArgs) IsSetAccount() bool { 24465 return p.Account != nil 24466 } 24467 24468 func (p *ApplyGetResourceLimitsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 24469 if _, err := iprot.ReadStructBegin(ctx); err != nil { 24470 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 24471 } 24472 24473 24474 for { 24475 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 24476 if err != nil { 24477 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 24478 } 24479 if fieldTypeId == thrift.STOP { break; } 24480 switch fieldId { 24481 case 1: 24482 if fieldTypeId == thrift.STRUCT { 24483 if err := p.ReadField1(ctx, iprot); err != nil { 24484 return err 24485 } 24486 } else { 24487 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24488 return err 24489 } 24490 } 24491 default: 24492 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24493 return err 24494 } 24495 } 24496 if err := iprot.ReadFieldEnd(ctx); err != nil { 24497 return err 24498 } 24499 } 24500 if err := iprot.ReadStructEnd(ctx); err != nil { 24501 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 24502 } 24503 return nil 24504 } 24505 24506 func (p *ApplyGetResourceLimitsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 24507 p.Account = &Uint64{} 24508 if err := p.Account.Read(ctx, iprot); err != nil { 24509 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Account), err) 24510 } 24511 return nil 24512 } 24513 24514 func (p *ApplyGetResourceLimitsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 24515 if err := oprot.WriteStructBegin(ctx, "get_resource_limits_args"); err != nil { 24516 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 24517 if p != nil { 24518 if err := p.writeField1(ctx, oprot); err != nil { return err } 24519 } 24520 if err := oprot.WriteFieldStop(ctx); err != nil { 24521 return thrift.PrependError("write field stop error: ", err) } 24522 if err := oprot.WriteStructEnd(ctx); err != nil { 24523 return thrift.PrependError("write struct stop error: ", err) } 24524 return nil 24525 } 24526 24527 func (p *ApplyGetResourceLimitsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 24528 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRUCT, 1); err != nil { 24529 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:account: ", p), err) } 24530 if err := p.Account.Write(ctx, oprot); err != nil { 24531 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Account), err) 24532 } 24533 if err := oprot.WriteFieldEnd(ctx); err != nil { 24534 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:account: ", p), err) } 24535 return err 24536 } 24537 24538 func (p *ApplyGetResourceLimitsArgs) String() string { 24539 if p == nil { 24540 return "<nil>" 24541 } 24542 return fmt.Sprintf("ApplyGetResourceLimitsArgs(%+v)", *p) 24543 } 24544 24545 // Attributes: 24546 // - Success 24547 type ApplyGetResourceLimitsResult struct { 24548 Success *GetResourceLimitsReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 24549 } 24550 24551 func NewApplyGetResourceLimitsResult() *ApplyGetResourceLimitsResult { 24552 return &ApplyGetResourceLimitsResult{} 24553 } 24554 24555 var ApplyGetResourceLimitsResult_Success_DEFAULT *GetResourceLimitsReturn 24556 func (p *ApplyGetResourceLimitsResult) GetSuccess() *GetResourceLimitsReturn { 24557 if !p.IsSetSuccess() { 24558 return ApplyGetResourceLimitsResult_Success_DEFAULT 24559 } 24560 return p.Success 24561 } 24562 func (p *ApplyGetResourceLimitsResult) IsSetSuccess() bool { 24563 return p.Success != nil 24564 } 24565 24566 func (p *ApplyGetResourceLimitsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 24567 if _, err := iprot.ReadStructBegin(ctx); err != nil { 24568 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 24569 } 24570 24571 24572 for { 24573 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 24574 if err != nil { 24575 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 24576 } 24577 if fieldTypeId == thrift.STOP { break; } 24578 switch fieldId { 24579 case 0: 24580 if fieldTypeId == thrift.STRUCT { 24581 if err := p.ReadField0(ctx, iprot); err != nil { 24582 return err 24583 } 24584 } else { 24585 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24586 return err 24587 } 24588 } 24589 default: 24590 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24591 return err 24592 } 24593 } 24594 if err := iprot.ReadFieldEnd(ctx); err != nil { 24595 return err 24596 } 24597 } 24598 if err := iprot.ReadStructEnd(ctx); err != nil { 24599 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 24600 } 24601 return nil 24602 } 24603 24604 func (p *ApplyGetResourceLimitsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 24605 p.Success = &GetResourceLimitsReturn{} 24606 if err := p.Success.Read(ctx, iprot); err != nil { 24607 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 24608 } 24609 return nil 24610 } 24611 24612 func (p *ApplyGetResourceLimitsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 24613 if err := oprot.WriteStructBegin(ctx, "get_resource_limits_result"); err != nil { 24614 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 24615 if p != nil { 24616 if err := p.writeField0(ctx, oprot); err != nil { return err } 24617 } 24618 if err := oprot.WriteFieldStop(ctx); err != nil { 24619 return thrift.PrependError("write field stop error: ", err) } 24620 if err := oprot.WriteStructEnd(ctx); err != nil { 24621 return thrift.PrependError("write struct stop error: ", err) } 24622 return nil 24623 } 24624 24625 func (p *ApplyGetResourceLimitsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 24626 if p.IsSetSuccess() { 24627 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 24628 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 24629 if err := p.Success.Write(ctx, oprot); err != nil { 24630 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 24631 } 24632 if err := oprot.WriteFieldEnd(ctx); err != nil { 24633 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 24634 } 24635 return err 24636 } 24637 24638 func (p *ApplyGetResourceLimitsResult) String() string { 24639 if p == nil { 24640 return "<nil>" 24641 } 24642 return fmt.Sprintf("ApplyGetResourceLimitsResult(%+v)", *p) 24643 } 24644 24645 // Attributes: 24646 // - Account 24647 // - RAMBytes 24648 // - NetWeight 24649 // - CPUWeight 24650 type ApplySetResourceLimitsArgs struct { 24651 Account *Uint64 `thrift:"account,1" db:"account" json:"account"` 24652 RAMBytes int64 `thrift:"ram_bytes,2" db:"ram_bytes" json:"ram_bytes"` 24653 NetWeight int64 `thrift:"net_weight,3" db:"net_weight" json:"net_weight"` 24654 CPUWeight int64 `thrift:"cpu_weight,4" db:"cpu_weight" json:"cpu_weight"` 24655 } 24656 24657 func NewApplySetResourceLimitsArgs() *ApplySetResourceLimitsArgs { 24658 return &ApplySetResourceLimitsArgs{} 24659 } 24660 24661 var ApplySetResourceLimitsArgs_Account_DEFAULT *Uint64 24662 func (p *ApplySetResourceLimitsArgs) GetAccount() *Uint64 { 24663 if !p.IsSetAccount() { 24664 return ApplySetResourceLimitsArgs_Account_DEFAULT 24665 } 24666 return p.Account 24667 } 24668 24669 func (p *ApplySetResourceLimitsArgs) GetRAMBytes() int64 { 24670 return p.RAMBytes 24671 } 24672 24673 func (p *ApplySetResourceLimitsArgs) GetNetWeight() int64 { 24674 return p.NetWeight 24675 } 24676 24677 func (p *ApplySetResourceLimitsArgs) GetCPUWeight() int64 { 24678 return p.CPUWeight 24679 } 24680 func (p *ApplySetResourceLimitsArgs) IsSetAccount() bool { 24681 return p.Account != nil 24682 } 24683 24684 func (p *ApplySetResourceLimitsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 24685 if _, err := iprot.ReadStructBegin(ctx); err != nil { 24686 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 24687 } 24688 24689 24690 for { 24691 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 24692 if err != nil { 24693 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 24694 } 24695 if fieldTypeId == thrift.STOP { break; } 24696 switch fieldId { 24697 case 1: 24698 if fieldTypeId == thrift.STRUCT { 24699 if err := p.ReadField1(ctx, iprot); err != nil { 24700 return err 24701 } 24702 } else { 24703 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24704 return err 24705 } 24706 } 24707 case 2: 24708 if fieldTypeId == thrift.I64 { 24709 if err := p.ReadField2(ctx, iprot); err != nil { 24710 return err 24711 } 24712 } else { 24713 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24714 return err 24715 } 24716 } 24717 case 3: 24718 if fieldTypeId == thrift.I64 { 24719 if err := p.ReadField3(ctx, iprot); err != nil { 24720 return err 24721 } 24722 } else { 24723 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24724 return err 24725 } 24726 } 24727 case 4: 24728 if fieldTypeId == thrift.I64 { 24729 if err := p.ReadField4(ctx, iprot); err != nil { 24730 return err 24731 } 24732 } else { 24733 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24734 return err 24735 } 24736 } 24737 default: 24738 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24739 return err 24740 } 24741 } 24742 if err := iprot.ReadFieldEnd(ctx); err != nil { 24743 return err 24744 } 24745 } 24746 if err := iprot.ReadStructEnd(ctx); err != nil { 24747 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 24748 } 24749 return nil 24750 } 24751 24752 func (p *ApplySetResourceLimitsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 24753 p.Account = &Uint64{} 24754 if err := p.Account.Read(ctx, iprot); err != nil { 24755 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Account), err) 24756 } 24757 return nil 24758 } 24759 24760 func (p *ApplySetResourceLimitsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 24761 if v, err := iprot.ReadI64(ctx); err != nil { 24762 return thrift.PrependError("error reading field 2: ", err) 24763 } else { 24764 p.RAMBytes = v 24765 } 24766 return nil 24767 } 24768 24769 func (p *ApplySetResourceLimitsArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 24770 if v, err := iprot.ReadI64(ctx); err != nil { 24771 return thrift.PrependError("error reading field 3: ", err) 24772 } else { 24773 p.NetWeight = v 24774 } 24775 return nil 24776 } 24777 24778 func (p *ApplySetResourceLimitsArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 24779 if v, err := iprot.ReadI64(ctx); err != nil { 24780 return thrift.PrependError("error reading field 4: ", err) 24781 } else { 24782 p.CPUWeight = v 24783 } 24784 return nil 24785 } 24786 24787 func (p *ApplySetResourceLimitsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 24788 if err := oprot.WriteStructBegin(ctx, "set_resource_limits_args"); err != nil { 24789 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 24790 if p != nil { 24791 if err := p.writeField1(ctx, oprot); err != nil { return err } 24792 if err := p.writeField2(ctx, oprot); err != nil { return err } 24793 if err := p.writeField3(ctx, oprot); err != nil { return err } 24794 if err := p.writeField4(ctx, oprot); err != nil { return err } 24795 } 24796 if err := oprot.WriteFieldStop(ctx); err != nil { 24797 return thrift.PrependError("write field stop error: ", err) } 24798 if err := oprot.WriteStructEnd(ctx); err != nil { 24799 return thrift.PrependError("write struct stop error: ", err) } 24800 return nil 24801 } 24802 24803 func (p *ApplySetResourceLimitsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 24804 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRUCT, 1); err != nil { 24805 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:account: ", p), err) } 24806 if err := p.Account.Write(ctx, oprot); err != nil { 24807 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Account), err) 24808 } 24809 if err := oprot.WriteFieldEnd(ctx); err != nil { 24810 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:account: ", p), err) } 24811 return err 24812 } 24813 24814 func (p *ApplySetResourceLimitsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 24815 if err := oprot.WriteFieldBegin(ctx, "ram_bytes", thrift.I64, 2); err != nil { 24816 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ram_bytes: ", p), err) } 24817 if err := oprot.WriteI64(ctx, int64(p.RAMBytes)); err != nil { 24818 return thrift.PrependError(fmt.Sprintf("%T.ram_bytes (2) field write error: ", p), err) } 24819 if err := oprot.WriteFieldEnd(ctx); err != nil { 24820 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ram_bytes: ", p), err) } 24821 return err 24822 } 24823 24824 func (p *ApplySetResourceLimitsArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 24825 if err := oprot.WriteFieldBegin(ctx, "net_weight", thrift.I64, 3); err != nil { 24826 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:net_weight: ", p), err) } 24827 if err := oprot.WriteI64(ctx, int64(p.NetWeight)); err != nil { 24828 return thrift.PrependError(fmt.Sprintf("%T.net_weight (3) field write error: ", p), err) } 24829 if err := oprot.WriteFieldEnd(ctx); err != nil { 24830 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:net_weight: ", p), err) } 24831 return err 24832 } 24833 24834 func (p *ApplySetResourceLimitsArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 24835 if err := oprot.WriteFieldBegin(ctx, "cpu_weight", thrift.I64, 4); err != nil { 24836 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:cpu_weight: ", p), err) } 24837 if err := oprot.WriteI64(ctx, int64(p.CPUWeight)); err != nil { 24838 return thrift.PrependError(fmt.Sprintf("%T.cpu_weight (4) field write error: ", p), err) } 24839 if err := oprot.WriteFieldEnd(ctx); err != nil { 24840 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:cpu_weight: ", p), err) } 24841 return err 24842 } 24843 24844 func (p *ApplySetResourceLimitsArgs) String() string { 24845 if p == nil { 24846 return "<nil>" 24847 } 24848 return fmt.Sprintf("ApplySetResourceLimitsArgs(%+v)", *p) 24849 } 24850 24851 type ApplySetResourceLimitsResult struct { 24852 } 24853 24854 func NewApplySetResourceLimitsResult() *ApplySetResourceLimitsResult { 24855 return &ApplySetResourceLimitsResult{} 24856 } 24857 24858 func (p *ApplySetResourceLimitsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 24859 if _, err := iprot.ReadStructBegin(ctx); err != nil { 24860 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 24861 } 24862 24863 24864 for { 24865 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 24866 if err != nil { 24867 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 24868 } 24869 if fieldTypeId == thrift.STOP { break; } 24870 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24871 return err 24872 } 24873 if err := iprot.ReadFieldEnd(ctx); err != nil { 24874 return err 24875 } 24876 } 24877 if err := iprot.ReadStructEnd(ctx); err != nil { 24878 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 24879 } 24880 return nil 24881 } 24882 24883 func (p *ApplySetResourceLimitsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 24884 if err := oprot.WriteStructBegin(ctx, "set_resource_limits_result"); err != nil { 24885 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 24886 if p != nil { 24887 } 24888 if err := oprot.WriteFieldStop(ctx); err != nil { 24889 return thrift.PrependError("write field stop error: ", err) } 24890 if err := oprot.WriteStructEnd(ctx); err != nil { 24891 return thrift.PrependError("write struct stop error: ", err) } 24892 return nil 24893 } 24894 24895 func (p *ApplySetResourceLimitsResult) String() string { 24896 if p == nil { 24897 return "<nil>" 24898 } 24899 return fmt.Sprintf("ApplySetResourceLimitsResult(%+v)", *p) 24900 } 24901 24902 // Attributes: 24903 // - ProducerData 24904 type ApplySetProposedProducersArgs struct { 24905 ProducerData []byte `thrift:"producer_data,1" db:"producer_data" json:"producer_data"` 24906 } 24907 24908 func NewApplySetProposedProducersArgs() *ApplySetProposedProducersArgs { 24909 return &ApplySetProposedProducersArgs{} 24910 } 24911 24912 24913 func (p *ApplySetProposedProducersArgs) GetProducerData() []byte { 24914 return p.ProducerData 24915 } 24916 func (p *ApplySetProposedProducersArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 24917 if _, err := iprot.ReadStructBegin(ctx); err != nil { 24918 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 24919 } 24920 24921 24922 for { 24923 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 24924 if err != nil { 24925 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 24926 } 24927 if fieldTypeId == thrift.STOP { break; } 24928 switch fieldId { 24929 case 1: 24930 if fieldTypeId == thrift.STRING { 24931 if err := p.ReadField1(ctx, iprot); err != nil { 24932 return err 24933 } 24934 } else { 24935 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24936 return err 24937 } 24938 } 24939 default: 24940 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 24941 return err 24942 } 24943 } 24944 if err := iprot.ReadFieldEnd(ctx); err != nil { 24945 return err 24946 } 24947 } 24948 if err := iprot.ReadStructEnd(ctx); err != nil { 24949 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 24950 } 24951 return nil 24952 } 24953 24954 func (p *ApplySetProposedProducersArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 24955 if v, err := iprot.ReadBinary(ctx); err != nil { 24956 return thrift.PrependError("error reading field 1: ", err) 24957 } else { 24958 p.ProducerData = v 24959 } 24960 return nil 24961 } 24962 24963 func (p *ApplySetProposedProducersArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 24964 if err := oprot.WriteStructBegin(ctx, "set_proposed_producers_args"); err != nil { 24965 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 24966 if p != nil { 24967 if err := p.writeField1(ctx, oprot); err != nil { return err } 24968 } 24969 if err := oprot.WriteFieldStop(ctx); err != nil { 24970 return thrift.PrependError("write field stop error: ", err) } 24971 if err := oprot.WriteStructEnd(ctx); err != nil { 24972 return thrift.PrependError("write struct stop error: ", err) } 24973 return nil 24974 } 24975 24976 func (p *ApplySetProposedProducersArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 24977 if err := oprot.WriteFieldBegin(ctx, "producer_data", thrift.STRING, 1); err != nil { 24978 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:producer_data: ", p), err) } 24979 if err := oprot.WriteBinary(ctx, p.ProducerData); err != nil { 24980 return thrift.PrependError(fmt.Sprintf("%T.producer_data (1) field write error: ", p), err) } 24981 if err := oprot.WriteFieldEnd(ctx); err != nil { 24982 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:producer_data: ", p), err) } 24983 return err 24984 } 24985 24986 func (p *ApplySetProposedProducersArgs) String() string { 24987 if p == nil { 24988 return "<nil>" 24989 } 24990 return fmt.Sprintf("ApplySetProposedProducersArgs(%+v)", *p) 24991 } 24992 24993 // Attributes: 24994 // - Success 24995 type ApplySetProposedProducersResult struct { 24996 Success *int64 `thrift:"success,0" db:"success" json:"success,omitempty"` 24997 } 24998 24999 func NewApplySetProposedProducersResult() *ApplySetProposedProducersResult { 25000 return &ApplySetProposedProducersResult{} 25001 } 25002 25003 var ApplySetProposedProducersResult_Success_DEFAULT int64 25004 func (p *ApplySetProposedProducersResult) GetSuccess() int64 { 25005 if !p.IsSetSuccess() { 25006 return ApplySetProposedProducersResult_Success_DEFAULT 25007 } 25008 return *p.Success 25009 } 25010 func (p *ApplySetProposedProducersResult) IsSetSuccess() bool { 25011 return p.Success != nil 25012 } 25013 25014 func (p *ApplySetProposedProducersResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 25015 if _, err := iprot.ReadStructBegin(ctx); err != nil { 25016 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 25017 } 25018 25019 25020 for { 25021 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 25022 if err != nil { 25023 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 25024 } 25025 if fieldTypeId == thrift.STOP { break; } 25026 switch fieldId { 25027 case 0: 25028 if fieldTypeId == thrift.I64 { 25029 if err := p.ReadField0(ctx, iprot); err != nil { 25030 return err 25031 } 25032 } else { 25033 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25034 return err 25035 } 25036 } 25037 default: 25038 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25039 return err 25040 } 25041 } 25042 if err := iprot.ReadFieldEnd(ctx); err != nil { 25043 return err 25044 } 25045 } 25046 if err := iprot.ReadStructEnd(ctx); err != nil { 25047 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 25048 } 25049 return nil 25050 } 25051 25052 func (p *ApplySetProposedProducersResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 25053 if v, err := iprot.ReadI64(ctx); err != nil { 25054 return thrift.PrependError("error reading field 0: ", err) 25055 } else { 25056 p.Success = &v 25057 } 25058 return nil 25059 } 25060 25061 func (p *ApplySetProposedProducersResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 25062 if err := oprot.WriteStructBegin(ctx, "set_proposed_producers_result"); err != nil { 25063 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 25064 if p != nil { 25065 if err := p.writeField0(ctx, oprot); err != nil { return err } 25066 } 25067 if err := oprot.WriteFieldStop(ctx); err != nil { 25068 return thrift.PrependError("write field stop error: ", err) } 25069 if err := oprot.WriteStructEnd(ctx); err != nil { 25070 return thrift.PrependError("write struct stop error: ", err) } 25071 return nil 25072 } 25073 25074 func (p *ApplySetProposedProducersResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 25075 if p.IsSetSuccess() { 25076 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I64, 0); err != nil { 25077 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 25078 if err := oprot.WriteI64(ctx, int64(*p.Success)); err != nil { 25079 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 25080 if err := oprot.WriteFieldEnd(ctx); err != nil { 25081 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 25082 } 25083 return err 25084 } 25085 25086 func (p *ApplySetProposedProducersResult) String() string { 25087 if p == nil { 25088 return "<nil>" 25089 } 25090 return fmt.Sprintf("ApplySetProposedProducersResult(%+v)", *p) 25091 } 25092 25093 // Attributes: 25094 // - ProducerDataFormat 25095 // - ProducerData 25096 type ApplySetProposedProducersExArgs struct { 25097 ProducerDataFormat *Uint64 `thrift:"producer_data_format,1" db:"producer_data_format" json:"producer_data_format"` 25098 ProducerData []byte `thrift:"producer_data,2" db:"producer_data" json:"producer_data"` 25099 } 25100 25101 func NewApplySetProposedProducersExArgs() *ApplySetProposedProducersExArgs { 25102 return &ApplySetProposedProducersExArgs{} 25103 } 25104 25105 var ApplySetProposedProducersExArgs_ProducerDataFormat_DEFAULT *Uint64 25106 func (p *ApplySetProposedProducersExArgs) GetProducerDataFormat() *Uint64 { 25107 if !p.IsSetProducerDataFormat() { 25108 return ApplySetProposedProducersExArgs_ProducerDataFormat_DEFAULT 25109 } 25110 return p.ProducerDataFormat 25111 } 25112 25113 func (p *ApplySetProposedProducersExArgs) GetProducerData() []byte { 25114 return p.ProducerData 25115 } 25116 func (p *ApplySetProposedProducersExArgs) IsSetProducerDataFormat() bool { 25117 return p.ProducerDataFormat != nil 25118 } 25119 25120 func (p *ApplySetProposedProducersExArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 25121 if _, err := iprot.ReadStructBegin(ctx); err != nil { 25122 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 25123 } 25124 25125 25126 for { 25127 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 25128 if err != nil { 25129 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 25130 } 25131 if fieldTypeId == thrift.STOP { break; } 25132 switch fieldId { 25133 case 1: 25134 if fieldTypeId == thrift.STRUCT { 25135 if err := p.ReadField1(ctx, iprot); err != nil { 25136 return err 25137 } 25138 } else { 25139 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25140 return err 25141 } 25142 } 25143 case 2: 25144 if fieldTypeId == thrift.STRING { 25145 if err := p.ReadField2(ctx, iprot); err != nil { 25146 return err 25147 } 25148 } else { 25149 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25150 return err 25151 } 25152 } 25153 default: 25154 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25155 return err 25156 } 25157 } 25158 if err := iprot.ReadFieldEnd(ctx); err != nil { 25159 return err 25160 } 25161 } 25162 if err := iprot.ReadStructEnd(ctx); err != nil { 25163 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 25164 } 25165 return nil 25166 } 25167 25168 func (p *ApplySetProposedProducersExArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 25169 p.ProducerDataFormat = &Uint64{} 25170 if err := p.ProducerDataFormat.Read(ctx, iprot); err != nil { 25171 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ProducerDataFormat), err) 25172 } 25173 return nil 25174 } 25175 25176 func (p *ApplySetProposedProducersExArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 25177 if v, err := iprot.ReadBinary(ctx); err != nil { 25178 return thrift.PrependError("error reading field 2: ", err) 25179 } else { 25180 p.ProducerData = v 25181 } 25182 return nil 25183 } 25184 25185 func (p *ApplySetProposedProducersExArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 25186 if err := oprot.WriteStructBegin(ctx, "set_proposed_producers_ex_args"); err != nil { 25187 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 25188 if p != nil { 25189 if err := p.writeField1(ctx, oprot); err != nil { return err } 25190 if err := p.writeField2(ctx, oprot); err != nil { return err } 25191 } 25192 if err := oprot.WriteFieldStop(ctx); err != nil { 25193 return thrift.PrependError("write field stop error: ", err) } 25194 if err := oprot.WriteStructEnd(ctx); err != nil { 25195 return thrift.PrependError("write struct stop error: ", err) } 25196 return nil 25197 } 25198 25199 func (p *ApplySetProposedProducersExArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 25200 if err := oprot.WriteFieldBegin(ctx, "producer_data_format", thrift.STRUCT, 1); err != nil { 25201 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:producer_data_format: ", p), err) } 25202 if err := p.ProducerDataFormat.Write(ctx, oprot); err != nil { 25203 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ProducerDataFormat), err) 25204 } 25205 if err := oprot.WriteFieldEnd(ctx); err != nil { 25206 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:producer_data_format: ", p), err) } 25207 return err 25208 } 25209 25210 func (p *ApplySetProposedProducersExArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 25211 if err := oprot.WriteFieldBegin(ctx, "producer_data", thrift.STRING, 2); err != nil { 25212 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:producer_data: ", p), err) } 25213 if err := oprot.WriteBinary(ctx, p.ProducerData); err != nil { 25214 return thrift.PrependError(fmt.Sprintf("%T.producer_data (2) field write error: ", p), err) } 25215 if err := oprot.WriteFieldEnd(ctx); err != nil { 25216 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:producer_data: ", p), err) } 25217 return err 25218 } 25219 25220 func (p *ApplySetProposedProducersExArgs) String() string { 25221 if p == nil { 25222 return "<nil>" 25223 } 25224 return fmt.Sprintf("ApplySetProposedProducersExArgs(%+v)", *p) 25225 } 25226 25227 // Attributes: 25228 // - Success 25229 type ApplySetProposedProducersExResult struct { 25230 Success *int64 `thrift:"success,0" db:"success" json:"success,omitempty"` 25231 } 25232 25233 func NewApplySetProposedProducersExResult() *ApplySetProposedProducersExResult { 25234 return &ApplySetProposedProducersExResult{} 25235 } 25236 25237 var ApplySetProposedProducersExResult_Success_DEFAULT int64 25238 func (p *ApplySetProposedProducersExResult) GetSuccess() int64 { 25239 if !p.IsSetSuccess() { 25240 return ApplySetProposedProducersExResult_Success_DEFAULT 25241 } 25242 return *p.Success 25243 } 25244 func (p *ApplySetProposedProducersExResult) IsSetSuccess() bool { 25245 return p.Success != nil 25246 } 25247 25248 func (p *ApplySetProposedProducersExResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 25249 if _, err := iprot.ReadStructBegin(ctx); err != nil { 25250 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 25251 } 25252 25253 25254 for { 25255 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 25256 if err != nil { 25257 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 25258 } 25259 if fieldTypeId == thrift.STOP { break; } 25260 switch fieldId { 25261 case 0: 25262 if fieldTypeId == thrift.I64 { 25263 if err := p.ReadField0(ctx, iprot); err != nil { 25264 return err 25265 } 25266 } else { 25267 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25268 return err 25269 } 25270 } 25271 default: 25272 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25273 return err 25274 } 25275 } 25276 if err := iprot.ReadFieldEnd(ctx); err != nil { 25277 return err 25278 } 25279 } 25280 if err := iprot.ReadStructEnd(ctx); err != nil { 25281 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 25282 } 25283 return nil 25284 } 25285 25286 func (p *ApplySetProposedProducersExResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 25287 if v, err := iprot.ReadI64(ctx); err != nil { 25288 return thrift.PrependError("error reading field 0: ", err) 25289 } else { 25290 p.Success = &v 25291 } 25292 return nil 25293 } 25294 25295 func (p *ApplySetProposedProducersExResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 25296 if err := oprot.WriteStructBegin(ctx, "set_proposed_producers_ex_result"); err != nil { 25297 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 25298 if p != nil { 25299 if err := p.writeField0(ctx, oprot); err != nil { return err } 25300 } 25301 if err := oprot.WriteFieldStop(ctx); err != nil { 25302 return thrift.PrependError("write field stop error: ", err) } 25303 if err := oprot.WriteStructEnd(ctx); err != nil { 25304 return thrift.PrependError("write struct stop error: ", err) } 25305 return nil 25306 } 25307 25308 func (p *ApplySetProposedProducersExResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 25309 if p.IsSetSuccess() { 25310 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I64, 0); err != nil { 25311 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 25312 if err := oprot.WriteI64(ctx, int64(*p.Success)); err != nil { 25313 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 25314 if err := oprot.WriteFieldEnd(ctx); err != nil { 25315 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 25316 } 25317 return err 25318 } 25319 25320 func (p *ApplySetProposedProducersExResult) String() string { 25321 if p == nil { 25322 return "<nil>" 25323 } 25324 return fmt.Sprintf("ApplySetProposedProducersExResult(%+v)", *p) 25325 } 25326 25327 // Attributes: 25328 // - Account 25329 type ApplyIsPrivilegedArgs struct { 25330 Account *Uint64 `thrift:"account,1" db:"account" json:"account"` 25331 } 25332 25333 func NewApplyIsPrivilegedArgs() *ApplyIsPrivilegedArgs { 25334 return &ApplyIsPrivilegedArgs{} 25335 } 25336 25337 var ApplyIsPrivilegedArgs_Account_DEFAULT *Uint64 25338 func (p *ApplyIsPrivilegedArgs) GetAccount() *Uint64 { 25339 if !p.IsSetAccount() { 25340 return ApplyIsPrivilegedArgs_Account_DEFAULT 25341 } 25342 return p.Account 25343 } 25344 func (p *ApplyIsPrivilegedArgs) IsSetAccount() bool { 25345 return p.Account != nil 25346 } 25347 25348 func (p *ApplyIsPrivilegedArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 25349 if _, err := iprot.ReadStructBegin(ctx); err != nil { 25350 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 25351 } 25352 25353 25354 for { 25355 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 25356 if err != nil { 25357 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 25358 } 25359 if fieldTypeId == thrift.STOP { break; } 25360 switch fieldId { 25361 case 1: 25362 if fieldTypeId == thrift.STRUCT { 25363 if err := p.ReadField1(ctx, iprot); err != nil { 25364 return err 25365 } 25366 } else { 25367 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25368 return err 25369 } 25370 } 25371 default: 25372 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25373 return err 25374 } 25375 } 25376 if err := iprot.ReadFieldEnd(ctx); err != nil { 25377 return err 25378 } 25379 } 25380 if err := iprot.ReadStructEnd(ctx); err != nil { 25381 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 25382 } 25383 return nil 25384 } 25385 25386 func (p *ApplyIsPrivilegedArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 25387 p.Account = &Uint64{} 25388 if err := p.Account.Read(ctx, iprot); err != nil { 25389 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Account), err) 25390 } 25391 return nil 25392 } 25393 25394 func (p *ApplyIsPrivilegedArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 25395 if err := oprot.WriteStructBegin(ctx, "is_privileged_args"); err != nil { 25396 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 25397 if p != nil { 25398 if err := p.writeField1(ctx, oprot); err != nil { return err } 25399 } 25400 if err := oprot.WriteFieldStop(ctx); err != nil { 25401 return thrift.PrependError("write field stop error: ", err) } 25402 if err := oprot.WriteStructEnd(ctx); err != nil { 25403 return thrift.PrependError("write struct stop error: ", err) } 25404 return nil 25405 } 25406 25407 func (p *ApplyIsPrivilegedArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 25408 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRUCT, 1); err != nil { 25409 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:account: ", p), err) } 25410 if err := p.Account.Write(ctx, oprot); err != nil { 25411 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Account), err) 25412 } 25413 if err := oprot.WriteFieldEnd(ctx); err != nil { 25414 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:account: ", p), err) } 25415 return err 25416 } 25417 25418 func (p *ApplyIsPrivilegedArgs) String() string { 25419 if p == nil { 25420 return "<nil>" 25421 } 25422 return fmt.Sprintf("ApplyIsPrivilegedArgs(%+v)", *p) 25423 } 25424 25425 // Attributes: 25426 // - Success 25427 type ApplyIsPrivilegedResult struct { 25428 Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` 25429 } 25430 25431 func NewApplyIsPrivilegedResult() *ApplyIsPrivilegedResult { 25432 return &ApplyIsPrivilegedResult{} 25433 } 25434 25435 var ApplyIsPrivilegedResult_Success_DEFAULT bool 25436 func (p *ApplyIsPrivilegedResult) GetSuccess() bool { 25437 if !p.IsSetSuccess() { 25438 return ApplyIsPrivilegedResult_Success_DEFAULT 25439 } 25440 return *p.Success 25441 } 25442 func (p *ApplyIsPrivilegedResult) IsSetSuccess() bool { 25443 return p.Success != nil 25444 } 25445 25446 func (p *ApplyIsPrivilegedResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 25447 if _, err := iprot.ReadStructBegin(ctx); err != nil { 25448 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 25449 } 25450 25451 25452 for { 25453 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 25454 if err != nil { 25455 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 25456 } 25457 if fieldTypeId == thrift.STOP { break; } 25458 switch fieldId { 25459 case 0: 25460 if fieldTypeId == thrift.BOOL { 25461 if err := p.ReadField0(ctx, iprot); err != nil { 25462 return err 25463 } 25464 } else { 25465 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25466 return err 25467 } 25468 } 25469 default: 25470 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25471 return err 25472 } 25473 } 25474 if err := iprot.ReadFieldEnd(ctx); err != nil { 25475 return err 25476 } 25477 } 25478 if err := iprot.ReadStructEnd(ctx); err != nil { 25479 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 25480 } 25481 return nil 25482 } 25483 25484 func (p *ApplyIsPrivilegedResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 25485 if v, err := iprot.ReadBool(ctx); err != nil { 25486 return thrift.PrependError("error reading field 0: ", err) 25487 } else { 25488 p.Success = &v 25489 } 25490 return nil 25491 } 25492 25493 func (p *ApplyIsPrivilegedResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 25494 if err := oprot.WriteStructBegin(ctx, "is_privileged_result"); err != nil { 25495 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 25496 if p != nil { 25497 if err := p.writeField0(ctx, oprot); err != nil { return err } 25498 } 25499 if err := oprot.WriteFieldStop(ctx); err != nil { 25500 return thrift.PrependError("write field stop error: ", err) } 25501 if err := oprot.WriteStructEnd(ctx); err != nil { 25502 return thrift.PrependError("write struct stop error: ", err) } 25503 return nil 25504 } 25505 25506 func (p *ApplyIsPrivilegedResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 25507 if p.IsSetSuccess() { 25508 if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { 25509 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 25510 if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { 25511 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 25512 if err := oprot.WriteFieldEnd(ctx); err != nil { 25513 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 25514 } 25515 return err 25516 } 25517 25518 func (p *ApplyIsPrivilegedResult) String() string { 25519 if p == nil { 25520 return "<nil>" 25521 } 25522 return fmt.Sprintf("ApplyIsPrivilegedResult(%+v)", *p) 25523 } 25524 25525 // Attributes: 25526 // - Account 25527 // - IsPriv 25528 type ApplySetPrivilegedArgs struct { 25529 Account *Uint64 `thrift:"account,1" db:"account" json:"account"` 25530 IsPriv bool `thrift:"is_priv,2" db:"is_priv" json:"is_priv"` 25531 } 25532 25533 func NewApplySetPrivilegedArgs() *ApplySetPrivilegedArgs { 25534 return &ApplySetPrivilegedArgs{} 25535 } 25536 25537 var ApplySetPrivilegedArgs_Account_DEFAULT *Uint64 25538 func (p *ApplySetPrivilegedArgs) GetAccount() *Uint64 { 25539 if !p.IsSetAccount() { 25540 return ApplySetPrivilegedArgs_Account_DEFAULT 25541 } 25542 return p.Account 25543 } 25544 25545 func (p *ApplySetPrivilegedArgs) GetIsPriv() bool { 25546 return p.IsPriv 25547 } 25548 func (p *ApplySetPrivilegedArgs) IsSetAccount() bool { 25549 return p.Account != nil 25550 } 25551 25552 func (p *ApplySetPrivilegedArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 25553 if _, err := iprot.ReadStructBegin(ctx); err != nil { 25554 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 25555 } 25556 25557 25558 for { 25559 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 25560 if err != nil { 25561 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 25562 } 25563 if fieldTypeId == thrift.STOP { break; } 25564 switch fieldId { 25565 case 1: 25566 if fieldTypeId == thrift.STRUCT { 25567 if err := p.ReadField1(ctx, iprot); err != nil { 25568 return err 25569 } 25570 } else { 25571 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25572 return err 25573 } 25574 } 25575 case 2: 25576 if fieldTypeId == thrift.BOOL { 25577 if err := p.ReadField2(ctx, iprot); err != nil { 25578 return err 25579 } 25580 } else { 25581 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25582 return err 25583 } 25584 } 25585 default: 25586 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25587 return err 25588 } 25589 } 25590 if err := iprot.ReadFieldEnd(ctx); err != nil { 25591 return err 25592 } 25593 } 25594 if err := iprot.ReadStructEnd(ctx); err != nil { 25595 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 25596 } 25597 return nil 25598 } 25599 25600 func (p *ApplySetPrivilegedArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 25601 p.Account = &Uint64{} 25602 if err := p.Account.Read(ctx, iprot); err != nil { 25603 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Account), err) 25604 } 25605 return nil 25606 } 25607 25608 func (p *ApplySetPrivilegedArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 25609 if v, err := iprot.ReadBool(ctx); err != nil { 25610 return thrift.PrependError("error reading field 2: ", err) 25611 } else { 25612 p.IsPriv = v 25613 } 25614 return nil 25615 } 25616 25617 func (p *ApplySetPrivilegedArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 25618 if err := oprot.WriteStructBegin(ctx, "set_privileged_args"); err != nil { 25619 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 25620 if p != nil { 25621 if err := p.writeField1(ctx, oprot); err != nil { return err } 25622 if err := p.writeField2(ctx, oprot); err != nil { return err } 25623 } 25624 if err := oprot.WriteFieldStop(ctx); err != nil { 25625 return thrift.PrependError("write field stop error: ", err) } 25626 if err := oprot.WriteStructEnd(ctx); err != nil { 25627 return thrift.PrependError("write struct stop error: ", err) } 25628 return nil 25629 } 25630 25631 func (p *ApplySetPrivilegedArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 25632 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRUCT, 1); err != nil { 25633 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:account: ", p), err) } 25634 if err := p.Account.Write(ctx, oprot); err != nil { 25635 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Account), err) 25636 } 25637 if err := oprot.WriteFieldEnd(ctx); err != nil { 25638 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:account: ", p), err) } 25639 return err 25640 } 25641 25642 func (p *ApplySetPrivilegedArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 25643 if err := oprot.WriteFieldBegin(ctx, "is_priv", thrift.BOOL, 2); err != nil { 25644 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:is_priv: ", p), err) } 25645 if err := oprot.WriteBool(ctx, bool(p.IsPriv)); err != nil { 25646 return thrift.PrependError(fmt.Sprintf("%T.is_priv (2) field write error: ", p), err) } 25647 if err := oprot.WriteFieldEnd(ctx); err != nil { 25648 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:is_priv: ", p), err) } 25649 return err 25650 } 25651 25652 func (p *ApplySetPrivilegedArgs) String() string { 25653 if p == nil { 25654 return "<nil>" 25655 } 25656 return fmt.Sprintf("ApplySetPrivilegedArgs(%+v)", *p) 25657 } 25658 25659 type ApplySetPrivilegedResult struct { 25660 } 25661 25662 func NewApplySetPrivilegedResult() *ApplySetPrivilegedResult { 25663 return &ApplySetPrivilegedResult{} 25664 } 25665 25666 func (p *ApplySetPrivilegedResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 25667 if _, err := iprot.ReadStructBegin(ctx); err != nil { 25668 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 25669 } 25670 25671 25672 for { 25673 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 25674 if err != nil { 25675 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 25676 } 25677 if fieldTypeId == thrift.STOP { break; } 25678 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25679 return err 25680 } 25681 if err := iprot.ReadFieldEnd(ctx); err != nil { 25682 return err 25683 } 25684 } 25685 if err := iprot.ReadStructEnd(ctx); err != nil { 25686 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 25687 } 25688 return nil 25689 } 25690 25691 func (p *ApplySetPrivilegedResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 25692 if err := oprot.WriteStructBegin(ctx, "set_privileged_result"); err != nil { 25693 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 25694 if p != nil { 25695 } 25696 if err := oprot.WriteFieldStop(ctx); err != nil { 25697 return thrift.PrependError("write field stop error: ", err) } 25698 if err := oprot.WriteStructEnd(ctx); err != nil { 25699 return thrift.PrependError("write struct stop error: ", err) } 25700 return nil 25701 } 25702 25703 func (p *ApplySetPrivilegedResult) String() string { 25704 if p == nil { 25705 return "<nil>" 25706 } 25707 return fmt.Sprintf("ApplySetPrivilegedResult(%+v)", *p) 25708 } 25709 25710 // Attributes: 25711 // - Data 25712 type ApplySetBlockchainParametersPackedArgs struct { 25713 Data []byte `thrift:"data,1" db:"data" json:"data"` 25714 } 25715 25716 func NewApplySetBlockchainParametersPackedArgs() *ApplySetBlockchainParametersPackedArgs { 25717 return &ApplySetBlockchainParametersPackedArgs{} 25718 } 25719 25720 25721 func (p *ApplySetBlockchainParametersPackedArgs) GetData() []byte { 25722 return p.Data 25723 } 25724 func (p *ApplySetBlockchainParametersPackedArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 25725 if _, err := iprot.ReadStructBegin(ctx); err != nil { 25726 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 25727 } 25728 25729 25730 for { 25731 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 25732 if err != nil { 25733 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 25734 } 25735 if fieldTypeId == thrift.STOP { break; } 25736 switch fieldId { 25737 case 1: 25738 if fieldTypeId == thrift.STRING { 25739 if err := p.ReadField1(ctx, iprot); err != nil { 25740 return err 25741 } 25742 } else { 25743 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25744 return err 25745 } 25746 } 25747 default: 25748 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25749 return err 25750 } 25751 } 25752 if err := iprot.ReadFieldEnd(ctx); err != nil { 25753 return err 25754 } 25755 } 25756 if err := iprot.ReadStructEnd(ctx); err != nil { 25757 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 25758 } 25759 return nil 25760 } 25761 25762 func (p *ApplySetBlockchainParametersPackedArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 25763 if v, err := iprot.ReadBinary(ctx); err != nil { 25764 return thrift.PrependError("error reading field 1: ", err) 25765 } else { 25766 p.Data = v 25767 } 25768 return nil 25769 } 25770 25771 func (p *ApplySetBlockchainParametersPackedArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 25772 if err := oprot.WriteStructBegin(ctx, "set_blockchain_parameters_packed_args"); err != nil { 25773 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 25774 if p != nil { 25775 if err := p.writeField1(ctx, oprot); err != nil { return err } 25776 } 25777 if err := oprot.WriteFieldStop(ctx); err != nil { 25778 return thrift.PrependError("write field stop error: ", err) } 25779 if err := oprot.WriteStructEnd(ctx); err != nil { 25780 return thrift.PrependError("write struct stop error: ", err) } 25781 return nil 25782 } 25783 25784 func (p *ApplySetBlockchainParametersPackedArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 25785 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 1); err != nil { 25786 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:data: ", p), err) } 25787 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 25788 return thrift.PrependError(fmt.Sprintf("%T.data (1) field write error: ", p), err) } 25789 if err := oprot.WriteFieldEnd(ctx); err != nil { 25790 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:data: ", p), err) } 25791 return err 25792 } 25793 25794 func (p *ApplySetBlockchainParametersPackedArgs) String() string { 25795 if p == nil { 25796 return "<nil>" 25797 } 25798 return fmt.Sprintf("ApplySetBlockchainParametersPackedArgs(%+v)", *p) 25799 } 25800 25801 type ApplySetBlockchainParametersPackedResult struct { 25802 } 25803 25804 func NewApplySetBlockchainParametersPackedResult() *ApplySetBlockchainParametersPackedResult { 25805 return &ApplySetBlockchainParametersPackedResult{} 25806 } 25807 25808 func (p *ApplySetBlockchainParametersPackedResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 25809 if _, err := iprot.ReadStructBegin(ctx); err != nil { 25810 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 25811 } 25812 25813 25814 for { 25815 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 25816 if err != nil { 25817 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 25818 } 25819 if fieldTypeId == thrift.STOP { break; } 25820 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25821 return err 25822 } 25823 if err := iprot.ReadFieldEnd(ctx); err != nil { 25824 return err 25825 } 25826 } 25827 if err := iprot.ReadStructEnd(ctx); err != nil { 25828 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 25829 } 25830 return nil 25831 } 25832 25833 func (p *ApplySetBlockchainParametersPackedResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 25834 if err := oprot.WriteStructBegin(ctx, "set_blockchain_parameters_packed_result"); err != nil { 25835 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 25836 if p != nil { 25837 } 25838 if err := oprot.WriteFieldStop(ctx); err != nil { 25839 return thrift.PrependError("write field stop error: ", err) } 25840 if err := oprot.WriteStructEnd(ctx); err != nil { 25841 return thrift.PrependError("write struct stop error: ", err) } 25842 return nil 25843 } 25844 25845 func (p *ApplySetBlockchainParametersPackedResult) String() string { 25846 if p == nil { 25847 return "<nil>" 25848 } 25849 return fmt.Sprintf("ApplySetBlockchainParametersPackedResult(%+v)", *p) 25850 } 25851 25852 type ApplyGetBlockchainParametersPackedArgs struct { 25853 } 25854 25855 func NewApplyGetBlockchainParametersPackedArgs() *ApplyGetBlockchainParametersPackedArgs { 25856 return &ApplyGetBlockchainParametersPackedArgs{} 25857 } 25858 25859 func (p *ApplyGetBlockchainParametersPackedArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 25860 if _, err := iprot.ReadStructBegin(ctx); err != nil { 25861 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 25862 } 25863 25864 25865 for { 25866 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 25867 if err != nil { 25868 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 25869 } 25870 if fieldTypeId == thrift.STOP { break; } 25871 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25872 return err 25873 } 25874 if err := iprot.ReadFieldEnd(ctx); err != nil { 25875 return err 25876 } 25877 } 25878 if err := iprot.ReadStructEnd(ctx); err != nil { 25879 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 25880 } 25881 return nil 25882 } 25883 25884 func (p *ApplyGetBlockchainParametersPackedArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 25885 if err := oprot.WriteStructBegin(ctx, "get_blockchain_parameters_packed_args"); err != nil { 25886 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 25887 if p != nil { 25888 } 25889 if err := oprot.WriteFieldStop(ctx); err != nil { 25890 return thrift.PrependError("write field stop error: ", err) } 25891 if err := oprot.WriteStructEnd(ctx); err != nil { 25892 return thrift.PrependError("write struct stop error: ", err) } 25893 return nil 25894 } 25895 25896 func (p *ApplyGetBlockchainParametersPackedArgs) String() string { 25897 if p == nil { 25898 return "<nil>" 25899 } 25900 return fmt.Sprintf("ApplyGetBlockchainParametersPackedArgs(%+v)", *p) 25901 } 25902 25903 // Attributes: 25904 // - Success 25905 type ApplyGetBlockchainParametersPackedResult struct { 25906 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 25907 } 25908 25909 func NewApplyGetBlockchainParametersPackedResult() *ApplyGetBlockchainParametersPackedResult { 25910 return &ApplyGetBlockchainParametersPackedResult{} 25911 } 25912 25913 var ApplyGetBlockchainParametersPackedResult_Success_DEFAULT []byte 25914 25915 func (p *ApplyGetBlockchainParametersPackedResult) GetSuccess() []byte { 25916 return p.Success 25917 } 25918 func (p *ApplyGetBlockchainParametersPackedResult) IsSetSuccess() bool { 25919 return p.Success != nil 25920 } 25921 25922 func (p *ApplyGetBlockchainParametersPackedResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 25923 if _, err := iprot.ReadStructBegin(ctx); err != nil { 25924 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 25925 } 25926 25927 25928 for { 25929 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 25930 if err != nil { 25931 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 25932 } 25933 if fieldTypeId == thrift.STOP { break; } 25934 switch fieldId { 25935 case 0: 25936 if fieldTypeId == thrift.STRING { 25937 if err := p.ReadField0(ctx, iprot); err != nil { 25938 return err 25939 } 25940 } else { 25941 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25942 return err 25943 } 25944 } 25945 default: 25946 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 25947 return err 25948 } 25949 } 25950 if err := iprot.ReadFieldEnd(ctx); err != nil { 25951 return err 25952 } 25953 } 25954 if err := iprot.ReadStructEnd(ctx); err != nil { 25955 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 25956 } 25957 return nil 25958 } 25959 25960 func (p *ApplyGetBlockchainParametersPackedResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 25961 if v, err := iprot.ReadBinary(ctx); err != nil { 25962 return thrift.PrependError("error reading field 0: ", err) 25963 } else { 25964 p.Success = v 25965 } 25966 return nil 25967 } 25968 25969 func (p *ApplyGetBlockchainParametersPackedResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 25970 if err := oprot.WriteStructBegin(ctx, "get_blockchain_parameters_packed_result"); err != nil { 25971 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 25972 if p != nil { 25973 if err := p.writeField0(ctx, oprot); err != nil { return err } 25974 } 25975 if err := oprot.WriteFieldStop(ctx); err != nil { 25976 return thrift.PrependError("write field stop error: ", err) } 25977 if err := oprot.WriteStructEnd(ctx); err != nil { 25978 return thrift.PrependError("write struct stop error: ", err) } 25979 return nil 25980 } 25981 25982 func (p *ApplyGetBlockchainParametersPackedResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 25983 if p.IsSetSuccess() { 25984 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 25985 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 25986 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 25987 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 25988 if err := oprot.WriteFieldEnd(ctx); err != nil { 25989 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 25990 } 25991 return err 25992 } 25993 25994 func (p *ApplyGetBlockchainParametersPackedResult) String() string { 25995 if p == nil { 25996 return "<nil>" 25997 } 25998 return fmt.Sprintf("ApplyGetBlockchainParametersPackedResult(%+v)", *p) 25999 } 26000 26001 // Attributes: 26002 // - FeatureDigest 26003 type ApplyPreactivateFeatureArgs struct { 26004 FeatureDigest []byte `thrift:"feature_digest,1" db:"feature_digest" json:"feature_digest"` 26005 } 26006 26007 func NewApplyPreactivateFeatureArgs() *ApplyPreactivateFeatureArgs { 26008 return &ApplyPreactivateFeatureArgs{} 26009 } 26010 26011 26012 func (p *ApplyPreactivateFeatureArgs) GetFeatureDigest() []byte { 26013 return p.FeatureDigest 26014 } 26015 func (p *ApplyPreactivateFeatureArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 26016 if _, err := iprot.ReadStructBegin(ctx); err != nil { 26017 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 26018 } 26019 26020 26021 for { 26022 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 26023 if err != nil { 26024 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 26025 } 26026 if fieldTypeId == thrift.STOP { break; } 26027 switch fieldId { 26028 case 1: 26029 if fieldTypeId == thrift.STRING { 26030 if err := p.ReadField1(ctx, iprot); err != nil { 26031 return err 26032 } 26033 } else { 26034 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26035 return err 26036 } 26037 } 26038 default: 26039 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26040 return err 26041 } 26042 } 26043 if err := iprot.ReadFieldEnd(ctx); err != nil { 26044 return err 26045 } 26046 } 26047 if err := iprot.ReadStructEnd(ctx); err != nil { 26048 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 26049 } 26050 return nil 26051 } 26052 26053 func (p *ApplyPreactivateFeatureArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 26054 if v, err := iprot.ReadBinary(ctx); err != nil { 26055 return thrift.PrependError("error reading field 1: ", err) 26056 } else { 26057 p.FeatureDigest = v 26058 } 26059 return nil 26060 } 26061 26062 func (p *ApplyPreactivateFeatureArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 26063 if err := oprot.WriteStructBegin(ctx, "preactivate_feature_args"); err != nil { 26064 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 26065 if p != nil { 26066 if err := p.writeField1(ctx, oprot); err != nil { return err } 26067 } 26068 if err := oprot.WriteFieldStop(ctx); err != nil { 26069 return thrift.PrependError("write field stop error: ", err) } 26070 if err := oprot.WriteStructEnd(ctx); err != nil { 26071 return thrift.PrependError("write struct stop error: ", err) } 26072 return nil 26073 } 26074 26075 func (p *ApplyPreactivateFeatureArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 26076 if err := oprot.WriteFieldBegin(ctx, "feature_digest", thrift.STRING, 1); err != nil { 26077 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:feature_digest: ", p), err) } 26078 if err := oprot.WriteBinary(ctx, p.FeatureDigest); err != nil { 26079 return thrift.PrependError(fmt.Sprintf("%T.feature_digest (1) field write error: ", p), err) } 26080 if err := oprot.WriteFieldEnd(ctx); err != nil { 26081 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:feature_digest: ", p), err) } 26082 return err 26083 } 26084 26085 func (p *ApplyPreactivateFeatureArgs) String() string { 26086 if p == nil { 26087 return "<nil>" 26088 } 26089 return fmt.Sprintf("ApplyPreactivateFeatureArgs(%+v)", *p) 26090 } 26091 26092 type ApplyPreactivateFeatureResult struct { 26093 } 26094 26095 func NewApplyPreactivateFeatureResult() *ApplyPreactivateFeatureResult { 26096 return &ApplyPreactivateFeatureResult{} 26097 } 26098 26099 func (p *ApplyPreactivateFeatureResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 26100 if _, err := iprot.ReadStructBegin(ctx); err != nil { 26101 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 26102 } 26103 26104 26105 for { 26106 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 26107 if err != nil { 26108 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 26109 } 26110 if fieldTypeId == thrift.STOP { break; } 26111 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26112 return err 26113 } 26114 if err := iprot.ReadFieldEnd(ctx); err != nil { 26115 return err 26116 } 26117 } 26118 if err := iprot.ReadStructEnd(ctx); err != nil { 26119 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 26120 } 26121 return nil 26122 } 26123 26124 func (p *ApplyPreactivateFeatureResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 26125 if err := oprot.WriteStructBegin(ctx, "preactivate_feature_result"); err != nil { 26126 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 26127 if p != nil { 26128 } 26129 if err := oprot.WriteFieldStop(ctx); err != nil { 26130 return thrift.PrependError("write field stop error: ", err) } 26131 if err := oprot.WriteStructEnd(ctx); err != nil { 26132 return thrift.PrependError("write struct stop error: ", err) } 26133 return nil 26134 } 26135 26136 func (p *ApplyPreactivateFeatureResult) String() string { 26137 if p == nil { 26138 return "<nil>" 26139 } 26140 return fmt.Sprintf("ApplyPreactivateFeatureResult(%+v)", *p) 26141 } 26142 26143 // Attributes: 26144 // - TrxData 26145 // - PubkeysData 26146 // - PermsData 26147 type ApplyCheckTransactionAuthorizationArgs struct { 26148 TrxData []byte `thrift:"trx_data,1" db:"trx_data" json:"trx_data"` 26149 PubkeysData []byte `thrift:"pubkeys_data,2" db:"pubkeys_data" json:"pubkeys_data"` 26150 PermsData []byte `thrift:"perms_data,3" db:"perms_data" json:"perms_data"` 26151 } 26152 26153 func NewApplyCheckTransactionAuthorizationArgs() *ApplyCheckTransactionAuthorizationArgs { 26154 return &ApplyCheckTransactionAuthorizationArgs{} 26155 } 26156 26157 26158 func (p *ApplyCheckTransactionAuthorizationArgs) GetTrxData() []byte { 26159 return p.TrxData 26160 } 26161 26162 func (p *ApplyCheckTransactionAuthorizationArgs) GetPubkeysData() []byte { 26163 return p.PubkeysData 26164 } 26165 26166 func (p *ApplyCheckTransactionAuthorizationArgs) GetPermsData() []byte { 26167 return p.PermsData 26168 } 26169 func (p *ApplyCheckTransactionAuthorizationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 26170 if _, err := iprot.ReadStructBegin(ctx); err != nil { 26171 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 26172 } 26173 26174 26175 for { 26176 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 26177 if err != nil { 26178 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 26179 } 26180 if fieldTypeId == thrift.STOP { break; } 26181 switch fieldId { 26182 case 1: 26183 if fieldTypeId == thrift.STRING { 26184 if err := p.ReadField1(ctx, iprot); err != nil { 26185 return err 26186 } 26187 } else { 26188 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26189 return err 26190 } 26191 } 26192 case 2: 26193 if fieldTypeId == thrift.STRING { 26194 if err := p.ReadField2(ctx, iprot); err != nil { 26195 return err 26196 } 26197 } else { 26198 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26199 return err 26200 } 26201 } 26202 case 3: 26203 if fieldTypeId == thrift.STRING { 26204 if err := p.ReadField3(ctx, iprot); err != nil { 26205 return err 26206 } 26207 } else { 26208 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26209 return err 26210 } 26211 } 26212 default: 26213 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26214 return err 26215 } 26216 } 26217 if err := iprot.ReadFieldEnd(ctx); err != nil { 26218 return err 26219 } 26220 } 26221 if err := iprot.ReadStructEnd(ctx); err != nil { 26222 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 26223 } 26224 return nil 26225 } 26226 26227 func (p *ApplyCheckTransactionAuthorizationArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 26228 if v, err := iprot.ReadBinary(ctx); err != nil { 26229 return thrift.PrependError("error reading field 1: ", err) 26230 } else { 26231 p.TrxData = v 26232 } 26233 return nil 26234 } 26235 26236 func (p *ApplyCheckTransactionAuthorizationArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 26237 if v, err := iprot.ReadBinary(ctx); err != nil { 26238 return thrift.PrependError("error reading field 2: ", err) 26239 } else { 26240 p.PubkeysData = v 26241 } 26242 return nil 26243 } 26244 26245 func (p *ApplyCheckTransactionAuthorizationArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 26246 if v, err := iprot.ReadBinary(ctx); err != nil { 26247 return thrift.PrependError("error reading field 3: ", err) 26248 } else { 26249 p.PermsData = v 26250 } 26251 return nil 26252 } 26253 26254 func (p *ApplyCheckTransactionAuthorizationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 26255 if err := oprot.WriteStructBegin(ctx, "check_transaction_authorization_args"); err != nil { 26256 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 26257 if p != nil { 26258 if err := p.writeField1(ctx, oprot); err != nil { return err } 26259 if err := p.writeField2(ctx, oprot); err != nil { return err } 26260 if err := p.writeField3(ctx, oprot); err != nil { return err } 26261 } 26262 if err := oprot.WriteFieldStop(ctx); err != nil { 26263 return thrift.PrependError("write field stop error: ", err) } 26264 if err := oprot.WriteStructEnd(ctx); err != nil { 26265 return thrift.PrependError("write struct stop error: ", err) } 26266 return nil 26267 } 26268 26269 func (p *ApplyCheckTransactionAuthorizationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 26270 if err := oprot.WriteFieldBegin(ctx, "trx_data", thrift.STRING, 1); err != nil { 26271 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:trx_data: ", p), err) } 26272 if err := oprot.WriteBinary(ctx, p.TrxData); err != nil { 26273 return thrift.PrependError(fmt.Sprintf("%T.trx_data (1) field write error: ", p), err) } 26274 if err := oprot.WriteFieldEnd(ctx); err != nil { 26275 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:trx_data: ", p), err) } 26276 return err 26277 } 26278 26279 func (p *ApplyCheckTransactionAuthorizationArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 26280 if err := oprot.WriteFieldBegin(ctx, "pubkeys_data", thrift.STRING, 2); err != nil { 26281 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:pubkeys_data: ", p), err) } 26282 if err := oprot.WriteBinary(ctx, p.PubkeysData); err != nil { 26283 return thrift.PrependError(fmt.Sprintf("%T.pubkeys_data (2) field write error: ", p), err) } 26284 if err := oprot.WriteFieldEnd(ctx); err != nil { 26285 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:pubkeys_data: ", p), err) } 26286 return err 26287 } 26288 26289 func (p *ApplyCheckTransactionAuthorizationArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 26290 if err := oprot.WriteFieldBegin(ctx, "perms_data", thrift.STRING, 3); err != nil { 26291 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:perms_data: ", p), err) } 26292 if err := oprot.WriteBinary(ctx, p.PermsData); err != nil { 26293 return thrift.PrependError(fmt.Sprintf("%T.perms_data (3) field write error: ", p), err) } 26294 if err := oprot.WriteFieldEnd(ctx); err != nil { 26295 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:perms_data: ", p), err) } 26296 return err 26297 } 26298 26299 func (p *ApplyCheckTransactionAuthorizationArgs) String() string { 26300 if p == nil { 26301 return "<nil>" 26302 } 26303 return fmt.Sprintf("ApplyCheckTransactionAuthorizationArgs(%+v)", *p) 26304 } 26305 26306 // Attributes: 26307 // - Success 26308 type ApplyCheckTransactionAuthorizationResult struct { 26309 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 26310 } 26311 26312 func NewApplyCheckTransactionAuthorizationResult() *ApplyCheckTransactionAuthorizationResult { 26313 return &ApplyCheckTransactionAuthorizationResult{} 26314 } 26315 26316 var ApplyCheckTransactionAuthorizationResult_Success_DEFAULT int32 26317 func (p *ApplyCheckTransactionAuthorizationResult) GetSuccess() int32 { 26318 if !p.IsSetSuccess() { 26319 return ApplyCheckTransactionAuthorizationResult_Success_DEFAULT 26320 } 26321 return *p.Success 26322 } 26323 func (p *ApplyCheckTransactionAuthorizationResult) IsSetSuccess() bool { 26324 return p.Success != nil 26325 } 26326 26327 func (p *ApplyCheckTransactionAuthorizationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 26328 if _, err := iprot.ReadStructBegin(ctx); err != nil { 26329 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 26330 } 26331 26332 26333 for { 26334 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 26335 if err != nil { 26336 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 26337 } 26338 if fieldTypeId == thrift.STOP { break; } 26339 switch fieldId { 26340 case 0: 26341 if fieldTypeId == thrift.I32 { 26342 if err := p.ReadField0(ctx, iprot); err != nil { 26343 return err 26344 } 26345 } else { 26346 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26347 return err 26348 } 26349 } 26350 default: 26351 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26352 return err 26353 } 26354 } 26355 if err := iprot.ReadFieldEnd(ctx); err != nil { 26356 return err 26357 } 26358 } 26359 if err := iprot.ReadStructEnd(ctx); err != nil { 26360 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 26361 } 26362 return nil 26363 } 26364 26365 func (p *ApplyCheckTransactionAuthorizationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 26366 if v, err := iprot.ReadI32(ctx); err != nil { 26367 return thrift.PrependError("error reading field 0: ", err) 26368 } else { 26369 p.Success = &v 26370 } 26371 return nil 26372 } 26373 26374 func (p *ApplyCheckTransactionAuthorizationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 26375 if err := oprot.WriteStructBegin(ctx, "check_transaction_authorization_result"); err != nil { 26376 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 26377 if p != nil { 26378 if err := p.writeField0(ctx, oprot); err != nil { return err } 26379 } 26380 if err := oprot.WriteFieldStop(ctx); err != nil { 26381 return thrift.PrependError("write field stop error: ", err) } 26382 if err := oprot.WriteStructEnd(ctx); err != nil { 26383 return thrift.PrependError("write struct stop error: ", err) } 26384 return nil 26385 } 26386 26387 func (p *ApplyCheckTransactionAuthorizationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 26388 if p.IsSetSuccess() { 26389 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 26390 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 26391 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 26392 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 26393 if err := oprot.WriteFieldEnd(ctx); err != nil { 26394 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 26395 } 26396 return err 26397 } 26398 26399 func (p *ApplyCheckTransactionAuthorizationResult) String() string { 26400 if p == nil { 26401 return "<nil>" 26402 } 26403 return fmt.Sprintf("ApplyCheckTransactionAuthorizationResult(%+v)", *p) 26404 } 26405 26406 // Attributes: 26407 // - Account 26408 // - Permission 26409 // - PubkeysData 26410 // - PermsData 26411 // - DelayUs 26412 type ApplyCheckPermissionAuthorizationArgs struct { 26413 Account *Uint64 `thrift:"account,1" db:"account" json:"account"` 26414 Permission *Uint64 `thrift:"permission,2" db:"permission" json:"permission"` 26415 PubkeysData []byte `thrift:"pubkeys_data,3" db:"pubkeys_data" json:"pubkeys_data"` 26416 PermsData []byte `thrift:"perms_data,4" db:"perms_data" json:"perms_data"` 26417 DelayUs *Uint64 `thrift:"delay_us,5" db:"delay_us" json:"delay_us"` 26418 } 26419 26420 func NewApplyCheckPermissionAuthorizationArgs() *ApplyCheckPermissionAuthorizationArgs { 26421 return &ApplyCheckPermissionAuthorizationArgs{} 26422 } 26423 26424 var ApplyCheckPermissionAuthorizationArgs_Account_DEFAULT *Uint64 26425 func (p *ApplyCheckPermissionAuthorizationArgs) GetAccount() *Uint64 { 26426 if !p.IsSetAccount() { 26427 return ApplyCheckPermissionAuthorizationArgs_Account_DEFAULT 26428 } 26429 return p.Account 26430 } 26431 var ApplyCheckPermissionAuthorizationArgs_Permission_DEFAULT *Uint64 26432 func (p *ApplyCheckPermissionAuthorizationArgs) GetPermission() *Uint64 { 26433 if !p.IsSetPermission() { 26434 return ApplyCheckPermissionAuthorizationArgs_Permission_DEFAULT 26435 } 26436 return p.Permission 26437 } 26438 26439 func (p *ApplyCheckPermissionAuthorizationArgs) GetPubkeysData() []byte { 26440 return p.PubkeysData 26441 } 26442 26443 func (p *ApplyCheckPermissionAuthorizationArgs) GetPermsData() []byte { 26444 return p.PermsData 26445 } 26446 var ApplyCheckPermissionAuthorizationArgs_DelayUs_DEFAULT *Uint64 26447 func (p *ApplyCheckPermissionAuthorizationArgs) GetDelayUs() *Uint64 { 26448 if !p.IsSetDelayUs() { 26449 return ApplyCheckPermissionAuthorizationArgs_DelayUs_DEFAULT 26450 } 26451 return p.DelayUs 26452 } 26453 func (p *ApplyCheckPermissionAuthorizationArgs) IsSetAccount() bool { 26454 return p.Account != nil 26455 } 26456 26457 func (p *ApplyCheckPermissionAuthorizationArgs) IsSetPermission() bool { 26458 return p.Permission != nil 26459 } 26460 26461 func (p *ApplyCheckPermissionAuthorizationArgs) IsSetDelayUs() bool { 26462 return p.DelayUs != nil 26463 } 26464 26465 func (p *ApplyCheckPermissionAuthorizationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 26466 if _, err := iprot.ReadStructBegin(ctx); err != nil { 26467 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 26468 } 26469 26470 26471 for { 26472 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 26473 if err != nil { 26474 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 26475 } 26476 if fieldTypeId == thrift.STOP { break; } 26477 switch fieldId { 26478 case 1: 26479 if fieldTypeId == thrift.STRUCT { 26480 if err := p.ReadField1(ctx, iprot); err != nil { 26481 return err 26482 } 26483 } else { 26484 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26485 return err 26486 } 26487 } 26488 case 2: 26489 if fieldTypeId == thrift.STRUCT { 26490 if err := p.ReadField2(ctx, iprot); err != nil { 26491 return err 26492 } 26493 } else { 26494 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26495 return err 26496 } 26497 } 26498 case 3: 26499 if fieldTypeId == thrift.STRING { 26500 if err := p.ReadField3(ctx, iprot); err != nil { 26501 return err 26502 } 26503 } else { 26504 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26505 return err 26506 } 26507 } 26508 case 4: 26509 if fieldTypeId == thrift.STRING { 26510 if err := p.ReadField4(ctx, iprot); err != nil { 26511 return err 26512 } 26513 } else { 26514 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26515 return err 26516 } 26517 } 26518 case 5: 26519 if fieldTypeId == thrift.STRUCT { 26520 if err := p.ReadField5(ctx, iprot); err != nil { 26521 return err 26522 } 26523 } else { 26524 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26525 return err 26526 } 26527 } 26528 default: 26529 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26530 return err 26531 } 26532 } 26533 if err := iprot.ReadFieldEnd(ctx); err != nil { 26534 return err 26535 } 26536 } 26537 if err := iprot.ReadStructEnd(ctx); err != nil { 26538 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 26539 } 26540 return nil 26541 } 26542 26543 func (p *ApplyCheckPermissionAuthorizationArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 26544 p.Account = &Uint64{} 26545 if err := p.Account.Read(ctx, iprot); err != nil { 26546 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Account), err) 26547 } 26548 return nil 26549 } 26550 26551 func (p *ApplyCheckPermissionAuthorizationArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 26552 p.Permission = &Uint64{} 26553 if err := p.Permission.Read(ctx, iprot); err != nil { 26554 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Permission), err) 26555 } 26556 return nil 26557 } 26558 26559 func (p *ApplyCheckPermissionAuthorizationArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 26560 if v, err := iprot.ReadBinary(ctx); err != nil { 26561 return thrift.PrependError("error reading field 3: ", err) 26562 } else { 26563 p.PubkeysData = v 26564 } 26565 return nil 26566 } 26567 26568 func (p *ApplyCheckPermissionAuthorizationArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 26569 if v, err := iprot.ReadBinary(ctx); err != nil { 26570 return thrift.PrependError("error reading field 4: ", err) 26571 } else { 26572 p.PermsData = v 26573 } 26574 return nil 26575 } 26576 26577 func (p *ApplyCheckPermissionAuthorizationArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 26578 p.DelayUs = &Uint64{} 26579 if err := p.DelayUs.Read(ctx, iprot); err != nil { 26580 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DelayUs), err) 26581 } 26582 return nil 26583 } 26584 26585 func (p *ApplyCheckPermissionAuthorizationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 26586 if err := oprot.WriteStructBegin(ctx, "check_permission_authorization_args"); err != nil { 26587 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 26588 if p != nil { 26589 if err := p.writeField1(ctx, oprot); err != nil { return err } 26590 if err := p.writeField2(ctx, oprot); err != nil { return err } 26591 if err := p.writeField3(ctx, oprot); err != nil { return err } 26592 if err := p.writeField4(ctx, oprot); err != nil { return err } 26593 if err := p.writeField5(ctx, oprot); err != nil { return err } 26594 } 26595 if err := oprot.WriteFieldStop(ctx); err != nil { 26596 return thrift.PrependError("write field stop error: ", err) } 26597 if err := oprot.WriteStructEnd(ctx); err != nil { 26598 return thrift.PrependError("write struct stop error: ", err) } 26599 return nil 26600 } 26601 26602 func (p *ApplyCheckPermissionAuthorizationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 26603 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRUCT, 1); err != nil { 26604 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:account: ", p), err) } 26605 if err := p.Account.Write(ctx, oprot); err != nil { 26606 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Account), err) 26607 } 26608 if err := oprot.WriteFieldEnd(ctx); err != nil { 26609 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:account: ", p), err) } 26610 return err 26611 } 26612 26613 func (p *ApplyCheckPermissionAuthorizationArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 26614 if err := oprot.WriteFieldBegin(ctx, "permission", thrift.STRUCT, 2); err != nil { 26615 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:permission: ", p), err) } 26616 if err := p.Permission.Write(ctx, oprot); err != nil { 26617 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Permission), err) 26618 } 26619 if err := oprot.WriteFieldEnd(ctx); err != nil { 26620 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:permission: ", p), err) } 26621 return err 26622 } 26623 26624 func (p *ApplyCheckPermissionAuthorizationArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 26625 if err := oprot.WriteFieldBegin(ctx, "pubkeys_data", thrift.STRING, 3); err != nil { 26626 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:pubkeys_data: ", p), err) } 26627 if err := oprot.WriteBinary(ctx, p.PubkeysData); err != nil { 26628 return thrift.PrependError(fmt.Sprintf("%T.pubkeys_data (3) field write error: ", p), err) } 26629 if err := oprot.WriteFieldEnd(ctx); err != nil { 26630 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:pubkeys_data: ", p), err) } 26631 return err 26632 } 26633 26634 func (p *ApplyCheckPermissionAuthorizationArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 26635 if err := oprot.WriteFieldBegin(ctx, "perms_data", thrift.STRING, 4); err != nil { 26636 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:perms_data: ", p), err) } 26637 if err := oprot.WriteBinary(ctx, p.PermsData); err != nil { 26638 return thrift.PrependError(fmt.Sprintf("%T.perms_data (4) field write error: ", p), err) } 26639 if err := oprot.WriteFieldEnd(ctx); err != nil { 26640 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:perms_data: ", p), err) } 26641 return err 26642 } 26643 26644 func (p *ApplyCheckPermissionAuthorizationArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 26645 if err := oprot.WriteFieldBegin(ctx, "delay_us", thrift.STRUCT, 5); err != nil { 26646 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:delay_us: ", p), err) } 26647 if err := p.DelayUs.Write(ctx, oprot); err != nil { 26648 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DelayUs), err) 26649 } 26650 if err := oprot.WriteFieldEnd(ctx); err != nil { 26651 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:delay_us: ", p), err) } 26652 return err 26653 } 26654 26655 func (p *ApplyCheckPermissionAuthorizationArgs) String() string { 26656 if p == nil { 26657 return "<nil>" 26658 } 26659 return fmt.Sprintf("ApplyCheckPermissionAuthorizationArgs(%+v)", *p) 26660 } 26661 26662 // Attributes: 26663 // - Success 26664 type ApplyCheckPermissionAuthorizationResult struct { 26665 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 26666 } 26667 26668 func NewApplyCheckPermissionAuthorizationResult() *ApplyCheckPermissionAuthorizationResult { 26669 return &ApplyCheckPermissionAuthorizationResult{} 26670 } 26671 26672 var ApplyCheckPermissionAuthorizationResult_Success_DEFAULT int32 26673 func (p *ApplyCheckPermissionAuthorizationResult) GetSuccess() int32 { 26674 if !p.IsSetSuccess() { 26675 return ApplyCheckPermissionAuthorizationResult_Success_DEFAULT 26676 } 26677 return *p.Success 26678 } 26679 func (p *ApplyCheckPermissionAuthorizationResult) IsSetSuccess() bool { 26680 return p.Success != nil 26681 } 26682 26683 func (p *ApplyCheckPermissionAuthorizationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 26684 if _, err := iprot.ReadStructBegin(ctx); err != nil { 26685 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 26686 } 26687 26688 26689 for { 26690 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 26691 if err != nil { 26692 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 26693 } 26694 if fieldTypeId == thrift.STOP { break; } 26695 switch fieldId { 26696 case 0: 26697 if fieldTypeId == thrift.I32 { 26698 if err := p.ReadField0(ctx, iprot); err != nil { 26699 return err 26700 } 26701 } else { 26702 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26703 return err 26704 } 26705 } 26706 default: 26707 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26708 return err 26709 } 26710 } 26711 if err := iprot.ReadFieldEnd(ctx); err != nil { 26712 return err 26713 } 26714 } 26715 if err := iprot.ReadStructEnd(ctx); err != nil { 26716 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 26717 } 26718 return nil 26719 } 26720 26721 func (p *ApplyCheckPermissionAuthorizationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 26722 if v, err := iprot.ReadI32(ctx); err != nil { 26723 return thrift.PrependError("error reading field 0: ", err) 26724 } else { 26725 p.Success = &v 26726 } 26727 return nil 26728 } 26729 26730 func (p *ApplyCheckPermissionAuthorizationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 26731 if err := oprot.WriteStructBegin(ctx, "check_permission_authorization_result"); err != nil { 26732 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 26733 if p != nil { 26734 if err := p.writeField0(ctx, oprot); err != nil { return err } 26735 } 26736 if err := oprot.WriteFieldStop(ctx); err != nil { 26737 return thrift.PrependError("write field stop error: ", err) } 26738 if err := oprot.WriteStructEnd(ctx); err != nil { 26739 return thrift.PrependError("write struct stop error: ", err) } 26740 return nil 26741 } 26742 26743 func (p *ApplyCheckPermissionAuthorizationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 26744 if p.IsSetSuccess() { 26745 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 26746 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 26747 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 26748 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 26749 if err := oprot.WriteFieldEnd(ctx); err != nil { 26750 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 26751 } 26752 return err 26753 } 26754 26755 func (p *ApplyCheckPermissionAuthorizationResult) String() string { 26756 if p == nil { 26757 return "<nil>" 26758 } 26759 return fmt.Sprintf("ApplyCheckPermissionAuthorizationResult(%+v)", *p) 26760 } 26761 26762 // Attributes: 26763 // - Account 26764 // - Permission 26765 type ApplyGetPermissionLastUsedArgs struct { 26766 Account *Uint64 `thrift:"account,1" db:"account" json:"account"` 26767 Permission *Uint64 `thrift:"permission,2" db:"permission" json:"permission"` 26768 } 26769 26770 func NewApplyGetPermissionLastUsedArgs() *ApplyGetPermissionLastUsedArgs { 26771 return &ApplyGetPermissionLastUsedArgs{} 26772 } 26773 26774 var ApplyGetPermissionLastUsedArgs_Account_DEFAULT *Uint64 26775 func (p *ApplyGetPermissionLastUsedArgs) GetAccount() *Uint64 { 26776 if !p.IsSetAccount() { 26777 return ApplyGetPermissionLastUsedArgs_Account_DEFAULT 26778 } 26779 return p.Account 26780 } 26781 var ApplyGetPermissionLastUsedArgs_Permission_DEFAULT *Uint64 26782 func (p *ApplyGetPermissionLastUsedArgs) GetPermission() *Uint64 { 26783 if !p.IsSetPermission() { 26784 return ApplyGetPermissionLastUsedArgs_Permission_DEFAULT 26785 } 26786 return p.Permission 26787 } 26788 func (p *ApplyGetPermissionLastUsedArgs) IsSetAccount() bool { 26789 return p.Account != nil 26790 } 26791 26792 func (p *ApplyGetPermissionLastUsedArgs) IsSetPermission() bool { 26793 return p.Permission != nil 26794 } 26795 26796 func (p *ApplyGetPermissionLastUsedArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 26797 if _, err := iprot.ReadStructBegin(ctx); err != nil { 26798 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 26799 } 26800 26801 26802 for { 26803 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 26804 if err != nil { 26805 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 26806 } 26807 if fieldTypeId == thrift.STOP { break; } 26808 switch fieldId { 26809 case 1: 26810 if fieldTypeId == thrift.STRUCT { 26811 if err := p.ReadField1(ctx, iprot); err != nil { 26812 return err 26813 } 26814 } else { 26815 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26816 return err 26817 } 26818 } 26819 case 2: 26820 if fieldTypeId == thrift.STRUCT { 26821 if err := p.ReadField2(ctx, iprot); err != nil { 26822 return err 26823 } 26824 } else { 26825 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26826 return err 26827 } 26828 } 26829 default: 26830 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26831 return err 26832 } 26833 } 26834 if err := iprot.ReadFieldEnd(ctx); err != nil { 26835 return err 26836 } 26837 } 26838 if err := iprot.ReadStructEnd(ctx); err != nil { 26839 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 26840 } 26841 return nil 26842 } 26843 26844 func (p *ApplyGetPermissionLastUsedArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 26845 p.Account = &Uint64{} 26846 if err := p.Account.Read(ctx, iprot); err != nil { 26847 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Account), err) 26848 } 26849 return nil 26850 } 26851 26852 func (p *ApplyGetPermissionLastUsedArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 26853 p.Permission = &Uint64{} 26854 if err := p.Permission.Read(ctx, iprot); err != nil { 26855 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Permission), err) 26856 } 26857 return nil 26858 } 26859 26860 func (p *ApplyGetPermissionLastUsedArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 26861 if err := oprot.WriteStructBegin(ctx, "get_permission_last_used_args"); err != nil { 26862 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 26863 if p != nil { 26864 if err := p.writeField1(ctx, oprot); err != nil { return err } 26865 if err := p.writeField2(ctx, oprot); err != nil { return err } 26866 } 26867 if err := oprot.WriteFieldStop(ctx); err != nil { 26868 return thrift.PrependError("write field stop error: ", err) } 26869 if err := oprot.WriteStructEnd(ctx); err != nil { 26870 return thrift.PrependError("write struct stop error: ", err) } 26871 return nil 26872 } 26873 26874 func (p *ApplyGetPermissionLastUsedArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 26875 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRUCT, 1); err != nil { 26876 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:account: ", p), err) } 26877 if err := p.Account.Write(ctx, oprot); err != nil { 26878 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Account), err) 26879 } 26880 if err := oprot.WriteFieldEnd(ctx); err != nil { 26881 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:account: ", p), err) } 26882 return err 26883 } 26884 26885 func (p *ApplyGetPermissionLastUsedArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 26886 if err := oprot.WriteFieldBegin(ctx, "permission", thrift.STRUCT, 2); err != nil { 26887 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:permission: ", p), err) } 26888 if err := p.Permission.Write(ctx, oprot); err != nil { 26889 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Permission), err) 26890 } 26891 if err := oprot.WriteFieldEnd(ctx); err != nil { 26892 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:permission: ", p), err) } 26893 return err 26894 } 26895 26896 func (p *ApplyGetPermissionLastUsedArgs) String() string { 26897 if p == nil { 26898 return "<nil>" 26899 } 26900 return fmt.Sprintf("ApplyGetPermissionLastUsedArgs(%+v)", *p) 26901 } 26902 26903 // Attributes: 26904 // - Success 26905 type ApplyGetPermissionLastUsedResult struct { 26906 Success *int64 `thrift:"success,0" db:"success" json:"success,omitempty"` 26907 } 26908 26909 func NewApplyGetPermissionLastUsedResult() *ApplyGetPermissionLastUsedResult { 26910 return &ApplyGetPermissionLastUsedResult{} 26911 } 26912 26913 var ApplyGetPermissionLastUsedResult_Success_DEFAULT int64 26914 func (p *ApplyGetPermissionLastUsedResult) GetSuccess() int64 { 26915 if !p.IsSetSuccess() { 26916 return ApplyGetPermissionLastUsedResult_Success_DEFAULT 26917 } 26918 return *p.Success 26919 } 26920 func (p *ApplyGetPermissionLastUsedResult) IsSetSuccess() bool { 26921 return p.Success != nil 26922 } 26923 26924 func (p *ApplyGetPermissionLastUsedResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 26925 if _, err := iprot.ReadStructBegin(ctx); err != nil { 26926 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 26927 } 26928 26929 26930 for { 26931 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 26932 if err != nil { 26933 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 26934 } 26935 if fieldTypeId == thrift.STOP { break; } 26936 switch fieldId { 26937 case 0: 26938 if fieldTypeId == thrift.I64 { 26939 if err := p.ReadField0(ctx, iprot); err != nil { 26940 return err 26941 } 26942 } else { 26943 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26944 return err 26945 } 26946 } 26947 default: 26948 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 26949 return err 26950 } 26951 } 26952 if err := iprot.ReadFieldEnd(ctx); err != nil { 26953 return err 26954 } 26955 } 26956 if err := iprot.ReadStructEnd(ctx); err != nil { 26957 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 26958 } 26959 return nil 26960 } 26961 26962 func (p *ApplyGetPermissionLastUsedResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 26963 if v, err := iprot.ReadI64(ctx); err != nil { 26964 return thrift.PrependError("error reading field 0: ", err) 26965 } else { 26966 p.Success = &v 26967 } 26968 return nil 26969 } 26970 26971 func (p *ApplyGetPermissionLastUsedResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 26972 if err := oprot.WriteStructBegin(ctx, "get_permission_last_used_result"); err != nil { 26973 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 26974 if p != nil { 26975 if err := p.writeField0(ctx, oprot); err != nil { return err } 26976 } 26977 if err := oprot.WriteFieldStop(ctx); err != nil { 26978 return thrift.PrependError("write field stop error: ", err) } 26979 if err := oprot.WriteStructEnd(ctx); err != nil { 26980 return thrift.PrependError("write struct stop error: ", err) } 26981 return nil 26982 } 26983 26984 func (p *ApplyGetPermissionLastUsedResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 26985 if p.IsSetSuccess() { 26986 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I64, 0); err != nil { 26987 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 26988 if err := oprot.WriteI64(ctx, int64(*p.Success)); err != nil { 26989 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 26990 if err := oprot.WriteFieldEnd(ctx); err != nil { 26991 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 26992 } 26993 return err 26994 } 26995 26996 func (p *ApplyGetPermissionLastUsedResult) String() string { 26997 if p == nil { 26998 return "<nil>" 26999 } 27000 return fmt.Sprintf("ApplyGetPermissionLastUsedResult(%+v)", *p) 27001 } 27002 27003 // Attributes: 27004 // - Account 27005 type ApplyGetAccountCreationTimeArgs struct { 27006 Account *Uint64 `thrift:"account,1" db:"account" json:"account"` 27007 } 27008 27009 func NewApplyGetAccountCreationTimeArgs() *ApplyGetAccountCreationTimeArgs { 27010 return &ApplyGetAccountCreationTimeArgs{} 27011 } 27012 27013 var ApplyGetAccountCreationTimeArgs_Account_DEFAULT *Uint64 27014 func (p *ApplyGetAccountCreationTimeArgs) GetAccount() *Uint64 { 27015 if !p.IsSetAccount() { 27016 return ApplyGetAccountCreationTimeArgs_Account_DEFAULT 27017 } 27018 return p.Account 27019 } 27020 func (p *ApplyGetAccountCreationTimeArgs) IsSetAccount() bool { 27021 return p.Account != nil 27022 } 27023 27024 func (p *ApplyGetAccountCreationTimeArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 27025 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27026 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27027 } 27028 27029 27030 for { 27031 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27032 if err != nil { 27033 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27034 } 27035 if fieldTypeId == thrift.STOP { break; } 27036 switch fieldId { 27037 case 1: 27038 if fieldTypeId == thrift.STRUCT { 27039 if err := p.ReadField1(ctx, iprot); err != nil { 27040 return err 27041 } 27042 } else { 27043 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27044 return err 27045 } 27046 } 27047 default: 27048 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27049 return err 27050 } 27051 } 27052 if err := iprot.ReadFieldEnd(ctx); err != nil { 27053 return err 27054 } 27055 } 27056 if err := iprot.ReadStructEnd(ctx); err != nil { 27057 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27058 } 27059 return nil 27060 } 27061 27062 func (p *ApplyGetAccountCreationTimeArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 27063 p.Account = &Uint64{} 27064 if err := p.Account.Read(ctx, iprot); err != nil { 27065 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Account), err) 27066 } 27067 return nil 27068 } 27069 27070 func (p *ApplyGetAccountCreationTimeArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 27071 if err := oprot.WriteStructBegin(ctx, "get_account_creation_time_args"); err != nil { 27072 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27073 if p != nil { 27074 if err := p.writeField1(ctx, oprot); err != nil { return err } 27075 } 27076 if err := oprot.WriteFieldStop(ctx); err != nil { 27077 return thrift.PrependError("write field stop error: ", err) } 27078 if err := oprot.WriteStructEnd(ctx); err != nil { 27079 return thrift.PrependError("write struct stop error: ", err) } 27080 return nil 27081 } 27082 27083 func (p *ApplyGetAccountCreationTimeArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 27084 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRUCT, 1); err != nil { 27085 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:account: ", p), err) } 27086 if err := p.Account.Write(ctx, oprot); err != nil { 27087 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Account), err) 27088 } 27089 if err := oprot.WriteFieldEnd(ctx); err != nil { 27090 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:account: ", p), err) } 27091 return err 27092 } 27093 27094 func (p *ApplyGetAccountCreationTimeArgs) String() string { 27095 if p == nil { 27096 return "<nil>" 27097 } 27098 return fmt.Sprintf("ApplyGetAccountCreationTimeArgs(%+v)", *p) 27099 } 27100 27101 // Attributes: 27102 // - Success 27103 type ApplyGetAccountCreationTimeResult struct { 27104 Success *int64 `thrift:"success,0" db:"success" json:"success,omitempty"` 27105 } 27106 27107 func NewApplyGetAccountCreationTimeResult() *ApplyGetAccountCreationTimeResult { 27108 return &ApplyGetAccountCreationTimeResult{} 27109 } 27110 27111 var ApplyGetAccountCreationTimeResult_Success_DEFAULT int64 27112 func (p *ApplyGetAccountCreationTimeResult) GetSuccess() int64 { 27113 if !p.IsSetSuccess() { 27114 return ApplyGetAccountCreationTimeResult_Success_DEFAULT 27115 } 27116 return *p.Success 27117 } 27118 func (p *ApplyGetAccountCreationTimeResult) IsSetSuccess() bool { 27119 return p.Success != nil 27120 } 27121 27122 func (p *ApplyGetAccountCreationTimeResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 27123 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27124 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27125 } 27126 27127 27128 for { 27129 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27130 if err != nil { 27131 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27132 } 27133 if fieldTypeId == thrift.STOP { break; } 27134 switch fieldId { 27135 case 0: 27136 if fieldTypeId == thrift.I64 { 27137 if err := p.ReadField0(ctx, iprot); err != nil { 27138 return err 27139 } 27140 } else { 27141 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27142 return err 27143 } 27144 } 27145 default: 27146 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27147 return err 27148 } 27149 } 27150 if err := iprot.ReadFieldEnd(ctx); err != nil { 27151 return err 27152 } 27153 } 27154 if err := iprot.ReadStructEnd(ctx); err != nil { 27155 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27156 } 27157 return nil 27158 } 27159 27160 func (p *ApplyGetAccountCreationTimeResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 27161 if v, err := iprot.ReadI64(ctx); err != nil { 27162 return thrift.PrependError("error reading field 0: ", err) 27163 } else { 27164 p.Success = &v 27165 } 27166 return nil 27167 } 27168 27169 func (p *ApplyGetAccountCreationTimeResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 27170 if err := oprot.WriteStructBegin(ctx, "get_account_creation_time_result"); err != nil { 27171 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27172 if p != nil { 27173 if err := p.writeField0(ctx, oprot); err != nil { return err } 27174 } 27175 if err := oprot.WriteFieldStop(ctx); err != nil { 27176 return thrift.PrependError("write field stop error: ", err) } 27177 if err := oprot.WriteStructEnd(ctx); err != nil { 27178 return thrift.PrependError("write struct stop error: ", err) } 27179 return nil 27180 } 27181 27182 func (p *ApplyGetAccountCreationTimeResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 27183 if p.IsSetSuccess() { 27184 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I64, 0); err != nil { 27185 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 27186 if err := oprot.WriteI64(ctx, int64(*p.Success)); err != nil { 27187 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 27188 if err := oprot.WriteFieldEnd(ctx); err != nil { 27189 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 27190 } 27191 return err 27192 } 27193 27194 func (p *ApplyGetAccountCreationTimeResult) String() string { 27195 if p == nil { 27196 return "<nil>" 27197 } 27198 return fmt.Sprintf("ApplyGetAccountCreationTimeResult(%+v)", *p) 27199 } 27200 27201 // Attributes: 27202 // - Cstr 27203 type ApplyPrintsArgs struct { 27204 Cstr string `thrift:"cstr,1" db:"cstr" json:"cstr"` 27205 } 27206 27207 func NewApplyPrintsArgs() *ApplyPrintsArgs { 27208 return &ApplyPrintsArgs{} 27209 } 27210 27211 27212 func (p *ApplyPrintsArgs) GetCstr() string { 27213 return p.Cstr 27214 } 27215 func (p *ApplyPrintsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 27216 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27217 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27218 } 27219 27220 27221 for { 27222 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27223 if err != nil { 27224 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27225 } 27226 if fieldTypeId == thrift.STOP { break; } 27227 switch fieldId { 27228 case 1: 27229 if fieldTypeId == thrift.STRING { 27230 if err := p.ReadField1(ctx, iprot); err != nil { 27231 return err 27232 } 27233 } else { 27234 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27235 return err 27236 } 27237 } 27238 default: 27239 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27240 return err 27241 } 27242 } 27243 if err := iprot.ReadFieldEnd(ctx); err != nil { 27244 return err 27245 } 27246 } 27247 if err := iprot.ReadStructEnd(ctx); err != nil { 27248 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27249 } 27250 return nil 27251 } 27252 27253 func (p *ApplyPrintsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 27254 if v, err := iprot.ReadString(ctx); err != nil { 27255 return thrift.PrependError("error reading field 1: ", err) 27256 } else { 27257 p.Cstr = v 27258 } 27259 return nil 27260 } 27261 27262 func (p *ApplyPrintsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 27263 if err := oprot.WriteStructBegin(ctx, "prints_args"); err != nil { 27264 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27265 if p != nil { 27266 if err := p.writeField1(ctx, oprot); err != nil { return err } 27267 } 27268 if err := oprot.WriteFieldStop(ctx); err != nil { 27269 return thrift.PrependError("write field stop error: ", err) } 27270 if err := oprot.WriteStructEnd(ctx); err != nil { 27271 return thrift.PrependError("write struct stop error: ", err) } 27272 return nil 27273 } 27274 27275 func (p *ApplyPrintsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 27276 if err := oprot.WriteFieldBegin(ctx, "cstr", thrift.STRING, 1); err != nil { 27277 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:cstr: ", p), err) } 27278 if err := oprot.WriteString(ctx, string(p.Cstr)); err != nil { 27279 return thrift.PrependError(fmt.Sprintf("%T.cstr (1) field write error: ", p), err) } 27280 if err := oprot.WriteFieldEnd(ctx); err != nil { 27281 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:cstr: ", p), err) } 27282 return err 27283 } 27284 27285 func (p *ApplyPrintsArgs) String() string { 27286 if p == nil { 27287 return "<nil>" 27288 } 27289 return fmt.Sprintf("ApplyPrintsArgs(%+v)", *p) 27290 } 27291 27292 type ApplyPrintsResult struct { 27293 } 27294 27295 func NewApplyPrintsResult() *ApplyPrintsResult { 27296 return &ApplyPrintsResult{} 27297 } 27298 27299 func (p *ApplyPrintsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 27300 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27301 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27302 } 27303 27304 27305 for { 27306 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27307 if err != nil { 27308 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27309 } 27310 if fieldTypeId == thrift.STOP { break; } 27311 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27312 return err 27313 } 27314 if err := iprot.ReadFieldEnd(ctx); err != nil { 27315 return err 27316 } 27317 } 27318 if err := iprot.ReadStructEnd(ctx); err != nil { 27319 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27320 } 27321 return nil 27322 } 27323 27324 func (p *ApplyPrintsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 27325 if err := oprot.WriteStructBegin(ctx, "prints_result"); err != nil { 27326 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27327 if p != nil { 27328 } 27329 if err := oprot.WriteFieldStop(ctx); err != nil { 27330 return thrift.PrependError("write field stop error: ", err) } 27331 if err := oprot.WriteStructEnd(ctx); err != nil { 27332 return thrift.PrependError("write struct stop error: ", err) } 27333 return nil 27334 } 27335 27336 func (p *ApplyPrintsResult) String() string { 27337 if p == nil { 27338 return "<nil>" 27339 } 27340 return fmt.Sprintf("ApplyPrintsResult(%+v)", *p) 27341 } 27342 27343 // Attributes: 27344 // - Cstr 27345 type ApplyPrintsLArgs struct { 27346 Cstr []byte `thrift:"cstr,1" db:"cstr" json:"cstr"` 27347 } 27348 27349 func NewApplyPrintsLArgs() *ApplyPrintsLArgs { 27350 return &ApplyPrintsLArgs{} 27351 } 27352 27353 27354 func (p *ApplyPrintsLArgs) GetCstr() []byte { 27355 return p.Cstr 27356 } 27357 func (p *ApplyPrintsLArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 27358 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27359 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27360 } 27361 27362 27363 for { 27364 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27365 if err != nil { 27366 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27367 } 27368 if fieldTypeId == thrift.STOP { break; } 27369 switch fieldId { 27370 case 1: 27371 if fieldTypeId == thrift.STRING { 27372 if err := p.ReadField1(ctx, iprot); err != nil { 27373 return err 27374 } 27375 } else { 27376 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27377 return err 27378 } 27379 } 27380 default: 27381 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27382 return err 27383 } 27384 } 27385 if err := iprot.ReadFieldEnd(ctx); err != nil { 27386 return err 27387 } 27388 } 27389 if err := iprot.ReadStructEnd(ctx); err != nil { 27390 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27391 } 27392 return nil 27393 } 27394 27395 func (p *ApplyPrintsLArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 27396 if v, err := iprot.ReadBinary(ctx); err != nil { 27397 return thrift.PrependError("error reading field 1: ", err) 27398 } else { 27399 p.Cstr = v 27400 } 27401 return nil 27402 } 27403 27404 func (p *ApplyPrintsLArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 27405 if err := oprot.WriteStructBegin(ctx, "prints_l_args"); err != nil { 27406 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27407 if p != nil { 27408 if err := p.writeField1(ctx, oprot); err != nil { return err } 27409 } 27410 if err := oprot.WriteFieldStop(ctx); err != nil { 27411 return thrift.PrependError("write field stop error: ", err) } 27412 if err := oprot.WriteStructEnd(ctx); err != nil { 27413 return thrift.PrependError("write struct stop error: ", err) } 27414 return nil 27415 } 27416 27417 func (p *ApplyPrintsLArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 27418 if err := oprot.WriteFieldBegin(ctx, "cstr", thrift.STRING, 1); err != nil { 27419 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:cstr: ", p), err) } 27420 if err := oprot.WriteBinary(ctx, p.Cstr); err != nil { 27421 return thrift.PrependError(fmt.Sprintf("%T.cstr (1) field write error: ", p), err) } 27422 if err := oprot.WriteFieldEnd(ctx); err != nil { 27423 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:cstr: ", p), err) } 27424 return err 27425 } 27426 27427 func (p *ApplyPrintsLArgs) String() string { 27428 if p == nil { 27429 return "<nil>" 27430 } 27431 return fmt.Sprintf("ApplyPrintsLArgs(%+v)", *p) 27432 } 27433 27434 type ApplyPrintsLResult struct { 27435 } 27436 27437 func NewApplyPrintsLResult() *ApplyPrintsLResult { 27438 return &ApplyPrintsLResult{} 27439 } 27440 27441 func (p *ApplyPrintsLResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 27442 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27443 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27444 } 27445 27446 27447 for { 27448 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27449 if err != nil { 27450 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27451 } 27452 if fieldTypeId == thrift.STOP { break; } 27453 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27454 return err 27455 } 27456 if err := iprot.ReadFieldEnd(ctx); err != nil { 27457 return err 27458 } 27459 } 27460 if err := iprot.ReadStructEnd(ctx); err != nil { 27461 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27462 } 27463 return nil 27464 } 27465 27466 func (p *ApplyPrintsLResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 27467 if err := oprot.WriteStructBegin(ctx, "prints_l_result"); err != nil { 27468 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27469 if p != nil { 27470 } 27471 if err := oprot.WriteFieldStop(ctx); err != nil { 27472 return thrift.PrependError("write field stop error: ", err) } 27473 if err := oprot.WriteStructEnd(ctx); err != nil { 27474 return thrift.PrependError("write struct stop error: ", err) } 27475 return nil 27476 } 27477 27478 func (p *ApplyPrintsLResult) String() string { 27479 if p == nil { 27480 return "<nil>" 27481 } 27482 return fmt.Sprintf("ApplyPrintsLResult(%+v)", *p) 27483 } 27484 27485 // Attributes: 27486 // - N 27487 type ApplyPrintiArgs struct { 27488 N int64 `thrift:"n,1" db:"n" json:"n"` 27489 } 27490 27491 func NewApplyPrintiArgs() *ApplyPrintiArgs { 27492 return &ApplyPrintiArgs{} 27493 } 27494 27495 27496 func (p *ApplyPrintiArgs) GetN() int64 { 27497 return p.N 27498 } 27499 func (p *ApplyPrintiArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 27500 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27501 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27502 } 27503 27504 27505 for { 27506 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27507 if err != nil { 27508 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27509 } 27510 if fieldTypeId == thrift.STOP { break; } 27511 switch fieldId { 27512 case 1: 27513 if fieldTypeId == thrift.I64 { 27514 if err := p.ReadField1(ctx, iprot); err != nil { 27515 return err 27516 } 27517 } else { 27518 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27519 return err 27520 } 27521 } 27522 default: 27523 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27524 return err 27525 } 27526 } 27527 if err := iprot.ReadFieldEnd(ctx); err != nil { 27528 return err 27529 } 27530 } 27531 if err := iprot.ReadStructEnd(ctx); err != nil { 27532 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27533 } 27534 return nil 27535 } 27536 27537 func (p *ApplyPrintiArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 27538 if v, err := iprot.ReadI64(ctx); err != nil { 27539 return thrift.PrependError("error reading field 1: ", err) 27540 } else { 27541 p.N = v 27542 } 27543 return nil 27544 } 27545 27546 func (p *ApplyPrintiArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 27547 if err := oprot.WriteStructBegin(ctx, "printi_args"); err != nil { 27548 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27549 if p != nil { 27550 if err := p.writeField1(ctx, oprot); err != nil { return err } 27551 } 27552 if err := oprot.WriteFieldStop(ctx); err != nil { 27553 return thrift.PrependError("write field stop error: ", err) } 27554 if err := oprot.WriteStructEnd(ctx); err != nil { 27555 return thrift.PrependError("write struct stop error: ", err) } 27556 return nil 27557 } 27558 27559 func (p *ApplyPrintiArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 27560 if err := oprot.WriteFieldBegin(ctx, "n", thrift.I64, 1); err != nil { 27561 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:n: ", p), err) } 27562 if err := oprot.WriteI64(ctx, int64(p.N)); err != nil { 27563 return thrift.PrependError(fmt.Sprintf("%T.n (1) field write error: ", p), err) } 27564 if err := oprot.WriteFieldEnd(ctx); err != nil { 27565 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:n: ", p), err) } 27566 return err 27567 } 27568 27569 func (p *ApplyPrintiArgs) String() string { 27570 if p == nil { 27571 return "<nil>" 27572 } 27573 return fmt.Sprintf("ApplyPrintiArgs(%+v)", *p) 27574 } 27575 27576 type ApplyPrintiResult struct { 27577 } 27578 27579 func NewApplyPrintiResult() *ApplyPrintiResult { 27580 return &ApplyPrintiResult{} 27581 } 27582 27583 func (p *ApplyPrintiResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 27584 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27585 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27586 } 27587 27588 27589 for { 27590 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27591 if err != nil { 27592 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27593 } 27594 if fieldTypeId == thrift.STOP { break; } 27595 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27596 return err 27597 } 27598 if err := iprot.ReadFieldEnd(ctx); err != nil { 27599 return err 27600 } 27601 } 27602 if err := iprot.ReadStructEnd(ctx); err != nil { 27603 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27604 } 27605 return nil 27606 } 27607 27608 func (p *ApplyPrintiResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 27609 if err := oprot.WriteStructBegin(ctx, "printi_result"); err != nil { 27610 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27611 if p != nil { 27612 } 27613 if err := oprot.WriteFieldStop(ctx); err != nil { 27614 return thrift.PrependError("write field stop error: ", err) } 27615 if err := oprot.WriteStructEnd(ctx); err != nil { 27616 return thrift.PrependError("write struct stop error: ", err) } 27617 return nil 27618 } 27619 27620 func (p *ApplyPrintiResult) String() string { 27621 if p == nil { 27622 return "<nil>" 27623 } 27624 return fmt.Sprintf("ApplyPrintiResult(%+v)", *p) 27625 } 27626 27627 // Attributes: 27628 // - N 27629 type ApplyPrintuiArgs struct { 27630 N *Uint64 `thrift:"n,1" db:"n" json:"n"` 27631 } 27632 27633 func NewApplyPrintuiArgs() *ApplyPrintuiArgs { 27634 return &ApplyPrintuiArgs{} 27635 } 27636 27637 var ApplyPrintuiArgs_N_DEFAULT *Uint64 27638 func (p *ApplyPrintuiArgs) GetN() *Uint64 { 27639 if !p.IsSetN() { 27640 return ApplyPrintuiArgs_N_DEFAULT 27641 } 27642 return p.N 27643 } 27644 func (p *ApplyPrintuiArgs) IsSetN() bool { 27645 return p.N != nil 27646 } 27647 27648 func (p *ApplyPrintuiArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 27649 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27650 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27651 } 27652 27653 27654 for { 27655 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27656 if err != nil { 27657 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27658 } 27659 if fieldTypeId == thrift.STOP { break; } 27660 switch fieldId { 27661 case 1: 27662 if fieldTypeId == thrift.STRUCT { 27663 if err := p.ReadField1(ctx, iprot); err != nil { 27664 return err 27665 } 27666 } else { 27667 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27668 return err 27669 } 27670 } 27671 default: 27672 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27673 return err 27674 } 27675 } 27676 if err := iprot.ReadFieldEnd(ctx); err != nil { 27677 return err 27678 } 27679 } 27680 if err := iprot.ReadStructEnd(ctx); err != nil { 27681 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27682 } 27683 return nil 27684 } 27685 27686 func (p *ApplyPrintuiArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 27687 p.N = &Uint64{} 27688 if err := p.N.Read(ctx, iprot); err != nil { 27689 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.N), err) 27690 } 27691 return nil 27692 } 27693 27694 func (p *ApplyPrintuiArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 27695 if err := oprot.WriteStructBegin(ctx, "printui_args"); err != nil { 27696 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27697 if p != nil { 27698 if err := p.writeField1(ctx, oprot); err != nil { return err } 27699 } 27700 if err := oprot.WriteFieldStop(ctx); err != nil { 27701 return thrift.PrependError("write field stop error: ", err) } 27702 if err := oprot.WriteStructEnd(ctx); err != nil { 27703 return thrift.PrependError("write struct stop error: ", err) } 27704 return nil 27705 } 27706 27707 func (p *ApplyPrintuiArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 27708 if err := oprot.WriteFieldBegin(ctx, "n", thrift.STRUCT, 1); err != nil { 27709 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:n: ", p), err) } 27710 if err := p.N.Write(ctx, oprot); err != nil { 27711 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.N), err) 27712 } 27713 if err := oprot.WriteFieldEnd(ctx); err != nil { 27714 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:n: ", p), err) } 27715 return err 27716 } 27717 27718 func (p *ApplyPrintuiArgs) String() string { 27719 if p == nil { 27720 return "<nil>" 27721 } 27722 return fmt.Sprintf("ApplyPrintuiArgs(%+v)", *p) 27723 } 27724 27725 type ApplyPrintuiResult struct { 27726 } 27727 27728 func NewApplyPrintuiResult() *ApplyPrintuiResult { 27729 return &ApplyPrintuiResult{} 27730 } 27731 27732 func (p *ApplyPrintuiResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 27733 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27734 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27735 } 27736 27737 27738 for { 27739 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27740 if err != nil { 27741 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27742 } 27743 if fieldTypeId == thrift.STOP { break; } 27744 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27745 return err 27746 } 27747 if err := iprot.ReadFieldEnd(ctx); err != nil { 27748 return err 27749 } 27750 } 27751 if err := iprot.ReadStructEnd(ctx); err != nil { 27752 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27753 } 27754 return nil 27755 } 27756 27757 func (p *ApplyPrintuiResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 27758 if err := oprot.WriteStructBegin(ctx, "printui_result"); err != nil { 27759 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27760 if p != nil { 27761 } 27762 if err := oprot.WriteFieldStop(ctx); err != nil { 27763 return thrift.PrependError("write field stop error: ", err) } 27764 if err := oprot.WriteStructEnd(ctx); err != nil { 27765 return thrift.PrependError("write struct stop error: ", err) } 27766 return nil 27767 } 27768 27769 func (p *ApplyPrintuiResult) String() string { 27770 if p == nil { 27771 return "<nil>" 27772 } 27773 return fmt.Sprintf("ApplyPrintuiResult(%+v)", *p) 27774 } 27775 27776 // Attributes: 27777 // - Value 27778 type ApplyPrinti128Args struct { 27779 Value []byte `thrift:"value,1" db:"value" json:"value"` 27780 } 27781 27782 func NewApplyPrinti128Args() *ApplyPrinti128Args { 27783 return &ApplyPrinti128Args{} 27784 } 27785 27786 27787 func (p *ApplyPrinti128Args) GetValue() []byte { 27788 return p.Value 27789 } 27790 func (p *ApplyPrinti128Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 27791 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27792 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27793 } 27794 27795 27796 for { 27797 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27798 if err != nil { 27799 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27800 } 27801 if fieldTypeId == thrift.STOP { break; } 27802 switch fieldId { 27803 case 1: 27804 if fieldTypeId == thrift.STRING { 27805 if err := p.ReadField1(ctx, iprot); err != nil { 27806 return err 27807 } 27808 } else { 27809 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27810 return err 27811 } 27812 } 27813 default: 27814 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27815 return err 27816 } 27817 } 27818 if err := iprot.ReadFieldEnd(ctx); err != nil { 27819 return err 27820 } 27821 } 27822 if err := iprot.ReadStructEnd(ctx); err != nil { 27823 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27824 } 27825 return nil 27826 } 27827 27828 func (p *ApplyPrinti128Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 27829 if v, err := iprot.ReadBinary(ctx); err != nil { 27830 return thrift.PrependError("error reading field 1: ", err) 27831 } else { 27832 p.Value = v 27833 } 27834 return nil 27835 } 27836 27837 func (p *ApplyPrinti128Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 27838 if err := oprot.WriteStructBegin(ctx, "printi128_args"); err != nil { 27839 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27840 if p != nil { 27841 if err := p.writeField1(ctx, oprot); err != nil { return err } 27842 } 27843 if err := oprot.WriteFieldStop(ctx); err != nil { 27844 return thrift.PrependError("write field stop error: ", err) } 27845 if err := oprot.WriteStructEnd(ctx); err != nil { 27846 return thrift.PrependError("write struct stop error: ", err) } 27847 return nil 27848 } 27849 27850 func (p *ApplyPrinti128Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 27851 if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 1); err != nil { 27852 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err) } 27853 if err := oprot.WriteBinary(ctx, p.Value); err != nil { 27854 return thrift.PrependError(fmt.Sprintf("%T.value (1) field write error: ", p), err) } 27855 if err := oprot.WriteFieldEnd(ctx); err != nil { 27856 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err) } 27857 return err 27858 } 27859 27860 func (p *ApplyPrinti128Args) String() string { 27861 if p == nil { 27862 return "<nil>" 27863 } 27864 return fmt.Sprintf("ApplyPrinti128Args(%+v)", *p) 27865 } 27866 27867 type ApplyPrinti128Result struct { 27868 } 27869 27870 func NewApplyPrinti128Result() *ApplyPrinti128Result { 27871 return &ApplyPrinti128Result{} 27872 } 27873 27874 func (p *ApplyPrinti128Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 27875 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27876 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27877 } 27878 27879 27880 for { 27881 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27882 if err != nil { 27883 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27884 } 27885 if fieldTypeId == thrift.STOP { break; } 27886 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27887 return err 27888 } 27889 if err := iprot.ReadFieldEnd(ctx); err != nil { 27890 return err 27891 } 27892 } 27893 if err := iprot.ReadStructEnd(ctx); err != nil { 27894 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27895 } 27896 return nil 27897 } 27898 27899 func (p *ApplyPrinti128Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 27900 if err := oprot.WriteStructBegin(ctx, "printi128_result"); err != nil { 27901 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27902 if p != nil { 27903 } 27904 if err := oprot.WriteFieldStop(ctx); err != nil { 27905 return thrift.PrependError("write field stop error: ", err) } 27906 if err := oprot.WriteStructEnd(ctx); err != nil { 27907 return thrift.PrependError("write struct stop error: ", err) } 27908 return nil 27909 } 27910 27911 func (p *ApplyPrinti128Result) String() string { 27912 if p == nil { 27913 return "<nil>" 27914 } 27915 return fmt.Sprintf("ApplyPrinti128Result(%+v)", *p) 27916 } 27917 27918 // Attributes: 27919 // - Value 27920 type ApplyPrintui128Args struct { 27921 Value []byte `thrift:"value,1" db:"value" json:"value"` 27922 } 27923 27924 func NewApplyPrintui128Args() *ApplyPrintui128Args { 27925 return &ApplyPrintui128Args{} 27926 } 27927 27928 27929 func (p *ApplyPrintui128Args) GetValue() []byte { 27930 return p.Value 27931 } 27932 func (p *ApplyPrintui128Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 27933 if _, err := iprot.ReadStructBegin(ctx); err != nil { 27934 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 27935 } 27936 27937 27938 for { 27939 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 27940 if err != nil { 27941 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 27942 } 27943 if fieldTypeId == thrift.STOP { break; } 27944 switch fieldId { 27945 case 1: 27946 if fieldTypeId == thrift.STRING { 27947 if err := p.ReadField1(ctx, iprot); err != nil { 27948 return err 27949 } 27950 } else { 27951 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27952 return err 27953 } 27954 } 27955 default: 27956 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 27957 return err 27958 } 27959 } 27960 if err := iprot.ReadFieldEnd(ctx); err != nil { 27961 return err 27962 } 27963 } 27964 if err := iprot.ReadStructEnd(ctx); err != nil { 27965 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 27966 } 27967 return nil 27968 } 27969 27970 func (p *ApplyPrintui128Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 27971 if v, err := iprot.ReadBinary(ctx); err != nil { 27972 return thrift.PrependError("error reading field 1: ", err) 27973 } else { 27974 p.Value = v 27975 } 27976 return nil 27977 } 27978 27979 func (p *ApplyPrintui128Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 27980 if err := oprot.WriteStructBegin(ctx, "printui128_args"); err != nil { 27981 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 27982 if p != nil { 27983 if err := p.writeField1(ctx, oprot); err != nil { return err } 27984 } 27985 if err := oprot.WriteFieldStop(ctx); err != nil { 27986 return thrift.PrependError("write field stop error: ", err) } 27987 if err := oprot.WriteStructEnd(ctx); err != nil { 27988 return thrift.PrependError("write struct stop error: ", err) } 27989 return nil 27990 } 27991 27992 func (p *ApplyPrintui128Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 27993 if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 1); err != nil { 27994 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err) } 27995 if err := oprot.WriteBinary(ctx, p.Value); err != nil { 27996 return thrift.PrependError(fmt.Sprintf("%T.value (1) field write error: ", p), err) } 27997 if err := oprot.WriteFieldEnd(ctx); err != nil { 27998 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err) } 27999 return err 28000 } 28001 28002 func (p *ApplyPrintui128Args) String() string { 28003 if p == nil { 28004 return "<nil>" 28005 } 28006 return fmt.Sprintf("ApplyPrintui128Args(%+v)", *p) 28007 } 28008 28009 type ApplyPrintui128Result struct { 28010 } 28011 28012 func NewApplyPrintui128Result() *ApplyPrintui128Result { 28013 return &ApplyPrintui128Result{} 28014 } 28015 28016 func (p *ApplyPrintui128Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 28017 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28018 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28019 } 28020 28021 28022 for { 28023 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28024 if err != nil { 28025 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28026 } 28027 if fieldTypeId == thrift.STOP { break; } 28028 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28029 return err 28030 } 28031 if err := iprot.ReadFieldEnd(ctx); err != nil { 28032 return err 28033 } 28034 } 28035 if err := iprot.ReadStructEnd(ctx); err != nil { 28036 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28037 } 28038 return nil 28039 } 28040 28041 func (p *ApplyPrintui128Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 28042 if err := oprot.WriteStructBegin(ctx, "printui128_result"); err != nil { 28043 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28044 if p != nil { 28045 } 28046 if err := oprot.WriteFieldStop(ctx); err != nil { 28047 return thrift.PrependError("write field stop error: ", err) } 28048 if err := oprot.WriteStructEnd(ctx); err != nil { 28049 return thrift.PrependError("write struct stop error: ", err) } 28050 return nil 28051 } 28052 28053 func (p *ApplyPrintui128Result) String() string { 28054 if p == nil { 28055 return "<nil>" 28056 } 28057 return fmt.Sprintf("ApplyPrintui128Result(%+v)", *p) 28058 } 28059 28060 // Attributes: 28061 // - Value 28062 type ApplyPrintsfArgs struct { 28063 Value []byte `thrift:"value,1" db:"value" json:"value"` 28064 } 28065 28066 func NewApplyPrintsfArgs() *ApplyPrintsfArgs { 28067 return &ApplyPrintsfArgs{} 28068 } 28069 28070 28071 func (p *ApplyPrintsfArgs) GetValue() []byte { 28072 return p.Value 28073 } 28074 func (p *ApplyPrintsfArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 28075 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28076 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28077 } 28078 28079 28080 for { 28081 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28082 if err != nil { 28083 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28084 } 28085 if fieldTypeId == thrift.STOP { break; } 28086 switch fieldId { 28087 case 1: 28088 if fieldTypeId == thrift.STRING { 28089 if err := p.ReadField1(ctx, iprot); err != nil { 28090 return err 28091 } 28092 } else { 28093 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28094 return err 28095 } 28096 } 28097 default: 28098 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28099 return err 28100 } 28101 } 28102 if err := iprot.ReadFieldEnd(ctx); err != nil { 28103 return err 28104 } 28105 } 28106 if err := iprot.ReadStructEnd(ctx); err != nil { 28107 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28108 } 28109 return nil 28110 } 28111 28112 func (p *ApplyPrintsfArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 28113 if v, err := iprot.ReadBinary(ctx); err != nil { 28114 return thrift.PrependError("error reading field 1: ", err) 28115 } else { 28116 p.Value = v 28117 } 28118 return nil 28119 } 28120 28121 func (p *ApplyPrintsfArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 28122 if err := oprot.WriteStructBegin(ctx, "printsf_args"); err != nil { 28123 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28124 if p != nil { 28125 if err := p.writeField1(ctx, oprot); err != nil { return err } 28126 } 28127 if err := oprot.WriteFieldStop(ctx); err != nil { 28128 return thrift.PrependError("write field stop error: ", err) } 28129 if err := oprot.WriteStructEnd(ctx); err != nil { 28130 return thrift.PrependError("write struct stop error: ", err) } 28131 return nil 28132 } 28133 28134 func (p *ApplyPrintsfArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 28135 if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 1); err != nil { 28136 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err) } 28137 if err := oprot.WriteBinary(ctx, p.Value); err != nil { 28138 return thrift.PrependError(fmt.Sprintf("%T.value (1) field write error: ", p), err) } 28139 if err := oprot.WriteFieldEnd(ctx); err != nil { 28140 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err) } 28141 return err 28142 } 28143 28144 func (p *ApplyPrintsfArgs) String() string { 28145 if p == nil { 28146 return "<nil>" 28147 } 28148 return fmt.Sprintf("ApplyPrintsfArgs(%+v)", *p) 28149 } 28150 28151 type ApplyPrintsfResult struct { 28152 } 28153 28154 func NewApplyPrintsfResult() *ApplyPrintsfResult { 28155 return &ApplyPrintsfResult{} 28156 } 28157 28158 func (p *ApplyPrintsfResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 28159 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28160 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28161 } 28162 28163 28164 for { 28165 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28166 if err != nil { 28167 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28168 } 28169 if fieldTypeId == thrift.STOP { break; } 28170 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28171 return err 28172 } 28173 if err := iprot.ReadFieldEnd(ctx); err != nil { 28174 return err 28175 } 28176 } 28177 if err := iprot.ReadStructEnd(ctx); err != nil { 28178 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28179 } 28180 return nil 28181 } 28182 28183 func (p *ApplyPrintsfResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 28184 if err := oprot.WriteStructBegin(ctx, "printsf_result"); err != nil { 28185 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28186 if p != nil { 28187 } 28188 if err := oprot.WriteFieldStop(ctx); err != nil { 28189 return thrift.PrependError("write field stop error: ", err) } 28190 if err := oprot.WriteStructEnd(ctx); err != nil { 28191 return thrift.PrependError("write struct stop error: ", err) } 28192 return nil 28193 } 28194 28195 func (p *ApplyPrintsfResult) String() string { 28196 if p == nil { 28197 return "<nil>" 28198 } 28199 return fmt.Sprintf("ApplyPrintsfResult(%+v)", *p) 28200 } 28201 28202 // Attributes: 28203 // - Value 28204 type ApplyPrintdfArgs struct { 28205 Value []byte `thrift:"value,1" db:"value" json:"value"` 28206 } 28207 28208 func NewApplyPrintdfArgs() *ApplyPrintdfArgs { 28209 return &ApplyPrintdfArgs{} 28210 } 28211 28212 28213 func (p *ApplyPrintdfArgs) GetValue() []byte { 28214 return p.Value 28215 } 28216 func (p *ApplyPrintdfArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 28217 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28218 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28219 } 28220 28221 28222 for { 28223 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28224 if err != nil { 28225 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28226 } 28227 if fieldTypeId == thrift.STOP { break; } 28228 switch fieldId { 28229 case 1: 28230 if fieldTypeId == thrift.STRING { 28231 if err := p.ReadField1(ctx, iprot); err != nil { 28232 return err 28233 } 28234 } else { 28235 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28236 return err 28237 } 28238 } 28239 default: 28240 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28241 return err 28242 } 28243 } 28244 if err := iprot.ReadFieldEnd(ctx); err != nil { 28245 return err 28246 } 28247 } 28248 if err := iprot.ReadStructEnd(ctx); err != nil { 28249 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28250 } 28251 return nil 28252 } 28253 28254 func (p *ApplyPrintdfArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 28255 if v, err := iprot.ReadBinary(ctx); err != nil { 28256 return thrift.PrependError("error reading field 1: ", err) 28257 } else { 28258 p.Value = v 28259 } 28260 return nil 28261 } 28262 28263 func (p *ApplyPrintdfArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 28264 if err := oprot.WriteStructBegin(ctx, "printdf_args"); err != nil { 28265 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28266 if p != nil { 28267 if err := p.writeField1(ctx, oprot); err != nil { return err } 28268 } 28269 if err := oprot.WriteFieldStop(ctx); err != nil { 28270 return thrift.PrependError("write field stop error: ", err) } 28271 if err := oprot.WriteStructEnd(ctx); err != nil { 28272 return thrift.PrependError("write struct stop error: ", err) } 28273 return nil 28274 } 28275 28276 func (p *ApplyPrintdfArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 28277 if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 1); err != nil { 28278 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err) } 28279 if err := oprot.WriteBinary(ctx, p.Value); err != nil { 28280 return thrift.PrependError(fmt.Sprintf("%T.value (1) field write error: ", p), err) } 28281 if err := oprot.WriteFieldEnd(ctx); err != nil { 28282 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err) } 28283 return err 28284 } 28285 28286 func (p *ApplyPrintdfArgs) String() string { 28287 if p == nil { 28288 return "<nil>" 28289 } 28290 return fmt.Sprintf("ApplyPrintdfArgs(%+v)", *p) 28291 } 28292 28293 type ApplyPrintdfResult struct { 28294 } 28295 28296 func NewApplyPrintdfResult() *ApplyPrintdfResult { 28297 return &ApplyPrintdfResult{} 28298 } 28299 28300 func (p *ApplyPrintdfResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 28301 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28302 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28303 } 28304 28305 28306 for { 28307 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28308 if err != nil { 28309 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28310 } 28311 if fieldTypeId == thrift.STOP { break; } 28312 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28313 return err 28314 } 28315 if err := iprot.ReadFieldEnd(ctx); err != nil { 28316 return err 28317 } 28318 } 28319 if err := iprot.ReadStructEnd(ctx); err != nil { 28320 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28321 } 28322 return nil 28323 } 28324 28325 func (p *ApplyPrintdfResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 28326 if err := oprot.WriteStructBegin(ctx, "printdf_result"); err != nil { 28327 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28328 if p != nil { 28329 } 28330 if err := oprot.WriteFieldStop(ctx); err != nil { 28331 return thrift.PrependError("write field stop error: ", err) } 28332 if err := oprot.WriteStructEnd(ctx); err != nil { 28333 return thrift.PrependError("write struct stop error: ", err) } 28334 return nil 28335 } 28336 28337 func (p *ApplyPrintdfResult) String() string { 28338 if p == nil { 28339 return "<nil>" 28340 } 28341 return fmt.Sprintf("ApplyPrintdfResult(%+v)", *p) 28342 } 28343 28344 // Attributes: 28345 // - Value 28346 type ApplyPrintqfArgs struct { 28347 Value []byte `thrift:"value,1" db:"value" json:"value"` 28348 } 28349 28350 func NewApplyPrintqfArgs() *ApplyPrintqfArgs { 28351 return &ApplyPrintqfArgs{} 28352 } 28353 28354 28355 func (p *ApplyPrintqfArgs) GetValue() []byte { 28356 return p.Value 28357 } 28358 func (p *ApplyPrintqfArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 28359 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28360 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28361 } 28362 28363 28364 for { 28365 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28366 if err != nil { 28367 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28368 } 28369 if fieldTypeId == thrift.STOP { break; } 28370 switch fieldId { 28371 case 1: 28372 if fieldTypeId == thrift.STRING { 28373 if err := p.ReadField1(ctx, iprot); err != nil { 28374 return err 28375 } 28376 } else { 28377 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28378 return err 28379 } 28380 } 28381 default: 28382 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28383 return err 28384 } 28385 } 28386 if err := iprot.ReadFieldEnd(ctx); err != nil { 28387 return err 28388 } 28389 } 28390 if err := iprot.ReadStructEnd(ctx); err != nil { 28391 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28392 } 28393 return nil 28394 } 28395 28396 func (p *ApplyPrintqfArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 28397 if v, err := iprot.ReadBinary(ctx); err != nil { 28398 return thrift.PrependError("error reading field 1: ", err) 28399 } else { 28400 p.Value = v 28401 } 28402 return nil 28403 } 28404 28405 func (p *ApplyPrintqfArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 28406 if err := oprot.WriteStructBegin(ctx, "printqf_args"); err != nil { 28407 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28408 if p != nil { 28409 if err := p.writeField1(ctx, oprot); err != nil { return err } 28410 } 28411 if err := oprot.WriteFieldStop(ctx); err != nil { 28412 return thrift.PrependError("write field stop error: ", err) } 28413 if err := oprot.WriteStructEnd(ctx); err != nil { 28414 return thrift.PrependError("write struct stop error: ", err) } 28415 return nil 28416 } 28417 28418 func (p *ApplyPrintqfArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 28419 if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 1); err != nil { 28420 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err) } 28421 if err := oprot.WriteBinary(ctx, p.Value); err != nil { 28422 return thrift.PrependError(fmt.Sprintf("%T.value (1) field write error: ", p), err) } 28423 if err := oprot.WriteFieldEnd(ctx); err != nil { 28424 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err) } 28425 return err 28426 } 28427 28428 func (p *ApplyPrintqfArgs) String() string { 28429 if p == nil { 28430 return "<nil>" 28431 } 28432 return fmt.Sprintf("ApplyPrintqfArgs(%+v)", *p) 28433 } 28434 28435 type ApplyPrintqfResult struct { 28436 } 28437 28438 func NewApplyPrintqfResult() *ApplyPrintqfResult { 28439 return &ApplyPrintqfResult{} 28440 } 28441 28442 func (p *ApplyPrintqfResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 28443 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28444 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28445 } 28446 28447 28448 for { 28449 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28450 if err != nil { 28451 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28452 } 28453 if fieldTypeId == thrift.STOP { break; } 28454 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28455 return err 28456 } 28457 if err := iprot.ReadFieldEnd(ctx); err != nil { 28458 return err 28459 } 28460 } 28461 if err := iprot.ReadStructEnd(ctx); err != nil { 28462 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28463 } 28464 return nil 28465 } 28466 28467 func (p *ApplyPrintqfResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 28468 if err := oprot.WriteStructBegin(ctx, "printqf_result"); err != nil { 28469 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28470 if p != nil { 28471 } 28472 if err := oprot.WriteFieldStop(ctx); err != nil { 28473 return thrift.PrependError("write field stop error: ", err) } 28474 if err := oprot.WriteStructEnd(ctx); err != nil { 28475 return thrift.PrependError("write struct stop error: ", err) } 28476 return nil 28477 } 28478 28479 func (p *ApplyPrintqfResult) String() string { 28480 if p == nil { 28481 return "<nil>" 28482 } 28483 return fmt.Sprintf("ApplyPrintqfResult(%+v)", *p) 28484 } 28485 28486 // Attributes: 28487 // - Name 28488 type ApplyPrintnArgs struct { 28489 Name *Uint64 `thrift:"name,1" db:"name" json:"name"` 28490 } 28491 28492 func NewApplyPrintnArgs() *ApplyPrintnArgs { 28493 return &ApplyPrintnArgs{} 28494 } 28495 28496 var ApplyPrintnArgs_Name_DEFAULT *Uint64 28497 func (p *ApplyPrintnArgs) GetName() *Uint64 { 28498 if !p.IsSetName() { 28499 return ApplyPrintnArgs_Name_DEFAULT 28500 } 28501 return p.Name 28502 } 28503 func (p *ApplyPrintnArgs) IsSetName() bool { 28504 return p.Name != nil 28505 } 28506 28507 func (p *ApplyPrintnArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 28508 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28509 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28510 } 28511 28512 28513 for { 28514 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28515 if err != nil { 28516 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28517 } 28518 if fieldTypeId == thrift.STOP { break; } 28519 switch fieldId { 28520 case 1: 28521 if fieldTypeId == thrift.STRUCT { 28522 if err := p.ReadField1(ctx, iprot); err != nil { 28523 return err 28524 } 28525 } else { 28526 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28527 return err 28528 } 28529 } 28530 default: 28531 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28532 return err 28533 } 28534 } 28535 if err := iprot.ReadFieldEnd(ctx); err != nil { 28536 return err 28537 } 28538 } 28539 if err := iprot.ReadStructEnd(ctx); err != nil { 28540 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28541 } 28542 return nil 28543 } 28544 28545 func (p *ApplyPrintnArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 28546 p.Name = &Uint64{} 28547 if err := p.Name.Read(ctx, iprot); err != nil { 28548 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Name), err) 28549 } 28550 return nil 28551 } 28552 28553 func (p *ApplyPrintnArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 28554 if err := oprot.WriteStructBegin(ctx, "printn_args"); err != nil { 28555 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28556 if p != nil { 28557 if err := p.writeField1(ctx, oprot); err != nil { return err } 28558 } 28559 if err := oprot.WriteFieldStop(ctx); err != nil { 28560 return thrift.PrependError("write field stop error: ", err) } 28561 if err := oprot.WriteStructEnd(ctx); err != nil { 28562 return thrift.PrependError("write struct stop error: ", err) } 28563 return nil 28564 } 28565 28566 func (p *ApplyPrintnArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 28567 if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRUCT, 1); err != nil { 28568 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } 28569 if err := p.Name.Write(ctx, oprot); err != nil { 28570 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Name), err) 28571 } 28572 if err := oprot.WriteFieldEnd(ctx); err != nil { 28573 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } 28574 return err 28575 } 28576 28577 func (p *ApplyPrintnArgs) String() string { 28578 if p == nil { 28579 return "<nil>" 28580 } 28581 return fmt.Sprintf("ApplyPrintnArgs(%+v)", *p) 28582 } 28583 28584 type ApplyPrintnResult struct { 28585 } 28586 28587 func NewApplyPrintnResult() *ApplyPrintnResult { 28588 return &ApplyPrintnResult{} 28589 } 28590 28591 func (p *ApplyPrintnResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 28592 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28593 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28594 } 28595 28596 28597 for { 28598 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28599 if err != nil { 28600 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28601 } 28602 if fieldTypeId == thrift.STOP { break; } 28603 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28604 return err 28605 } 28606 if err := iprot.ReadFieldEnd(ctx); err != nil { 28607 return err 28608 } 28609 } 28610 if err := iprot.ReadStructEnd(ctx); err != nil { 28611 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28612 } 28613 return nil 28614 } 28615 28616 func (p *ApplyPrintnResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 28617 if err := oprot.WriteStructBegin(ctx, "printn_result"); err != nil { 28618 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28619 if p != nil { 28620 } 28621 if err := oprot.WriteFieldStop(ctx); err != nil { 28622 return thrift.PrependError("write field stop error: ", err) } 28623 if err := oprot.WriteStructEnd(ctx); err != nil { 28624 return thrift.PrependError("write struct stop error: ", err) } 28625 return nil 28626 } 28627 28628 func (p *ApplyPrintnResult) String() string { 28629 if p == nil { 28630 return "<nil>" 28631 } 28632 return fmt.Sprintf("ApplyPrintnResult(%+v)", *p) 28633 } 28634 28635 // Attributes: 28636 // - Data 28637 type ApplyPrinthexArgs struct { 28638 Data []byte `thrift:"data,1" db:"data" json:"data"` 28639 } 28640 28641 func NewApplyPrinthexArgs() *ApplyPrinthexArgs { 28642 return &ApplyPrinthexArgs{} 28643 } 28644 28645 28646 func (p *ApplyPrinthexArgs) GetData() []byte { 28647 return p.Data 28648 } 28649 func (p *ApplyPrinthexArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 28650 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28651 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28652 } 28653 28654 28655 for { 28656 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28657 if err != nil { 28658 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28659 } 28660 if fieldTypeId == thrift.STOP { break; } 28661 switch fieldId { 28662 case 1: 28663 if fieldTypeId == thrift.STRING { 28664 if err := p.ReadField1(ctx, iprot); err != nil { 28665 return err 28666 } 28667 } else { 28668 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28669 return err 28670 } 28671 } 28672 default: 28673 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28674 return err 28675 } 28676 } 28677 if err := iprot.ReadFieldEnd(ctx); err != nil { 28678 return err 28679 } 28680 } 28681 if err := iprot.ReadStructEnd(ctx); err != nil { 28682 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28683 } 28684 return nil 28685 } 28686 28687 func (p *ApplyPrinthexArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 28688 if v, err := iprot.ReadBinary(ctx); err != nil { 28689 return thrift.PrependError("error reading field 1: ", err) 28690 } else { 28691 p.Data = v 28692 } 28693 return nil 28694 } 28695 28696 func (p *ApplyPrinthexArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 28697 if err := oprot.WriteStructBegin(ctx, "printhex_args"); err != nil { 28698 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28699 if p != nil { 28700 if err := p.writeField1(ctx, oprot); err != nil { return err } 28701 } 28702 if err := oprot.WriteFieldStop(ctx); err != nil { 28703 return thrift.PrependError("write field stop error: ", err) } 28704 if err := oprot.WriteStructEnd(ctx); err != nil { 28705 return thrift.PrependError("write struct stop error: ", err) } 28706 return nil 28707 } 28708 28709 func (p *ApplyPrinthexArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 28710 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 1); err != nil { 28711 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:data: ", p), err) } 28712 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 28713 return thrift.PrependError(fmt.Sprintf("%T.data (1) field write error: ", p), err) } 28714 if err := oprot.WriteFieldEnd(ctx); err != nil { 28715 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:data: ", p), err) } 28716 return err 28717 } 28718 28719 func (p *ApplyPrinthexArgs) String() string { 28720 if p == nil { 28721 return "<nil>" 28722 } 28723 return fmt.Sprintf("ApplyPrinthexArgs(%+v)", *p) 28724 } 28725 28726 type ApplyPrinthexResult struct { 28727 } 28728 28729 func NewApplyPrinthexResult() *ApplyPrinthexResult { 28730 return &ApplyPrinthexResult{} 28731 } 28732 28733 func (p *ApplyPrinthexResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 28734 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28735 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28736 } 28737 28738 28739 for { 28740 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28741 if err != nil { 28742 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28743 } 28744 if fieldTypeId == thrift.STOP { break; } 28745 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28746 return err 28747 } 28748 if err := iprot.ReadFieldEnd(ctx); err != nil { 28749 return err 28750 } 28751 } 28752 if err := iprot.ReadStructEnd(ctx); err != nil { 28753 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28754 } 28755 return nil 28756 } 28757 28758 func (p *ApplyPrinthexResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 28759 if err := oprot.WriteStructBegin(ctx, "printhex_result"); err != nil { 28760 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28761 if p != nil { 28762 } 28763 if err := oprot.WriteFieldStop(ctx); err != nil { 28764 return thrift.PrependError("write field stop error: ", err) } 28765 if err := oprot.WriteStructEnd(ctx); err != nil { 28766 return thrift.PrependError("write struct stop error: ", err) } 28767 return nil 28768 } 28769 28770 func (p *ApplyPrinthexResult) String() string { 28771 if p == nil { 28772 return "<nil>" 28773 } 28774 return fmt.Sprintf("ApplyPrinthexResult(%+v)", *p) 28775 } 28776 28777 type ApplyActionDataSizeArgs struct { 28778 } 28779 28780 func NewApplyActionDataSizeArgs() *ApplyActionDataSizeArgs { 28781 return &ApplyActionDataSizeArgs{} 28782 } 28783 28784 func (p *ApplyActionDataSizeArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 28785 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28786 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28787 } 28788 28789 28790 for { 28791 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28792 if err != nil { 28793 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28794 } 28795 if fieldTypeId == thrift.STOP { break; } 28796 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28797 return err 28798 } 28799 if err := iprot.ReadFieldEnd(ctx); err != nil { 28800 return err 28801 } 28802 } 28803 if err := iprot.ReadStructEnd(ctx); err != nil { 28804 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28805 } 28806 return nil 28807 } 28808 28809 func (p *ApplyActionDataSizeArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 28810 if err := oprot.WriteStructBegin(ctx, "action_data_size_args"); err != nil { 28811 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28812 if p != nil { 28813 } 28814 if err := oprot.WriteFieldStop(ctx); err != nil { 28815 return thrift.PrependError("write field stop error: ", err) } 28816 if err := oprot.WriteStructEnd(ctx); err != nil { 28817 return thrift.PrependError("write struct stop error: ", err) } 28818 return nil 28819 } 28820 28821 func (p *ApplyActionDataSizeArgs) String() string { 28822 if p == nil { 28823 return "<nil>" 28824 } 28825 return fmt.Sprintf("ApplyActionDataSizeArgs(%+v)", *p) 28826 } 28827 28828 // Attributes: 28829 // - Success 28830 type ApplyActionDataSizeResult struct { 28831 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 28832 } 28833 28834 func NewApplyActionDataSizeResult() *ApplyActionDataSizeResult { 28835 return &ApplyActionDataSizeResult{} 28836 } 28837 28838 var ApplyActionDataSizeResult_Success_DEFAULT int32 28839 func (p *ApplyActionDataSizeResult) GetSuccess() int32 { 28840 if !p.IsSetSuccess() { 28841 return ApplyActionDataSizeResult_Success_DEFAULT 28842 } 28843 return *p.Success 28844 } 28845 func (p *ApplyActionDataSizeResult) IsSetSuccess() bool { 28846 return p.Success != nil 28847 } 28848 28849 func (p *ApplyActionDataSizeResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 28850 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28851 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28852 } 28853 28854 28855 for { 28856 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28857 if err != nil { 28858 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28859 } 28860 if fieldTypeId == thrift.STOP { break; } 28861 switch fieldId { 28862 case 0: 28863 if fieldTypeId == thrift.I32 { 28864 if err := p.ReadField0(ctx, iprot); err != nil { 28865 return err 28866 } 28867 } else { 28868 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28869 return err 28870 } 28871 } 28872 default: 28873 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28874 return err 28875 } 28876 } 28877 if err := iprot.ReadFieldEnd(ctx); err != nil { 28878 return err 28879 } 28880 } 28881 if err := iprot.ReadStructEnd(ctx); err != nil { 28882 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28883 } 28884 return nil 28885 } 28886 28887 func (p *ApplyActionDataSizeResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 28888 if v, err := iprot.ReadI32(ctx); err != nil { 28889 return thrift.PrependError("error reading field 0: ", err) 28890 } else { 28891 p.Success = &v 28892 } 28893 return nil 28894 } 28895 28896 func (p *ApplyActionDataSizeResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 28897 if err := oprot.WriteStructBegin(ctx, "action_data_size_result"); err != nil { 28898 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28899 if p != nil { 28900 if err := p.writeField0(ctx, oprot); err != nil { return err } 28901 } 28902 if err := oprot.WriteFieldStop(ctx); err != nil { 28903 return thrift.PrependError("write field stop error: ", err) } 28904 if err := oprot.WriteStructEnd(ctx); err != nil { 28905 return thrift.PrependError("write struct stop error: ", err) } 28906 return nil 28907 } 28908 28909 func (p *ApplyActionDataSizeResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 28910 if p.IsSetSuccess() { 28911 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 28912 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 28913 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 28914 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 28915 if err := oprot.WriteFieldEnd(ctx); err != nil { 28916 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 28917 } 28918 return err 28919 } 28920 28921 func (p *ApplyActionDataSizeResult) String() string { 28922 if p == nil { 28923 return "<nil>" 28924 } 28925 return fmt.Sprintf("ApplyActionDataSizeResult(%+v)", *p) 28926 } 28927 28928 type ApplyReadActionDataArgs struct { 28929 } 28930 28931 func NewApplyReadActionDataArgs() *ApplyReadActionDataArgs { 28932 return &ApplyReadActionDataArgs{} 28933 } 28934 28935 func (p *ApplyReadActionDataArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 28936 if _, err := iprot.ReadStructBegin(ctx); err != nil { 28937 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 28938 } 28939 28940 28941 for { 28942 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 28943 if err != nil { 28944 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 28945 } 28946 if fieldTypeId == thrift.STOP { break; } 28947 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 28948 return err 28949 } 28950 if err := iprot.ReadFieldEnd(ctx); err != nil { 28951 return err 28952 } 28953 } 28954 if err := iprot.ReadStructEnd(ctx); err != nil { 28955 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 28956 } 28957 return nil 28958 } 28959 28960 func (p *ApplyReadActionDataArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 28961 if err := oprot.WriteStructBegin(ctx, "read_action_data_args"); err != nil { 28962 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 28963 if p != nil { 28964 } 28965 if err := oprot.WriteFieldStop(ctx); err != nil { 28966 return thrift.PrependError("write field stop error: ", err) } 28967 if err := oprot.WriteStructEnd(ctx); err != nil { 28968 return thrift.PrependError("write struct stop error: ", err) } 28969 return nil 28970 } 28971 28972 func (p *ApplyReadActionDataArgs) String() string { 28973 if p == nil { 28974 return "<nil>" 28975 } 28976 return fmt.Sprintf("ApplyReadActionDataArgs(%+v)", *p) 28977 } 28978 28979 // Attributes: 28980 // - Success 28981 type ApplyReadActionDataResult struct { 28982 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 28983 } 28984 28985 func NewApplyReadActionDataResult() *ApplyReadActionDataResult { 28986 return &ApplyReadActionDataResult{} 28987 } 28988 28989 var ApplyReadActionDataResult_Success_DEFAULT []byte 28990 28991 func (p *ApplyReadActionDataResult) GetSuccess() []byte { 28992 return p.Success 28993 } 28994 func (p *ApplyReadActionDataResult) IsSetSuccess() bool { 28995 return p.Success != nil 28996 } 28997 28998 func (p *ApplyReadActionDataResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 28999 if _, err := iprot.ReadStructBegin(ctx); err != nil { 29000 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 29001 } 29002 29003 29004 for { 29005 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 29006 if err != nil { 29007 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 29008 } 29009 if fieldTypeId == thrift.STOP { break; } 29010 switch fieldId { 29011 case 0: 29012 if fieldTypeId == thrift.STRING { 29013 if err := p.ReadField0(ctx, iprot); err != nil { 29014 return err 29015 } 29016 } else { 29017 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29018 return err 29019 } 29020 } 29021 default: 29022 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29023 return err 29024 } 29025 } 29026 if err := iprot.ReadFieldEnd(ctx); err != nil { 29027 return err 29028 } 29029 } 29030 if err := iprot.ReadStructEnd(ctx); err != nil { 29031 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 29032 } 29033 return nil 29034 } 29035 29036 func (p *ApplyReadActionDataResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 29037 if v, err := iprot.ReadBinary(ctx); err != nil { 29038 return thrift.PrependError("error reading field 0: ", err) 29039 } else { 29040 p.Success = v 29041 } 29042 return nil 29043 } 29044 29045 func (p *ApplyReadActionDataResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 29046 if err := oprot.WriteStructBegin(ctx, "read_action_data_result"); err != nil { 29047 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 29048 if p != nil { 29049 if err := p.writeField0(ctx, oprot); err != nil { return err } 29050 } 29051 if err := oprot.WriteFieldStop(ctx); err != nil { 29052 return thrift.PrependError("write field stop error: ", err) } 29053 if err := oprot.WriteStructEnd(ctx); err != nil { 29054 return thrift.PrependError("write struct stop error: ", err) } 29055 return nil 29056 } 29057 29058 func (p *ApplyReadActionDataResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 29059 if p.IsSetSuccess() { 29060 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 29061 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 29062 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 29063 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 29064 if err := oprot.WriteFieldEnd(ctx); err != nil { 29065 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 29066 } 29067 return err 29068 } 29069 29070 func (p *ApplyReadActionDataResult) String() string { 29071 if p == nil { 29072 return "<nil>" 29073 } 29074 return fmt.Sprintf("ApplyReadActionDataResult(%+v)", *p) 29075 } 29076 29077 // Attributes: 29078 // - Name 29079 type ApplyRequireRecipientArgs struct { 29080 Name *Uint64 `thrift:"name,1" db:"name" json:"name"` 29081 } 29082 29083 func NewApplyRequireRecipientArgs() *ApplyRequireRecipientArgs { 29084 return &ApplyRequireRecipientArgs{} 29085 } 29086 29087 var ApplyRequireRecipientArgs_Name_DEFAULT *Uint64 29088 func (p *ApplyRequireRecipientArgs) GetName() *Uint64 { 29089 if !p.IsSetName() { 29090 return ApplyRequireRecipientArgs_Name_DEFAULT 29091 } 29092 return p.Name 29093 } 29094 func (p *ApplyRequireRecipientArgs) IsSetName() bool { 29095 return p.Name != nil 29096 } 29097 29098 func (p *ApplyRequireRecipientArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 29099 if _, err := iprot.ReadStructBegin(ctx); err != nil { 29100 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 29101 } 29102 29103 29104 for { 29105 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 29106 if err != nil { 29107 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 29108 } 29109 if fieldTypeId == thrift.STOP { break; } 29110 switch fieldId { 29111 case 1: 29112 if fieldTypeId == thrift.STRUCT { 29113 if err := p.ReadField1(ctx, iprot); err != nil { 29114 return err 29115 } 29116 } else { 29117 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29118 return err 29119 } 29120 } 29121 default: 29122 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29123 return err 29124 } 29125 } 29126 if err := iprot.ReadFieldEnd(ctx); err != nil { 29127 return err 29128 } 29129 } 29130 if err := iprot.ReadStructEnd(ctx); err != nil { 29131 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 29132 } 29133 return nil 29134 } 29135 29136 func (p *ApplyRequireRecipientArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 29137 p.Name = &Uint64{} 29138 if err := p.Name.Read(ctx, iprot); err != nil { 29139 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Name), err) 29140 } 29141 return nil 29142 } 29143 29144 func (p *ApplyRequireRecipientArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 29145 if err := oprot.WriteStructBegin(ctx, "require_recipient_args"); err != nil { 29146 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 29147 if p != nil { 29148 if err := p.writeField1(ctx, oprot); err != nil { return err } 29149 } 29150 if err := oprot.WriteFieldStop(ctx); err != nil { 29151 return thrift.PrependError("write field stop error: ", err) } 29152 if err := oprot.WriteStructEnd(ctx); err != nil { 29153 return thrift.PrependError("write struct stop error: ", err) } 29154 return nil 29155 } 29156 29157 func (p *ApplyRequireRecipientArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 29158 if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRUCT, 1); err != nil { 29159 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } 29160 if err := p.Name.Write(ctx, oprot); err != nil { 29161 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Name), err) 29162 } 29163 if err := oprot.WriteFieldEnd(ctx); err != nil { 29164 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } 29165 return err 29166 } 29167 29168 func (p *ApplyRequireRecipientArgs) String() string { 29169 if p == nil { 29170 return "<nil>" 29171 } 29172 return fmt.Sprintf("ApplyRequireRecipientArgs(%+v)", *p) 29173 } 29174 29175 type ApplyRequireRecipientResult struct { 29176 } 29177 29178 func NewApplyRequireRecipientResult() *ApplyRequireRecipientResult { 29179 return &ApplyRequireRecipientResult{} 29180 } 29181 29182 func (p *ApplyRequireRecipientResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 29183 if _, err := iprot.ReadStructBegin(ctx); err != nil { 29184 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 29185 } 29186 29187 29188 for { 29189 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 29190 if err != nil { 29191 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 29192 } 29193 if fieldTypeId == thrift.STOP { break; } 29194 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29195 return err 29196 } 29197 if err := iprot.ReadFieldEnd(ctx); err != nil { 29198 return err 29199 } 29200 } 29201 if err := iprot.ReadStructEnd(ctx); err != nil { 29202 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 29203 } 29204 return nil 29205 } 29206 29207 func (p *ApplyRequireRecipientResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 29208 if err := oprot.WriteStructBegin(ctx, "require_recipient_result"); err != nil { 29209 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 29210 if p != nil { 29211 } 29212 if err := oprot.WriteFieldStop(ctx); err != nil { 29213 return thrift.PrependError("write field stop error: ", err) } 29214 if err := oprot.WriteStructEnd(ctx); err != nil { 29215 return thrift.PrependError("write struct stop error: ", err) } 29216 return nil 29217 } 29218 29219 func (p *ApplyRequireRecipientResult) String() string { 29220 if p == nil { 29221 return "<nil>" 29222 } 29223 return fmt.Sprintf("ApplyRequireRecipientResult(%+v)", *p) 29224 } 29225 29226 // Attributes: 29227 // - Name 29228 type ApplyRequireAuthArgs struct { 29229 Name *Uint64 `thrift:"name,1" db:"name" json:"name"` 29230 } 29231 29232 func NewApplyRequireAuthArgs() *ApplyRequireAuthArgs { 29233 return &ApplyRequireAuthArgs{} 29234 } 29235 29236 var ApplyRequireAuthArgs_Name_DEFAULT *Uint64 29237 func (p *ApplyRequireAuthArgs) GetName() *Uint64 { 29238 if !p.IsSetName() { 29239 return ApplyRequireAuthArgs_Name_DEFAULT 29240 } 29241 return p.Name 29242 } 29243 func (p *ApplyRequireAuthArgs) IsSetName() bool { 29244 return p.Name != nil 29245 } 29246 29247 func (p *ApplyRequireAuthArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 29248 if _, err := iprot.ReadStructBegin(ctx); err != nil { 29249 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 29250 } 29251 29252 29253 for { 29254 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 29255 if err != nil { 29256 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 29257 } 29258 if fieldTypeId == thrift.STOP { break; } 29259 switch fieldId { 29260 case 1: 29261 if fieldTypeId == thrift.STRUCT { 29262 if err := p.ReadField1(ctx, iprot); err != nil { 29263 return err 29264 } 29265 } else { 29266 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29267 return err 29268 } 29269 } 29270 default: 29271 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29272 return err 29273 } 29274 } 29275 if err := iprot.ReadFieldEnd(ctx); err != nil { 29276 return err 29277 } 29278 } 29279 if err := iprot.ReadStructEnd(ctx); err != nil { 29280 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 29281 } 29282 return nil 29283 } 29284 29285 func (p *ApplyRequireAuthArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 29286 p.Name = &Uint64{} 29287 if err := p.Name.Read(ctx, iprot); err != nil { 29288 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Name), err) 29289 } 29290 return nil 29291 } 29292 29293 func (p *ApplyRequireAuthArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 29294 if err := oprot.WriteStructBegin(ctx, "require_auth_args"); err != nil { 29295 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 29296 if p != nil { 29297 if err := p.writeField1(ctx, oprot); err != nil { return err } 29298 } 29299 if err := oprot.WriteFieldStop(ctx); err != nil { 29300 return thrift.PrependError("write field stop error: ", err) } 29301 if err := oprot.WriteStructEnd(ctx); err != nil { 29302 return thrift.PrependError("write struct stop error: ", err) } 29303 return nil 29304 } 29305 29306 func (p *ApplyRequireAuthArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 29307 if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRUCT, 1); err != nil { 29308 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } 29309 if err := p.Name.Write(ctx, oprot); err != nil { 29310 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Name), err) 29311 } 29312 if err := oprot.WriteFieldEnd(ctx); err != nil { 29313 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } 29314 return err 29315 } 29316 29317 func (p *ApplyRequireAuthArgs) String() string { 29318 if p == nil { 29319 return "<nil>" 29320 } 29321 return fmt.Sprintf("ApplyRequireAuthArgs(%+v)", *p) 29322 } 29323 29324 type ApplyRequireAuthResult struct { 29325 } 29326 29327 func NewApplyRequireAuthResult() *ApplyRequireAuthResult { 29328 return &ApplyRequireAuthResult{} 29329 } 29330 29331 func (p *ApplyRequireAuthResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 29332 if _, err := iprot.ReadStructBegin(ctx); err != nil { 29333 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 29334 } 29335 29336 29337 for { 29338 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 29339 if err != nil { 29340 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 29341 } 29342 if fieldTypeId == thrift.STOP { break; } 29343 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29344 return err 29345 } 29346 if err := iprot.ReadFieldEnd(ctx); err != nil { 29347 return err 29348 } 29349 } 29350 if err := iprot.ReadStructEnd(ctx); err != nil { 29351 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 29352 } 29353 return nil 29354 } 29355 29356 func (p *ApplyRequireAuthResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 29357 if err := oprot.WriteStructBegin(ctx, "require_auth_result"); err != nil { 29358 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 29359 if p != nil { 29360 } 29361 if err := oprot.WriteFieldStop(ctx); err != nil { 29362 return thrift.PrependError("write field stop error: ", err) } 29363 if err := oprot.WriteStructEnd(ctx); err != nil { 29364 return thrift.PrependError("write struct stop error: ", err) } 29365 return nil 29366 } 29367 29368 func (p *ApplyRequireAuthResult) String() string { 29369 if p == nil { 29370 return "<nil>" 29371 } 29372 return fmt.Sprintf("ApplyRequireAuthResult(%+v)", *p) 29373 } 29374 29375 // Attributes: 29376 // - Name 29377 type ApplyHasAuthArgs struct { 29378 Name *Uint64 `thrift:"name,1" db:"name" json:"name"` 29379 } 29380 29381 func NewApplyHasAuthArgs() *ApplyHasAuthArgs { 29382 return &ApplyHasAuthArgs{} 29383 } 29384 29385 var ApplyHasAuthArgs_Name_DEFAULT *Uint64 29386 func (p *ApplyHasAuthArgs) GetName() *Uint64 { 29387 if !p.IsSetName() { 29388 return ApplyHasAuthArgs_Name_DEFAULT 29389 } 29390 return p.Name 29391 } 29392 func (p *ApplyHasAuthArgs) IsSetName() bool { 29393 return p.Name != nil 29394 } 29395 29396 func (p *ApplyHasAuthArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 29397 if _, err := iprot.ReadStructBegin(ctx); err != nil { 29398 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 29399 } 29400 29401 29402 for { 29403 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 29404 if err != nil { 29405 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 29406 } 29407 if fieldTypeId == thrift.STOP { break; } 29408 switch fieldId { 29409 case 1: 29410 if fieldTypeId == thrift.STRUCT { 29411 if err := p.ReadField1(ctx, iprot); err != nil { 29412 return err 29413 } 29414 } else { 29415 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29416 return err 29417 } 29418 } 29419 default: 29420 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29421 return err 29422 } 29423 } 29424 if err := iprot.ReadFieldEnd(ctx); err != nil { 29425 return err 29426 } 29427 } 29428 if err := iprot.ReadStructEnd(ctx); err != nil { 29429 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 29430 } 29431 return nil 29432 } 29433 29434 func (p *ApplyHasAuthArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 29435 p.Name = &Uint64{} 29436 if err := p.Name.Read(ctx, iprot); err != nil { 29437 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Name), err) 29438 } 29439 return nil 29440 } 29441 29442 func (p *ApplyHasAuthArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 29443 if err := oprot.WriteStructBegin(ctx, "has_auth_args"); err != nil { 29444 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 29445 if p != nil { 29446 if err := p.writeField1(ctx, oprot); err != nil { return err } 29447 } 29448 if err := oprot.WriteFieldStop(ctx); err != nil { 29449 return thrift.PrependError("write field stop error: ", err) } 29450 if err := oprot.WriteStructEnd(ctx); err != nil { 29451 return thrift.PrependError("write struct stop error: ", err) } 29452 return nil 29453 } 29454 29455 func (p *ApplyHasAuthArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 29456 if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRUCT, 1); err != nil { 29457 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } 29458 if err := p.Name.Write(ctx, oprot); err != nil { 29459 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Name), err) 29460 } 29461 if err := oprot.WriteFieldEnd(ctx); err != nil { 29462 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } 29463 return err 29464 } 29465 29466 func (p *ApplyHasAuthArgs) String() string { 29467 if p == nil { 29468 return "<nil>" 29469 } 29470 return fmt.Sprintf("ApplyHasAuthArgs(%+v)", *p) 29471 } 29472 29473 // Attributes: 29474 // - Success 29475 type ApplyHasAuthResult struct { 29476 Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` 29477 } 29478 29479 func NewApplyHasAuthResult() *ApplyHasAuthResult { 29480 return &ApplyHasAuthResult{} 29481 } 29482 29483 var ApplyHasAuthResult_Success_DEFAULT bool 29484 func (p *ApplyHasAuthResult) GetSuccess() bool { 29485 if !p.IsSetSuccess() { 29486 return ApplyHasAuthResult_Success_DEFAULT 29487 } 29488 return *p.Success 29489 } 29490 func (p *ApplyHasAuthResult) IsSetSuccess() bool { 29491 return p.Success != nil 29492 } 29493 29494 func (p *ApplyHasAuthResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 29495 if _, err := iprot.ReadStructBegin(ctx); err != nil { 29496 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 29497 } 29498 29499 29500 for { 29501 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 29502 if err != nil { 29503 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 29504 } 29505 if fieldTypeId == thrift.STOP { break; } 29506 switch fieldId { 29507 case 0: 29508 if fieldTypeId == thrift.BOOL { 29509 if err := p.ReadField0(ctx, iprot); err != nil { 29510 return err 29511 } 29512 } else { 29513 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29514 return err 29515 } 29516 } 29517 default: 29518 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29519 return err 29520 } 29521 } 29522 if err := iprot.ReadFieldEnd(ctx); err != nil { 29523 return err 29524 } 29525 } 29526 if err := iprot.ReadStructEnd(ctx); err != nil { 29527 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 29528 } 29529 return nil 29530 } 29531 29532 func (p *ApplyHasAuthResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 29533 if v, err := iprot.ReadBool(ctx); err != nil { 29534 return thrift.PrependError("error reading field 0: ", err) 29535 } else { 29536 p.Success = &v 29537 } 29538 return nil 29539 } 29540 29541 func (p *ApplyHasAuthResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 29542 if err := oprot.WriteStructBegin(ctx, "has_auth_result"); err != nil { 29543 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 29544 if p != nil { 29545 if err := p.writeField0(ctx, oprot); err != nil { return err } 29546 } 29547 if err := oprot.WriteFieldStop(ctx); err != nil { 29548 return thrift.PrependError("write field stop error: ", err) } 29549 if err := oprot.WriteStructEnd(ctx); err != nil { 29550 return thrift.PrependError("write struct stop error: ", err) } 29551 return nil 29552 } 29553 29554 func (p *ApplyHasAuthResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 29555 if p.IsSetSuccess() { 29556 if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { 29557 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 29558 if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { 29559 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 29560 if err := oprot.WriteFieldEnd(ctx); err != nil { 29561 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 29562 } 29563 return err 29564 } 29565 29566 func (p *ApplyHasAuthResult) String() string { 29567 if p == nil { 29568 return "<nil>" 29569 } 29570 return fmt.Sprintf("ApplyHasAuthResult(%+v)", *p) 29571 } 29572 29573 // Attributes: 29574 // - Name 29575 // - Permission 29576 type ApplyRequireAuth2Args struct { 29577 Name *Uint64 `thrift:"name,1" db:"name" json:"name"` 29578 Permission *Uint64 `thrift:"permission,2" db:"permission" json:"permission"` 29579 } 29580 29581 func NewApplyRequireAuth2Args() *ApplyRequireAuth2Args { 29582 return &ApplyRequireAuth2Args{} 29583 } 29584 29585 var ApplyRequireAuth2Args_Name_DEFAULT *Uint64 29586 func (p *ApplyRequireAuth2Args) GetName() *Uint64 { 29587 if !p.IsSetName() { 29588 return ApplyRequireAuth2Args_Name_DEFAULT 29589 } 29590 return p.Name 29591 } 29592 var ApplyRequireAuth2Args_Permission_DEFAULT *Uint64 29593 func (p *ApplyRequireAuth2Args) GetPermission() *Uint64 { 29594 if !p.IsSetPermission() { 29595 return ApplyRequireAuth2Args_Permission_DEFAULT 29596 } 29597 return p.Permission 29598 } 29599 func (p *ApplyRequireAuth2Args) IsSetName() bool { 29600 return p.Name != nil 29601 } 29602 29603 func (p *ApplyRequireAuth2Args) IsSetPermission() bool { 29604 return p.Permission != nil 29605 } 29606 29607 func (p *ApplyRequireAuth2Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 29608 if _, err := iprot.ReadStructBegin(ctx); err != nil { 29609 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 29610 } 29611 29612 29613 for { 29614 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 29615 if err != nil { 29616 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 29617 } 29618 if fieldTypeId == thrift.STOP { break; } 29619 switch fieldId { 29620 case 1: 29621 if fieldTypeId == thrift.STRUCT { 29622 if err := p.ReadField1(ctx, iprot); err != nil { 29623 return err 29624 } 29625 } else { 29626 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29627 return err 29628 } 29629 } 29630 case 2: 29631 if fieldTypeId == thrift.STRUCT { 29632 if err := p.ReadField2(ctx, iprot); err != nil { 29633 return err 29634 } 29635 } else { 29636 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29637 return err 29638 } 29639 } 29640 default: 29641 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29642 return err 29643 } 29644 } 29645 if err := iprot.ReadFieldEnd(ctx); err != nil { 29646 return err 29647 } 29648 } 29649 if err := iprot.ReadStructEnd(ctx); err != nil { 29650 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 29651 } 29652 return nil 29653 } 29654 29655 func (p *ApplyRequireAuth2Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 29656 p.Name = &Uint64{} 29657 if err := p.Name.Read(ctx, iprot); err != nil { 29658 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Name), err) 29659 } 29660 return nil 29661 } 29662 29663 func (p *ApplyRequireAuth2Args) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 29664 p.Permission = &Uint64{} 29665 if err := p.Permission.Read(ctx, iprot); err != nil { 29666 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Permission), err) 29667 } 29668 return nil 29669 } 29670 29671 func (p *ApplyRequireAuth2Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 29672 if err := oprot.WriteStructBegin(ctx, "require_auth2_args"); err != nil { 29673 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 29674 if p != nil { 29675 if err := p.writeField1(ctx, oprot); err != nil { return err } 29676 if err := p.writeField2(ctx, oprot); err != nil { return err } 29677 } 29678 if err := oprot.WriteFieldStop(ctx); err != nil { 29679 return thrift.PrependError("write field stop error: ", err) } 29680 if err := oprot.WriteStructEnd(ctx); err != nil { 29681 return thrift.PrependError("write struct stop error: ", err) } 29682 return nil 29683 } 29684 29685 func (p *ApplyRequireAuth2Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 29686 if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRUCT, 1); err != nil { 29687 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } 29688 if err := p.Name.Write(ctx, oprot); err != nil { 29689 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Name), err) 29690 } 29691 if err := oprot.WriteFieldEnd(ctx); err != nil { 29692 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } 29693 return err 29694 } 29695 29696 func (p *ApplyRequireAuth2Args) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 29697 if err := oprot.WriteFieldBegin(ctx, "permission", thrift.STRUCT, 2); err != nil { 29698 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:permission: ", p), err) } 29699 if err := p.Permission.Write(ctx, oprot); err != nil { 29700 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Permission), err) 29701 } 29702 if err := oprot.WriteFieldEnd(ctx); err != nil { 29703 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:permission: ", p), err) } 29704 return err 29705 } 29706 29707 func (p *ApplyRequireAuth2Args) String() string { 29708 if p == nil { 29709 return "<nil>" 29710 } 29711 return fmt.Sprintf("ApplyRequireAuth2Args(%+v)", *p) 29712 } 29713 29714 type ApplyRequireAuth2Result struct { 29715 } 29716 29717 func NewApplyRequireAuth2Result() *ApplyRequireAuth2Result { 29718 return &ApplyRequireAuth2Result{} 29719 } 29720 29721 func (p *ApplyRequireAuth2Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 29722 if _, err := iprot.ReadStructBegin(ctx); err != nil { 29723 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 29724 } 29725 29726 29727 for { 29728 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 29729 if err != nil { 29730 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 29731 } 29732 if fieldTypeId == thrift.STOP { break; } 29733 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29734 return err 29735 } 29736 if err := iprot.ReadFieldEnd(ctx); err != nil { 29737 return err 29738 } 29739 } 29740 if err := iprot.ReadStructEnd(ctx); err != nil { 29741 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 29742 } 29743 return nil 29744 } 29745 29746 func (p *ApplyRequireAuth2Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 29747 if err := oprot.WriteStructBegin(ctx, "require_auth2_result"); err != nil { 29748 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 29749 if p != nil { 29750 } 29751 if err := oprot.WriteFieldStop(ctx); err != nil { 29752 return thrift.PrependError("write field stop error: ", err) } 29753 if err := oprot.WriteStructEnd(ctx); err != nil { 29754 return thrift.PrependError("write struct stop error: ", err) } 29755 return nil 29756 } 29757 29758 func (p *ApplyRequireAuth2Result) String() string { 29759 if p == nil { 29760 return "<nil>" 29761 } 29762 return fmt.Sprintf("ApplyRequireAuth2Result(%+v)", *p) 29763 } 29764 29765 // Attributes: 29766 // - Name 29767 type ApplyIsAccountArgs struct { 29768 Name *Uint64 `thrift:"name,1" db:"name" json:"name"` 29769 } 29770 29771 func NewApplyIsAccountArgs() *ApplyIsAccountArgs { 29772 return &ApplyIsAccountArgs{} 29773 } 29774 29775 var ApplyIsAccountArgs_Name_DEFAULT *Uint64 29776 func (p *ApplyIsAccountArgs) GetName() *Uint64 { 29777 if !p.IsSetName() { 29778 return ApplyIsAccountArgs_Name_DEFAULT 29779 } 29780 return p.Name 29781 } 29782 func (p *ApplyIsAccountArgs) IsSetName() bool { 29783 return p.Name != nil 29784 } 29785 29786 func (p *ApplyIsAccountArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 29787 if _, err := iprot.ReadStructBegin(ctx); err != nil { 29788 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 29789 } 29790 29791 29792 for { 29793 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 29794 if err != nil { 29795 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 29796 } 29797 if fieldTypeId == thrift.STOP { break; } 29798 switch fieldId { 29799 case 1: 29800 if fieldTypeId == thrift.STRUCT { 29801 if err := p.ReadField1(ctx, iprot); err != nil { 29802 return err 29803 } 29804 } else { 29805 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29806 return err 29807 } 29808 } 29809 default: 29810 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29811 return err 29812 } 29813 } 29814 if err := iprot.ReadFieldEnd(ctx); err != nil { 29815 return err 29816 } 29817 } 29818 if err := iprot.ReadStructEnd(ctx); err != nil { 29819 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 29820 } 29821 return nil 29822 } 29823 29824 func (p *ApplyIsAccountArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 29825 p.Name = &Uint64{} 29826 if err := p.Name.Read(ctx, iprot); err != nil { 29827 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Name), err) 29828 } 29829 return nil 29830 } 29831 29832 func (p *ApplyIsAccountArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 29833 if err := oprot.WriteStructBegin(ctx, "is_account_args"); err != nil { 29834 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 29835 if p != nil { 29836 if err := p.writeField1(ctx, oprot); err != nil { return err } 29837 } 29838 if err := oprot.WriteFieldStop(ctx); err != nil { 29839 return thrift.PrependError("write field stop error: ", err) } 29840 if err := oprot.WriteStructEnd(ctx); err != nil { 29841 return thrift.PrependError("write struct stop error: ", err) } 29842 return nil 29843 } 29844 29845 func (p *ApplyIsAccountArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 29846 if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRUCT, 1); err != nil { 29847 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } 29848 if err := p.Name.Write(ctx, oprot); err != nil { 29849 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Name), err) 29850 } 29851 if err := oprot.WriteFieldEnd(ctx); err != nil { 29852 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } 29853 return err 29854 } 29855 29856 func (p *ApplyIsAccountArgs) String() string { 29857 if p == nil { 29858 return "<nil>" 29859 } 29860 return fmt.Sprintf("ApplyIsAccountArgs(%+v)", *p) 29861 } 29862 29863 // Attributes: 29864 // - Success 29865 type ApplyIsAccountResult struct { 29866 Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` 29867 } 29868 29869 func NewApplyIsAccountResult() *ApplyIsAccountResult { 29870 return &ApplyIsAccountResult{} 29871 } 29872 29873 var ApplyIsAccountResult_Success_DEFAULT bool 29874 func (p *ApplyIsAccountResult) GetSuccess() bool { 29875 if !p.IsSetSuccess() { 29876 return ApplyIsAccountResult_Success_DEFAULT 29877 } 29878 return *p.Success 29879 } 29880 func (p *ApplyIsAccountResult) IsSetSuccess() bool { 29881 return p.Success != nil 29882 } 29883 29884 func (p *ApplyIsAccountResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 29885 if _, err := iprot.ReadStructBegin(ctx); err != nil { 29886 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 29887 } 29888 29889 29890 for { 29891 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 29892 if err != nil { 29893 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 29894 } 29895 if fieldTypeId == thrift.STOP { break; } 29896 switch fieldId { 29897 case 0: 29898 if fieldTypeId == thrift.BOOL { 29899 if err := p.ReadField0(ctx, iprot); err != nil { 29900 return err 29901 } 29902 } else { 29903 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29904 return err 29905 } 29906 } 29907 default: 29908 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29909 return err 29910 } 29911 } 29912 if err := iprot.ReadFieldEnd(ctx); err != nil { 29913 return err 29914 } 29915 } 29916 if err := iprot.ReadStructEnd(ctx); err != nil { 29917 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 29918 } 29919 return nil 29920 } 29921 29922 func (p *ApplyIsAccountResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 29923 if v, err := iprot.ReadBool(ctx); err != nil { 29924 return thrift.PrependError("error reading field 0: ", err) 29925 } else { 29926 p.Success = &v 29927 } 29928 return nil 29929 } 29930 29931 func (p *ApplyIsAccountResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 29932 if err := oprot.WriteStructBegin(ctx, "is_account_result"); err != nil { 29933 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 29934 if p != nil { 29935 if err := p.writeField0(ctx, oprot); err != nil { return err } 29936 } 29937 if err := oprot.WriteFieldStop(ctx); err != nil { 29938 return thrift.PrependError("write field stop error: ", err) } 29939 if err := oprot.WriteStructEnd(ctx); err != nil { 29940 return thrift.PrependError("write struct stop error: ", err) } 29941 return nil 29942 } 29943 29944 func (p *ApplyIsAccountResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 29945 if p.IsSetSuccess() { 29946 if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { 29947 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 29948 if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { 29949 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 29950 if err := oprot.WriteFieldEnd(ctx); err != nil { 29951 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 29952 } 29953 return err 29954 } 29955 29956 func (p *ApplyIsAccountResult) String() string { 29957 if p == nil { 29958 return "<nil>" 29959 } 29960 return fmt.Sprintf("ApplyIsAccountResult(%+v)", *p) 29961 } 29962 29963 // Attributes: 29964 // - SerializedAction 29965 type ApplySendInlineArgs struct { 29966 SerializedAction []byte `thrift:"serialized_action,1" db:"serialized_action" json:"serialized_action"` 29967 } 29968 29969 func NewApplySendInlineArgs() *ApplySendInlineArgs { 29970 return &ApplySendInlineArgs{} 29971 } 29972 29973 29974 func (p *ApplySendInlineArgs) GetSerializedAction() []byte { 29975 return p.SerializedAction 29976 } 29977 func (p *ApplySendInlineArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 29978 if _, err := iprot.ReadStructBegin(ctx); err != nil { 29979 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 29980 } 29981 29982 29983 for { 29984 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 29985 if err != nil { 29986 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 29987 } 29988 if fieldTypeId == thrift.STOP { break; } 29989 switch fieldId { 29990 case 1: 29991 if fieldTypeId == thrift.STRING { 29992 if err := p.ReadField1(ctx, iprot); err != nil { 29993 return err 29994 } 29995 } else { 29996 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 29997 return err 29998 } 29999 } 30000 default: 30001 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30002 return err 30003 } 30004 } 30005 if err := iprot.ReadFieldEnd(ctx); err != nil { 30006 return err 30007 } 30008 } 30009 if err := iprot.ReadStructEnd(ctx); err != nil { 30010 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30011 } 30012 return nil 30013 } 30014 30015 func (p *ApplySendInlineArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 30016 if v, err := iprot.ReadBinary(ctx); err != nil { 30017 return thrift.PrependError("error reading field 1: ", err) 30018 } else { 30019 p.SerializedAction = v 30020 } 30021 return nil 30022 } 30023 30024 func (p *ApplySendInlineArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 30025 if err := oprot.WriteStructBegin(ctx, "send_inline_args"); err != nil { 30026 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 30027 if p != nil { 30028 if err := p.writeField1(ctx, oprot); err != nil { return err } 30029 } 30030 if err := oprot.WriteFieldStop(ctx); err != nil { 30031 return thrift.PrependError("write field stop error: ", err) } 30032 if err := oprot.WriteStructEnd(ctx); err != nil { 30033 return thrift.PrependError("write struct stop error: ", err) } 30034 return nil 30035 } 30036 30037 func (p *ApplySendInlineArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 30038 if err := oprot.WriteFieldBegin(ctx, "serialized_action", thrift.STRING, 1); err != nil { 30039 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:serialized_action: ", p), err) } 30040 if err := oprot.WriteBinary(ctx, p.SerializedAction); err != nil { 30041 return thrift.PrependError(fmt.Sprintf("%T.serialized_action (1) field write error: ", p), err) } 30042 if err := oprot.WriteFieldEnd(ctx); err != nil { 30043 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:serialized_action: ", p), err) } 30044 return err 30045 } 30046 30047 func (p *ApplySendInlineArgs) String() string { 30048 if p == nil { 30049 return "<nil>" 30050 } 30051 return fmt.Sprintf("ApplySendInlineArgs(%+v)", *p) 30052 } 30053 30054 type ApplySendInlineResult struct { 30055 } 30056 30057 func NewApplySendInlineResult() *ApplySendInlineResult { 30058 return &ApplySendInlineResult{} 30059 } 30060 30061 func (p *ApplySendInlineResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 30062 if _, err := iprot.ReadStructBegin(ctx); err != nil { 30063 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 30064 } 30065 30066 30067 for { 30068 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 30069 if err != nil { 30070 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 30071 } 30072 if fieldTypeId == thrift.STOP { break; } 30073 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30074 return err 30075 } 30076 if err := iprot.ReadFieldEnd(ctx); err != nil { 30077 return err 30078 } 30079 } 30080 if err := iprot.ReadStructEnd(ctx); err != nil { 30081 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30082 } 30083 return nil 30084 } 30085 30086 func (p *ApplySendInlineResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 30087 if err := oprot.WriteStructBegin(ctx, "send_inline_result"); err != nil { 30088 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 30089 if p != nil { 30090 } 30091 if err := oprot.WriteFieldStop(ctx); err != nil { 30092 return thrift.PrependError("write field stop error: ", err) } 30093 if err := oprot.WriteStructEnd(ctx); err != nil { 30094 return thrift.PrependError("write struct stop error: ", err) } 30095 return nil 30096 } 30097 30098 func (p *ApplySendInlineResult) String() string { 30099 if p == nil { 30100 return "<nil>" 30101 } 30102 return fmt.Sprintf("ApplySendInlineResult(%+v)", *p) 30103 } 30104 30105 // Attributes: 30106 // - SerializedData 30107 type ApplySendContextFreeInlineArgs struct { 30108 SerializedData []byte `thrift:"serialized_data,1" db:"serialized_data" json:"serialized_data"` 30109 } 30110 30111 func NewApplySendContextFreeInlineArgs() *ApplySendContextFreeInlineArgs { 30112 return &ApplySendContextFreeInlineArgs{} 30113 } 30114 30115 30116 func (p *ApplySendContextFreeInlineArgs) GetSerializedData() []byte { 30117 return p.SerializedData 30118 } 30119 func (p *ApplySendContextFreeInlineArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 30120 if _, err := iprot.ReadStructBegin(ctx); err != nil { 30121 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 30122 } 30123 30124 30125 for { 30126 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 30127 if err != nil { 30128 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 30129 } 30130 if fieldTypeId == thrift.STOP { break; } 30131 switch fieldId { 30132 case 1: 30133 if fieldTypeId == thrift.STRING { 30134 if err := p.ReadField1(ctx, iprot); err != nil { 30135 return err 30136 } 30137 } else { 30138 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30139 return err 30140 } 30141 } 30142 default: 30143 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30144 return err 30145 } 30146 } 30147 if err := iprot.ReadFieldEnd(ctx); err != nil { 30148 return err 30149 } 30150 } 30151 if err := iprot.ReadStructEnd(ctx); err != nil { 30152 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30153 } 30154 return nil 30155 } 30156 30157 func (p *ApplySendContextFreeInlineArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 30158 if v, err := iprot.ReadBinary(ctx); err != nil { 30159 return thrift.PrependError("error reading field 1: ", err) 30160 } else { 30161 p.SerializedData = v 30162 } 30163 return nil 30164 } 30165 30166 func (p *ApplySendContextFreeInlineArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 30167 if err := oprot.WriteStructBegin(ctx, "send_context_free_inline_args"); err != nil { 30168 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 30169 if p != nil { 30170 if err := p.writeField1(ctx, oprot); err != nil { return err } 30171 } 30172 if err := oprot.WriteFieldStop(ctx); err != nil { 30173 return thrift.PrependError("write field stop error: ", err) } 30174 if err := oprot.WriteStructEnd(ctx); err != nil { 30175 return thrift.PrependError("write struct stop error: ", err) } 30176 return nil 30177 } 30178 30179 func (p *ApplySendContextFreeInlineArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 30180 if err := oprot.WriteFieldBegin(ctx, "serialized_data", thrift.STRING, 1); err != nil { 30181 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:serialized_data: ", p), err) } 30182 if err := oprot.WriteBinary(ctx, p.SerializedData); err != nil { 30183 return thrift.PrependError(fmt.Sprintf("%T.serialized_data (1) field write error: ", p), err) } 30184 if err := oprot.WriteFieldEnd(ctx); err != nil { 30185 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:serialized_data: ", p), err) } 30186 return err 30187 } 30188 30189 func (p *ApplySendContextFreeInlineArgs) String() string { 30190 if p == nil { 30191 return "<nil>" 30192 } 30193 return fmt.Sprintf("ApplySendContextFreeInlineArgs(%+v)", *p) 30194 } 30195 30196 type ApplySendContextFreeInlineResult struct { 30197 } 30198 30199 func NewApplySendContextFreeInlineResult() *ApplySendContextFreeInlineResult { 30200 return &ApplySendContextFreeInlineResult{} 30201 } 30202 30203 func (p *ApplySendContextFreeInlineResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 30204 if _, err := iprot.ReadStructBegin(ctx); err != nil { 30205 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 30206 } 30207 30208 30209 for { 30210 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 30211 if err != nil { 30212 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 30213 } 30214 if fieldTypeId == thrift.STOP { break; } 30215 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30216 return err 30217 } 30218 if err := iprot.ReadFieldEnd(ctx); err != nil { 30219 return err 30220 } 30221 } 30222 if err := iprot.ReadStructEnd(ctx); err != nil { 30223 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30224 } 30225 return nil 30226 } 30227 30228 func (p *ApplySendContextFreeInlineResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 30229 if err := oprot.WriteStructBegin(ctx, "send_context_free_inline_result"); err != nil { 30230 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 30231 if p != nil { 30232 } 30233 if err := oprot.WriteFieldStop(ctx); err != nil { 30234 return thrift.PrependError("write field stop error: ", err) } 30235 if err := oprot.WriteStructEnd(ctx); err != nil { 30236 return thrift.PrependError("write struct stop error: ", err) } 30237 return nil 30238 } 30239 30240 func (p *ApplySendContextFreeInlineResult) String() string { 30241 if p == nil { 30242 return "<nil>" 30243 } 30244 return fmt.Sprintf("ApplySendContextFreeInlineResult(%+v)", *p) 30245 } 30246 30247 type ApplyPublicationTimeArgs struct { 30248 } 30249 30250 func NewApplyPublicationTimeArgs() *ApplyPublicationTimeArgs { 30251 return &ApplyPublicationTimeArgs{} 30252 } 30253 30254 func (p *ApplyPublicationTimeArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 30255 if _, err := iprot.ReadStructBegin(ctx); err != nil { 30256 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 30257 } 30258 30259 30260 for { 30261 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 30262 if err != nil { 30263 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 30264 } 30265 if fieldTypeId == thrift.STOP { break; } 30266 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30267 return err 30268 } 30269 if err := iprot.ReadFieldEnd(ctx); err != nil { 30270 return err 30271 } 30272 } 30273 if err := iprot.ReadStructEnd(ctx); err != nil { 30274 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30275 } 30276 return nil 30277 } 30278 30279 func (p *ApplyPublicationTimeArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 30280 if err := oprot.WriteStructBegin(ctx, "publication_time_args"); err != nil { 30281 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 30282 if p != nil { 30283 } 30284 if err := oprot.WriteFieldStop(ctx); err != nil { 30285 return thrift.PrependError("write field stop error: ", err) } 30286 if err := oprot.WriteStructEnd(ctx); err != nil { 30287 return thrift.PrependError("write struct stop error: ", err) } 30288 return nil 30289 } 30290 30291 func (p *ApplyPublicationTimeArgs) String() string { 30292 if p == nil { 30293 return "<nil>" 30294 } 30295 return fmt.Sprintf("ApplyPublicationTimeArgs(%+v)", *p) 30296 } 30297 30298 // Attributes: 30299 // - Success 30300 type ApplyPublicationTimeResult struct { 30301 Success *Uint64 `thrift:"success,0" db:"success" json:"success,omitempty"` 30302 } 30303 30304 func NewApplyPublicationTimeResult() *ApplyPublicationTimeResult { 30305 return &ApplyPublicationTimeResult{} 30306 } 30307 30308 var ApplyPublicationTimeResult_Success_DEFAULT *Uint64 30309 func (p *ApplyPublicationTimeResult) GetSuccess() *Uint64 { 30310 if !p.IsSetSuccess() { 30311 return ApplyPublicationTimeResult_Success_DEFAULT 30312 } 30313 return p.Success 30314 } 30315 func (p *ApplyPublicationTimeResult) IsSetSuccess() bool { 30316 return p.Success != nil 30317 } 30318 30319 func (p *ApplyPublicationTimeResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 30320 if _, err := iprot.ReadStructBegin(ctx); err != nil { 30321 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 30322 } 30323 30324 30325 for { 30326 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 30327 if err != nil { 30328 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 30329 } 30330 if fieldTypeId == thrift.STOP { break; } 30331 switch fieldId { 30332 case 0: 30333 if fieldTypeId == thrift.STRUCT { 30334 if err := p.ReadField0(ctx, iprot); err != nil { 30335 return err 30336 } 30337 } else { 30338 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30339 return err 30340 } 30341 } 30342 default: 30343 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30344 return err 30345 } 30346 } 30347 if err := iprot.ReadFieldEnd(ctx); err != nil { 30348 return err 30349 } 30350 } 30351 if err := iprot.ReadStructEnd(ctx); err != nil { 30352 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30353 } 30354 return nil 30355 } 30356 30357 func (p *ApplyPublicationTimeResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 30358 p.Success = &Uint64{} 30359 if err := p.Success.Read(ctx, iprot); err != nil { 30360 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 30361 } 30362 return nil 30363 } 30364 30365 func (p *ApplyPublicationTimeResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 30366 if err := oprot.WriteStructBegin(ctx, "publication_time_result"); err != nil { 30367 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 30368 if p != nil { 30369 if err := p.writeField0(ctx, oprot); err != nil { return err } 30370 } 30371 if err := oprot.WriteFieldStop(ctx); err != nil { 30372 return thrift.PrependError("write field stop error: ", err) } 30373 if err := oprot.WriteStructEnd(ctx); err != nil { 30374 return thrift.PrependError("write struct stop error: ", err) } 30375 return nil 30376 } 30377 30378 func (p *ApplyPublicationTimeResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 30379 if p.IsSetSuccess() { 30380 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 30381 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 30382 if err := p.Success.Write(ctx, oprot); err != nil { 30383 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 30384 } 30385 if err := oprot.WriteFieldEnd(ctx); err != nil { 30386 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 30387 } 30388 return err 30389 } 30390 30391 func (p *ApplyPublicationTimeResult) String() string { 30392 if p == nil { 30393 return "<nil>" 30394 } 30395 return fmt.Sprintf("ApplyPublicationTimeResult(%+v)", *p) 30396 } 30397 30398 type ApplyCurrentReceiverArgs struct { 30399 } 30400 30401 func NewApplyCurrentReceiverArgs() *ApplyCurrentReceiverArgs { 30402 return &ApplyCurrentReceiverArgs{} 30403 } 30404 30405 func (p *ApplyCurrentReceiverArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 30406 if _, err := iprot.ReadStructBegin(ctx); err != nil { 30407 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 30408 } 30409 30410 30411 for { 30412 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 30413 if err != nil { 30414 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 30415 } 30416 if fieldTypeId == thrift.STOP { break; } 30417 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30418 return err 30419 } 30420 if err := iprot.ReadFieldEnd(ctx); err != nil { 30421 return err 30422 } 30423 } 30424 if err := iprot.ReadStructEnd(ctx); err != nil { 30425 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30426 } 30427 return nil 30428 } 30429 30430 func (p *ApplyCurrentReceiverArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 30431 if err := oprot.WriteStructBegin(ctx, "current_receiver_args"); err != nil { 30432 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 30433 if p != nil { 30434 } 30435 if err := oprot.WriteFieldStop(ctx); err != nil { 30436 return thrift.PrependError("write field stop error: ", err) } 30437 if err := oprot.WriteStructEnd(ctx); err != nil { 30438 return thrift.PrependError("write struct stop error: ", err) } 30439 return nil 30440 } 30441 30442 func (p *ApplyCurrentReceiverArgs) String() string { 30443 if p == nil { 30444 return "<nil>" 30445 } 30446 return fmt.Sprintf("ApplyCurrentReceiverArgs(%+v)", *p) 30447 } 30448 30449 // Attributes: 30450 // - Success 30451 type ApplyCurrentReceiverResult struct { 30452 Success *Uint64 `thrift:"success,0" db:"success" json:"success,omitempty"` 30453 } 30454 30455 func NewApplyCurrentReceiverResult() *ApplyCurrentReceiverResult { 30456 return &ApplyCurrentReceiverResult{} 30457 } 30458 30459 var ApplyCurrentReceiverResult_Success_DEFAULT *Uint64 30460 func (p *ApplyCurrentReceiverResult) GetSuccess() *Uint64 { 30461 if !p.IsSetSuccess() { 30462 return ApplyCurrentReceiverResult_Success_DEFAULT 30463 } 30464 return p.Success 30465 } 30466 func (p *ApplyCurrentReceiverResult) IsSetSuccess() bool { 30467 return p.Success != nil 30468 } 30469 30470 func (p *ApplyCurrentReceiverResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 30471 if _, err := iprot.ReadStructBegin(ctx); err != nil { 30472 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 30473 } 30474 30475 30476 for { 30477 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 30478 if err != nil { 30479 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 30480 } 30481 if fieldTypeId == thrift.STOP { break; } 30482 switch fieldId { 30483 case 0: 30484 if fieldTypeId == thrift.STRUCT { 30485 if err := p.ReadField0(ctx, iprot); err != nil { 30486 return err 30487 } 30488 } else { 30489 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30490 return err 30491 } 30492 } 30493 default: 30494 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30495 return err 30496 } 30497 } 30498 if err := iprot.ReadFieldEnd(ctx); err != nil { 30499 return err 30500 } 30501 } 30502 if err := iprot.ReadStructEnd(ctx); err != nil { 30503 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30504 } 30505 return nil 30506 } 30507 30508 func (p *ApplyCurrentReceiverResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 30509 p.Success = &Uint64{} 30510 if err := p.Success.Read(ctx, iprot); err != nil { 30511 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 30512 } 30513 return nil 30514 } 30515 30516 func (p *ApplyCurrentReceiverResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 30517 if err := oprot.WriteStructBegin(ctx, "current_receiver_result"); err != nil { 30518 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 30519 if p != nil { 30520 if err := p.writeField0(ctx, oprot); err != nil { return err } 30521 } 30522 if err := oprot.WriteFieldStop(ctx); err != nil { 30523 return thrift.PrependError("write field stop error: ", err) } 30524 if err := oprot.WriteStructEnd(ctx); err != nil { 30525 return thrift.PrependError("write struct stop error: ", err) } 30526 return nil 30527 } 30528 30529 func (p *ApplyCurrentReceiverResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 30530 if p.IsSetSuccess() { 30531 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 30532 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 30533 if err := p.Success.Write(ctx, oprot); err != nil { 30534 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 30535 } 30536 if err := oprot.WriteFieldEnd(ctx); err != nil { 30537 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 30538 } 30539 return err 30540 } 30541 30542 func (p *ApplyCurrentReceiverResult) String() string { 30543 if p == nil { 30544 return "<nil>" 30545 } 30546 return fmt.Sprintf("ApplyCurrentReceiverResult(%+v)", *p) 30547 } 30548 30549 // Attributes: 30550 // - Test 30551 // - Msg 30552 type ApplyEosioAssertArgs struct { 30553 Test bool `thrift:"test,1" db:"test" json:"test"` 30554 Msg []byte `thrift:"msg,2" db:"msg" json:"msg"` 30555 } 30556 30557 func NewApplyEosioAssertArgs() *ApplyEosioAssertArgs { 30558 return &ApplyEosioAssertArgs{} 30559 } 30560 30561 30562 func (p *ApplyEosioAssertArgs) GetTest() bool { 30563 return p.Test 30564 } 30565 30566 func (p *ApplyEosioAssertArgs) GetMsg() []byte { 30567 return p.Msg 30568 } 30569 func (p *ApplyEosioAssertArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 30570 if _, err := iprot.ReadStructBegin(ctx); err != nil { 30571 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 30572 } 30573 30574 30575 for { 30576 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 30577 if err != nil { 30578 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 30579 } 30580 if fieldTypeId == thrift.STOP { break; } 30581 switch fieldId { 30582 case 1: 30583 if fieldTypeId == thrift.BOOL { 30584 if err := p.ReadField1(ctx, iprot); err != nil { 30585 return err 30586 } 30587 } else { 30588 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30589 return err 30590 } 30591 } 30592 case 2: 30593 if fieldTypeId == thrift.STRING { 30594 if err := p.ReadField2(ctx, iprot); err != nil { 30595 return err 30596 } 30597 } else { 30598 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30599 return err 30600 } 30601 } 30602 default: 30603 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30604 return err 30605 } 30606 } 30607 if err := iprot.ReadFieldEnd(ctx); err != nil { 30608 return err 30609 } 30610 } 30611 if err := iprot.ReadStructEnd(ctx); err != nil { 30612 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30613 } 30614 return nil 30615 } 30616 30617 func (p *ApplyEosioAssertArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 30618 if v, err := iprot.ReadBool(ctx); err != nil { 30619 return thrift.PrependError("error reading field 1: ", err) 30620 } else { 30621 p.Test = v 30622 } 30623 return nil 30624 } 30625 30626 func (p *ApplyEosioAssertArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 30627 if v, err := iprot.ReadBinary(ctx); err != nil { 30628 return thrift.PrependError("error reading field 2: ", err) 30629 } else { 30630 p.Msg = v 30631 } 30632 return nil 30633 } 30634 30635 func (p *ApplyEosioAssertArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 30636 if err := oprot.WriteStructBegin(ctx, "eosio_assert_args"); err != nil { 30637 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 30638 if p != nil { 30639 if err := p.writeField1(ctx, oprot); err != nil { return err } 30640 if err := p.writeField2(ctx, oprot); err != nil { return err } 30641 } 30642 if err := oprot.WriteFieldStop(ctx); err != nil { 30643 return thrift.PrependError("write field stop error: ", err) } 30644 if err := oprot.WriteStructEnd(ctx); err != nil { 30645 return thrift.PrependError("write struct stop error: ", err) } 30646 return nil 30647 } 30648 30649 func (p *ApplyEosioAssertArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 30650 if err := oprot.WriteFieldBegin(ctx, "test", thrift.BOOL, 1); err != nil { 30651 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:test: ", p), err) } 30652 if err := oprot.WriteBool(ctx, bool(p.Test)); err != nil { 30653 return thrift.PrependError(fmt.Sprintf("%T.test (1) field write error: ", p), err) } 30654 if err := oprot.WriteFieldEnd(ctx); err != nil { 30655 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:test: ", p), err) } 30656 return err 30657 } 30658 30659 func (p *ApplyEosioAssertArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 30660 if err := oprot.WriteFieldBegin(ctx, "msg", thrift.STRING, 2); err != nil { 30661 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:msg: ", p), err) } 30662 if err := oprot.WriteBinary(ctx, p.Msg); err != nil { 30663 return thrift.PrependError(fmt.Sprintf("%T.msg (2) field write error: ", p), err) } 30664 if err := oprot.WriteFieldEnd(ctx); err != nil { 30665 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:msg: ", p), err) } 30666 return err 30667 } 30668 30669 func (p *ApplyEosioAssertArgs) String() string { 30670 if p == nil { 30671 return "<nil>" 30672 } 30673 return fmt.Sprintf("ApplyEosioAssertArgs(%+v)", *p) 30674 } 30675 30676 type ApplyEosioAssertResult struct { 30677 } 30678 30679 func NewApplyEosioAssertResult() *ApplyEosioAssertResult { 30680 return &ApplyEosioAssertResult{} 30681 } 30682 30683 func (p *ApplyEosioAssertResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 30684 if _, err := iprot.ReadStructBegin(ctx); err != nil { 30685 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 30686 } 30687 30688 30689 for { 30690 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 30691 if err != nil { 30692 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 30693 } 30694 if fieldTypeId == thrift.STOP { break; } 30695 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30696 return err 30697 } 30698 if err := iprot.ReadFieldEnd(ctx); err != nil { 30699 return err 30700 } 30701 } 30702 if err := iprot.ReadStructEnd(ctx); err != nil { 30703 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30704 } 30705 return nil 30706 } 30707 30708 func (p *ApplyEosioAssertResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 30709 if err := oprot.WriteStructBegin(ctx, "eosio_assert_result"); err != nil { 30710 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 30711 if p != nil { 30712 } 30713 if err := oprot.WriteFieldStop(ctx); err != nil { 30714 return thrift.PrependError("write field stop error: ", err) } 30715 if err := oprot.WriteStructEnd(ctx); err != nil { 30716 return thrift.PrependError("write struct stop error: ", err) } 30717 return nil 30718 } 30719 30720 func (p *ApplyEosioAssertResult) String() string { 30721 if p == nil { 30722 return "<nil>" 30723 } 30724 return fmt.Sprintf("ApplyEosioAssertResult(%+v)", *p) 30725 } 30726 30727 // Attributes: 30728 // - Test 30729 // - Msg 30730 type ApplyEosioAssertMessageArgs struct { 30731 Test bool `thrift:"test,1" db:"test" json:"test"` 30732 Msg []byte `thrift:"msg,2" db:"msg" json:"msg"` 30733 } 30734 30735 func NewApplyEosioAssertMessageArgs() *ApplyEosioAssertMessageArgs { 30736 return &ApplyEosioAssertMessageArgs{} 30737 } 30738 30739 30740 func (p *ApplyEosioAssertMessageArgs) GetTest() bool { 30741 return p.Test 30742 } 30743 30744 func (p *ApplyEosioAssertMessageArgs) GetMsg() []byte { 30745 return p.Msg 30746 } 30747 func (p *ApplyEosioAssertMessageArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 30748 if _, err := iprot.ReadStructBegin(ctx); err != nil { 30749 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 30750 } 30751 30752 30753 for { 30754 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 30755 if err != nil { 30756 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 30757 } 30758 if fieldTypeId == thrift.STOP { break; } 30759 switch fieldId { 30760 case 1: 30761 if fieldTypeId == thrift.BOOL { 30762 if err := p.ReadField1(ctx, iprot); err != nil { 30763 return err 30764 } 30765 } else { 30766 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30767 return err 30768 } 30769 } 30770 case 2: 30771 if fieldTypeId == thrift.STRING { 30772 if err := p.ReadField2(ctx, iprot); err != nil { 30773 return err 30774 } 30775 } else { 30776 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30777 return err 30778 } 30779 } 30780 default: 30781 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30782 return err 30783 } 30784 } 30785 if err := iprot.ReadFieldEnd(ctx); err != nil { 30786 return err 30787 } 30788 } 30789 if err := iprot.ReadStructEnd(ctx); err != nil { 30790 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30791 } 30792 return nil 30793 } 30794 30795 func (p *ApplyEosioAssertMessageArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 30796 if v, err := iprot.ReadBool(ctx); err != nil { 30797 return thrift.PrependError("error reading field 1: ", err) 30798 } else { 30799 p.Test = v 30800 } 30801 return nil 30802 } 30803 30804 func (p *ApplyEosioAssertMessageArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 30805 if v, err := iprot.ReadBinary(ctx); err != nil { 30806 return thrift.PrependError("error reading field 2: ", err) 30807 } else { 30808 p.Msg = v 30809 } 30810 return nil 30811 } 30812 30813 func (p *ApplyEosioAssertMessageArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 30814 if err := oprot.WriteStructBegin(ctx, "eosio_assert_message_args"); err != nil { 30815 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 30816 if p != nil { 30817 if err := p.writeField1(ctx, oprot); err != nil { return err } 30818 if err := p.writeField2(ctx, oprot); err != nil { return err } 30819 } 30820 if err := oprot.WriteFieldStop(ctx); err != nil { 30821 return thrift.PrependError("write field stop error: ", err) } 30822 if err := oprot.WriteStructEnd(ctx); err != nil { 30823 return thrift.PrependError("write struct stop error: ", err) } 30824 return nil 30825 } 30826 30827 func (p *ApplyEosioAssertMessageArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 30828 if err := oprot.WriteFieldBegin(ctx, "test", thrift.BOOL, 1); err != nil { 30829 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:test: ", p), err) } 30830 if err := oprot.WriteBool(ctx, bool(p.Test)); err != nil { 30831 return thrift.PrependError(fmt.Sprintf("%T.test (1) field write error: ", p), err) } 30832 if err := oprot.WriteFieldEnd(ctx); err != nil { 30833 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:test: ", p), err) } 30834 return err 30835 } 30836 30837 func (p *ApplyEosioAssertMessageArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 30838 if err := oprot.WriteFieldBegin(ctx, "msg", thrift.STRING, 2); err != nil { 30839 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:msg: ", p), err) } 30840 if err := oprot.WriteBinary(ctx, p.Msg); err != nil { 30841 return thrift.PrependError(fmt.Sprintf("%T.msg (2) field write error: ", p), err) } 30842 if err := oprot.WriteFieldEnd(ctx); err != nil { 30843 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:msg: ", p), err) } 30844 return err 30845 } 30846 30847 func (p *ApplyEosioAssertMessageArgs) String() string { 30848 if p == nil { 30849 return "<nil>" 30850 } 30851 return fmt.Sprintf("ApplyEosioAssertMessageArgs(%+v)", *p) 30852 } 30853 30854 type ApplyEosioAssertMessageResult struct { 30855 } 30856 30857 func NewApplyEosioAssertMessageResult() *ApplyEosioAssertMessageResult { 30858 return &ApplyEosioAssertMessageResult{} 30859 } 30860 30861 func (p *ApplyEosioAssertMessageResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 30862 if _, err := iprot.ReadStructBegin(ctx); err != nil { 30863 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 30864 } 30865 30866 30867 for { 30868 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 30869 if err != nil { 30870 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 30871 } 30872 if fieldTypeId == thrift.STOP { break; } 30873 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30874 return err 30875 } 30876 if err := iprot.ReadFieldEnd(ctx); err != nil { 30877 return err 30878 } 30879 } 30880 if err := iprot.ReadStructEnd(ctx); err != nil { 30881 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30882 } 30883 return nil 30884 } 30885 30886 func (p *ApplyEosioAssertMessageResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 30887 if err := oprot.WriteStructBegin(ctx, "eosio_assert_message_result"); err != nil { 30888 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 30889 if p != nil { 30890 } 30891 if err := oprot.WriteFieldStop(ctx); err != nil { 30892 return thrift.PrependError("write field stop error: ", err) } 30893 if err := oprot.WriteStructEnd(ctx); err != nil { 30894 return thrift.PrependError("write struct stop error: ", err) } 30895 return nil 30896 } 30897 30898 func (p *ApplyEosioAssertMessageResult) String() string { 30899 if p == nil { 30900 return "<nil>" 30901 } 30902 return fmt.Sprintf("ApplyEosioAssertMessageResult(%+v)", *p) 30903 } 30904 30905 // Attributes: 30906 // - Test 30907 // - Code 30908 type ApplyEosioAssertCodeArgs struct { 30909 Test bool `thrift:"test,1" db:"test" json:"test"` 30910 Code *Uint64 `thrift:"code,2" db:"code" json:"code"` 30911 } 30912 30913 func NewApplyEosioAssertCodeArgs() *ApplyEosioAssertCodeArgs { 30914 return &ApplyEosioAssertCodeArgs{} 30915 } 30916 30917 30918 func (p *ApplyEosioAssertCodeArgs) GetTest() bool { 30919 return p.Test 30920 } 30921 var ApplyEosioAssertCodeArgs_Code_DEFAULT *Uint64 30922 func (p *ApplyEosioAssertCodeArgs) GetCode() *Uint64 { 30923 if !p.IsSetCode() { 30924 return ApplyEosioAssertCodeArgs_Code_DEFAULT 30925 } 30926 return p.Code 30927 } 30928 func (p *ApplyEosioAssertCodeArgs) IsSetCode() bool { 30929 return p.Code != nil 30930 } 30931 30932 func (p *ApplyEosioAssertCodeArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 30933 if _, err := iprot.ReadStructBegin(ctx); err != nil { 30934 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 30935 } 30936 30937 30938 for { 30939 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 30940 if err != nil { 30941 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 30942 } 30943 if fieldTypeId == thrift.STOP { break; } 30944 switch fieldId { 30945 case 1: 30946 if fieldTypeId == thrift.BOOL { 30947 if err := p.ReadField1(ctx, iprot); err != nil { 30948 return err 30949 } 30950 } else { 30951 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30952 return err 30953 } 30954 } 30955 case 2: 30956 if fieldTypeId == thrift.STRUCT { 30957 if err := p.ReadField2(ctx, iprot); err != nil { 30958 return err 30959 } 30960 } else { 30961 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30962 return err 30963 } 30964 } 30965 default: 30966 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 30967 return err 30968 } 30969 } 30970 if err := iprot.ReadFieldEnd(ctx); err != nil { 30971 return err 30972 } 30973 } 30974 if err := iprot.ReadStructEnd(ctx); err != nil { 30975 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 30976 } 30977 return nil 30978 } 30979 30980 func (p *ApplyEosioAssertCodeArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 30981 if v, err := iprot.ReadBool(ctx); err != nil { 30982 return thrift.PrependError("error reading field 1: ", err) 30983 } else { 30984 p.Test = v 30985 } 30986 return nil 30987 } 30988 30989 func (p *ApplyEosioAssertCodeArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 30990 p.Code = &Uint64{} 30991 if err := p.Code.Read(ctx, iprot); err != nil { 30992 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 30993 } 30994 return nil 30995 } 30996 30997 func (p *ApplyEosioAssertCodeArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 30998 if err := oprot.WriteStructBegin(ctx, "eosio_assert_code_args"); err != nil { 30999 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31000 if p != nil { 31001 if err := p.writeField1(ctx, oprot); err != nil { return err } 31002 if err := p.writeField2(ctx, oprot); err != nil { return err } 31003 } 31004 if err := oprot.WriteFieldStop(ctx); err != nil { 31005 return thrift.PrependError("write field stop error: ", err) } 31006 if err := oprot.WriteStructEnd(ctx); err != nil { 31007 return thrift.PrependError("write struct stop error: ", err) } 31008 return nil 31009 } 31010 31011 func (p *ApplyEosioAssertCodeArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 31012 if err := oprot.WriteFieldBegin(ctx, "test", thrift.BOOL, 1); err != nil { 31013 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:test: ", p), err) } 31014 if err := oprot.WriteBool(ctx, bool(p.Test)); err != nil { 31015 return thrift.PrependError(fmt.Sprintf("%T.test (1) field write error: ", p), err) } 31016 if err := oprot.WriteFieldEnd(ctx); err != nil { 31017 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:test: ", p), err) } 31018 return err 31019 } 31020 31021 func (p *ApplyEosioAssertCodeArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 31022 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 2); err != nil { 31023 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:code: ", p), err) } 31024 if err := p.Code.Write(ctx, oprot); err != nil { 31025 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 31026 } 31027 if err := oprot.WriteFieldEnd(ctx); err != nil { 31028 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:code: ", p), err) } 31029 return err 31030 } 31031 31032 func (p *ApplyEosioAssertCodeArgs) String() string { 31033 if p == nil { 31034 return "<nil>" 31035 } 31036 return fmt.Sprintf("ApplyEosioAssertCodeArgs(%+v)", *p) 31037 } 31038 31039 type ApplyEosioAssertCodeResult struct { 31040 } 31041 31042 func NewApplyEosioAssertCodeResult() *ApplyEosioAssertCodeResult { 31043 return &ApplyEosioAssertCodeResult{} 31044 } 31045 31046 func (p *ApplyEosioAssertCodeResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 31047 if _, err := iprot.ReadStructBegin(ctx); err != nil { 31048 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 31049 } 31050 31051 31052 for { 31053 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 31054 if err != nil { 31055 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 31056 } 31057 if fieldTypeId == thrift.STOP { break; } 31058 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31059 return err 31060 } 31061 if err := iprot.ReadFieldEnd(ctx); err != nil { 31062 return err 31063 } 31064 } 31065 if err := iprot.ReadStructEnd(ctx); err != nil { 31066 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 31067 } 31068 return nil 31069 } 31070 31071 func (p *ApplyEosioAssertCodeResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 31072 if err := oprot.WriteStructBegin(ctx, "eosio_assert_code_result"); err != nil { 31073 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31074 if p != nil { 31075 } 31076 if err := oprot.WriteFieldStop(ctx); err != nil { 31077 return thrift.PrependError("write field stop error: ", err) } 31078 if err := oprot.WriteStructEnd(ctx); err != nil { 31079 return thrift.PrependError("write struct stop error: ", err) } 31080 return nil 31081 } 31082 31083 func (p *ApplyEosioAssertCodeResult) String() string { 31084 if p == nil { 31085 return "<nil>" 31086 } 31087 return fmt.Sprintf("ApplyEosioAssertCodeResult(%+v)", *p) 31088 } 31089 31090 // Attributes: 31091 // - Code 31092 type ApplyEosioExitArgs struct { 31093 Code int32 `thrift:"code,1" db:"code" json:"code"` 31094 } 31095 31096 func NewApplyEosioExitArgs() *ApplyEosioExitArgs { 31097 return &ApplyEosioExitArgs{} 31098 } 31099 31100 31101 func (p *ApplyEosioExitArgs) GetCode() int32 { 31102 return p.Code 31103 } 31104 func (p *ApplyEosioExitArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 31105 if _, err := iprot.ReadStructBegin(ctx); err != nil { 31106 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 31107 } 31108 31109 31110 for { 31111 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 31112 if err != nil { 31113 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 31114 } 31115 if fieldTypeId == thrift.STOP { break; } 31116 switch fieldId { 31117 case 1: 31118 if fieldTypeId == thrift.I32 { 31119 if err := p.ReadField1(ctx, iprot); err != nil { 31120 return err 31121 } 31122 } else { 31123 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31124 return err 31125 } 31126 } 31127 default: 31128 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31129 return err 31130 } 31131 } 31132 if err := iprot.ReadFieldEnd(ctx); err != nil { 31133 return err 31134 } 31135 } 31136 if err := iprot.ReadStructEnd(ctx); err != nil { 31137 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 31138 } 31139 return nil 31140 } 31141 31142 func (p *ApplyEosioExitArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 31143 if v, err := iprot.ReadI32(ctx); err != nil { 31144 return thrift.PrependError("error reading field 1: ", err) 31145 } else { 31146 p.Code = v 31147 } 31148 return nil 31149 } 31150 31151 func (p *ApplyEosioExitArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 31152 if err := oprot.WriteStructBegin(ctx, "eosio_exit_args"); err != nil { 31153 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31154 if p != nil { 31155 if err := p.writeField1(ctx, oprot); err != nil { return err } 31156 } 31157 if err := oprot.WriteFieldStop(ctx); err != nil { 31158 return thrift.PrependError("write field stop error: ", err) } 31159 if err := oprot.WriteStructEnd(ctx); err != nil { 31160 return thrift.PrependError("write struct stop error: ", err) } 31161 return nil 31162 } 31163 31164 func (p *ApplyEosioExitArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 31165 if err := oprot.WriteFieldBegin(ctx, "code", thrift.I32, 1); err != nil { 31166 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 31167 if err := oprot.WriteI32(ctx, int32(p.Code)); err != nil { 31168 return thrift.PrependError(fmt.Sprintf("%T.code (1) field write error: ", p), err) } 31169 if err := oprot.WriteFieldEnd(ctx); err != nil { 31170 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 31171 return err 31172 } 31173 31174 func (p *ApplyEosioExitArgs) String() string { 31175 if p == nil { 31176 return "<nil>" 31177 } 31178 return fmt.Sprintf("ApplyEosioExitArgs(%+v)", *p) 31179 } 31180 31181 type ApplyEosioExitResult struct { 31182 } 31183 31184 func NewApplyEosioExitResult() *ApplyEosioExitResult { 31185 return &ApplyEosioExitResult{} 31186 } 31187 31188 func (p *ApplyEosioExitResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 31189 if _, err := iprot.ReadStructBegin(ctx); err != nil { 31190 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 31191 } 31192 31193 31194 for { 31195 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 31196 if err != nil { 31197 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 31198 } 31199 if fieldTypeId == thrift.STOP { break; } 31200 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31201 return err 31202 } 31203 if err := iprot.ReadFieldEnd(ctx); err != nil { 31204 return err 31205 } 31206 } 31207 if err := iprot.ReadStructEnd(ctx); err != nil { 31208 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 31209 } 31210 return nil 31211 } 31212 31213 func (p *ApplyEosioExitResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 31214 if err := oprot.WriteStructBegin(ctx, "eosio_exit_result"); err != nil { 31215 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31216 if p != nil { 31217 } 31218 if err := oprot.WriteFieldStop(ctx); err != nil { 31219 return thrift.PrependError("write field stop error: ", err) } 31220 if err := oprot.WriteStructEnd(ctx); err != nil { 31221 return thrift.PrependError("write struct stop error: ", err) } 31222 return nil 31223 } 31224 31225 func (p *ApplyEosioExitResult) String() string { 31226 if p == nil { 31227 return "<nil>" 31228 } 31229 return fmt.Sprintf("ApplyEosioExitResult(%+v)", *p) 31230 } 31231 31232 type ApplyCurrentTimeArgs struct { 31233 } 31234 31235 func NewApplyCurrentTimeArgs() *ApplyCurrentTimeArgs { 31236 return &ApplyCurrentTimeArgs{} 31237 } 31238 31239 func (p *ApplyCurrentTimeArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 31240 if _, err := iprot.ReadStructBegin(ctx); err != nil { 31241 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 31242 } 31243 31244 31245 for { 31246 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 31247 if err != nil { 31248 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 31249 } 31250 if fieldTypeId == thrift.STOP { break; } 31251 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31252 return err 31253 } 31254 if err := iprot.ReadFieldEnd(ctx); err != nil { 31255 return err 31256 } 31257 } 31258 if err := iprot.ReadStructEnd(ctx); err != nil { 31259 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 31260 } 31261 return nil 31262 } 31263 31264 func (p *ApplyCurrentTimeArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 31265 if err := oprot.WriteStructBegin(ctx, "current_time_args"); err != nil { 31266 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31267 if p != nil { 31268 } 31269 if err := oprot.WriteFieldStop(ctx); err != nil { 31270 return thrift.PrependError("write field stop error: ", err) } 31271 if err := oprot.WriteStructEnd(ctx); err != nil { 31272 return thrift.PrependError("write struct stop error: ", err) } 31273 return nil 31274 } 31275 31276 func (p *ApplyCurrentTimeArgs) String() string { 31277 if p == nil { 31278 return "<nil>" 31279 } 31280 return fmt.Sprintf("ApplyCurrentTimeArgs(%+v)", *p) 31281 } 31282 31283 // Attributes: 31284 // - Success 31285 type ApplyCurrentTimeResult struct { 31286 Success *Uint64 `thrift:"success,0" db:"success" json:"success,omitempty"` 31287 } 31288 31289 func NewApplyCurrentTimeResult() *ApplyCurrentTimeResult { 31290 return &ApplyCurrentTimeResult{} 31291 } 31292 31293 var ApplyCurrentTimeResult_Success_DEFAULT *Uint64 31294 func (p *ApplyCurrentTimeResult) GetSuccess() *Uint64 { 31295 if !p.IsSetSuccess() { 31296 return ApplyCurrentTimeResult_Success_DEFAULT 31297 } 31298 return p.Success 31299 } 31300 func (p *ApplyCurrentTimeResult) IsSetSuccess() bool { 31301 return p.Success != nil 31302 } 31303 31304 func (p *ApplyCurrentTimeResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 31305 if _, err := iprot.ReadStructBegin(ctx); err != nil { 31306 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 31307 } 31308 31309 31310 for { 31311 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 31312 if err != nil { 31313 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 31314 } 31315 if fieldTypeId == thrift.STOP { break; } 31316 switch fieldId { 31317 case 0: 31318 if fieldTypeId == thrift.STRUCT { 31319 if err := p.ReadField0(ctx, iprot); err != nil { 31320 return err 31321 } 31322 } else { 31323 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31324 return err 31325 } 31326 } 31327 default: 31328 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31329 return err 31330 } 31331 } 31332 if err := iprot.ReadFieldEnd(ctx); err != nil { 31333 return err 31334 } 31335 } 31336 if err := iprot.ReadStructEnd(ctx); err != nil { 31337 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 31338 } 31339 return nil 31340 } 31341 31342 func (p *ApplyCurrentTimeResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 31343 p.Success = &Uint64{} 31344 if err := p.Success.Read(ctx, iprot); err != nil { 31345 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 31346 } 31347 return nil 31348 } 31349 31350 func (p *ApplyCurrentTimeResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 31351 if err := oprot.WriteStructBegin(ctx, "current_time_result"); err != nil { 31352 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31353 if p != nil { 31354 if err := p.writeField0(ctx, oprot); err != nil { return err } 31355 } 31356 if err := oprot.WriteFieldStop(ctx); err != nil { 31357 return thrift.PrependError("write field stop error: ", err) } 31358 if err := oprot.WriteStructEnd(ctx); err != nil { 31359 return thrift.PrependError("write struct stop error: ", err) } 31360 return nil 31361 } 31362 31363 func (p *ApplyCurrentTimeResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 31364 if p.IsSetSuccess() { 31365 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 31366 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 31367 if err := p.Success.Write(ctx, oprot); err != nil { 31368 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 31369 } 31370 if err := oprot.WriteFieldEnd(ctx); err != nil { 31371 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 31372 } 31373 return err 31374 } 31375 31376 func (p *ApplyCurrentTimeResult) String() string { 31377 if p == nil { 31378 return "<nil>" 31379 } 31380 return fmt.Sprintf("ApplyCurrentTimeResult(%+v)", *p) 31381 } 31382 31383 // Attributes: 31384 // - FeatureDigest 31385 type ApplyIsFeatureActivatedArgs struct { 31386 FeatureDigest []byte `thrift:"feature_digest,1" db:"feature_digest" json:"feature_digest"` 31387 } 31388 31389 func NewApplyIsFeatureActivatedArgs() *ApplyIsFeatureActivatedArgs { 31390 return &ApplyIsFeatureActivatedArgs{} 31391 } 31392 31393 31394 func (p *ApplyIsFeatureActivatedArgs) GetFeatureDigest() []byte { 31395 return p.FeatureDigest 31396 } 31397 func (p *ApplyIsFeatureActivatedArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 31398 if _, err := iprot.ReadStructBegin(ctx); err != nil { 31399 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 31400 } 31401 31402 31403 for { 31404 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 31405 if err != nil { 31406 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 31407 } 31408 if fieldTypeId == thrift.STOP { break; } 31409 switch fieldId { 31410 case 1: 31411 if fieldTypeId == thrift.STRING { 31412 if err := p.ReadField1(ctx, iprot); err != nil { 31413 return err 31414 } 31415 } else { 31416 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31417 return err 31418 } 31419 } 31420 default: 31421 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31422 return err 31423 } 31424 } 31425 if err := iprot.ReadFieldEnd(ctx); err != nil { 31426 return err 31427 } 31428 } 31429 if err := iprot.ReadStructEnd(ctx); err != nil { 31430 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 31431 } 31432 return nil 31433 } 31434 31435 func (p *ApplyIsFeatureActivatedArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 31436 if v, err := iprot.ReadBinary(ctx); err != nil { 31437 return thrift.PrependError("error reading field 1: ", err) 31438 } else { 31439 p.FeatureDigest = v 31440 } 31441 return nil 31442 } 31443 31444 func (p *ApplyIsFeatureActivatedArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 31445 if err := oprot.WriteStructBegin(ctx, "is_feature_activated_args"); err != nil { 31446 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31447 if p != nil { 31448 if err := p.writeField1(ctx, oprot); err != nil { return err } 31449 } 31450 if err := oprot.WriteFieldStop(ctx); err != nil { 31451 return thrift.PrependError("write field stop error: ", err) } 31452 if err := oprot.WriteStructEnd(ctx); err != nil { 31453 return thrift.PrependError("write struct stop error: ", err) } 31454 return nil 31455 } 31456 31457 func (p *ApplyIsFeatureActivatedArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 31458 if err := oprot.WriteFieldBegin(ctx, "feature_digest", thrift.STRING, 1); err != nil { 31459 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:feature_digest: ", p), err) } 31460 if err := oprot.WriteBinary(ctx, p.FeatureDigest); err != nil { 31461 return thrift.PrependError(fmt.Sprintf("%T.feature_digest (1) field write error: ", p), err) } 31462 if err := oprot.WriteFieldEnd(ctx); err != nil { 31463 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:feature_digest: ", p), err) } 31464 return err 31465 } 31466 31467 func (p *ApplyIsFeatureActivatedArgs) String() string { 31468 if p == nil { 31469 return "<nil>" 31470 } 31471 return fmt.Sprintf("ApplyIsFeatureActivatedArgs(%+v)", *p) 31472 } 31473 31474 // Attributes: 31475 // - Success 31476 type ApplyIsFeatureActivatedResult struct { 31477 Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` 31478 } 31479 31480 func NewApplyIsFeatureActivatedResult() *ApplyIsFeatureActivatedResult { 31481 return &ApplyIsFeatureActivatedResult{} 31482 } 31483 31484 var ApplyIsFeatureActivatedResult_Success_DEFAULT bool 31485 func (p *ApplyIsFeatureActivatedResult) GetSuccess() bool { 31486 if !p.IsSetSuccess() { 31487 return ApplyIsFeatureActivatedResult_Success_DEFAULT 31488 } 31489 return *p.Success 31490 } 31491 func (p *ApplyIsFeatureActivatedResult) IsSetSuccess() bool { 31492 return p.Success != nil 31493 } 31494 31495 func (p *ApplyIsFeatureActivatedResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 31496 if _, err := iprot.ReadStructBegin(ctx); err != nil { 31497 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 31498 } 31499 31500 31501 for { 31502 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 31503 if err != nil { 31504 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 31505 } 31506 if fieldTypeId == thrift.STOP { break; } 31507 switch fieldId { 31508 case 0: 31509 if fieldTypeId == thrift.BOOL { 31510 if err := p.ReadField0(ctx, iprot); err != nil { 31511 return err 31512 } 31513 } else { 31514 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31515 return err 31516 } 31517 } 31518 default: 31519 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31520 return err 31521 } 31522 } 31523 if err := iprot.ReadFieldEnd(ctx); err != nil { 31524 return err 31525 } 31526 } 31527 if err := iprot.ReadStructEnd(ctx); err != nil { 31528 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 31529 } 31530 return nil 31531 } 31532 31533 func (p *ApplyIsFeatureActivatedResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 31534 if v, err := iprot.ReadBool(ctx); err != nil { 31535 return thrift.PrependError("error reading field 0: ", err) 31536 } else { 31537 p.Success = &v 31538 } 31539 return nil 31540 } 31541 31542 func (p *ApplyIsFeatureActivatedResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 31543 if err := oprot.WriteStructBegin(ctx, "is_feature_activated_result"); err != nil { 31544 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31545 if p != nil { 31546 if err := p.writeField0(ctx, oprot); err != nil { return err } 31547 } 31548 if err := oprot.WriteFieldStop(ctx); err != nil { 31549 return thrift.PrependError("write field stop error: ", err) } 31550 if err := oprot.WriteStructEnd(ctx); err != nil { 31551 return thrift.PrependError("write struct stop error: ", err) } 31552 return nil 31553 } 31554 31555 func (p *ApplyIsFeatureActivatedResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 31556 if p.IsSetSuccess() { 31557 if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { 31558 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 31559 if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { 31560 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 31561 if err := oprot.WriteFieldEnd(ctx); err != nil { 31562 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 31563 } 31564 return err 31565 } 31566 31567 func (p *ApplyIsFeatureActivatedResult) String() string { 31568 if p == nil { 31569 return "<nil>" 31570 } 31571 return fmt.Sprintf("ApplyIsFeatureActivatedResult(%+v)", *p) 31572 } 31573 31574 type ApplyGetSenderArgs struct { 31575 } 31576 31577 func NewApplyGetSenderArgs() *ApplyGetSenderArgs { 31578 return &ApplyGetSenderArgs{} 31579 } 31580 31581 func (p *ApplyGetSenderArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 31582 if _, err := iprot.ReadStructBegin(ctx); err != nil { 31583 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 31584 } 31585 31586 31587 for { 31588 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 31589 if err != nil { 31590 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 31591 } 31592 if fieldTypeId == thrift.STOP { break; } 31593 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31594 return err 31595 } 31596 if err := iprot.ReadFieldEnd(ctx); err != nil { 31597 return err 31598 } 31599 } 31600 if err := iprot.ReadStructEnd(ctx); err != nil { 31601 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 31602 } 31603 return nil 31604 } 31605 31606 func (p *ApplyGetSenderArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 31607 if err := oprot.WriteStructBegin(ctx, "get_sender_args"); err != nil { 31608 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31609 if p != nil { 31610 } 31611 if err := oprot.WriteFieldStop(ctx); err != nil { 31612 return thrift.PrependError("write field stop error: ", err) } 31613 if err := oprot.WriteStructEnd(ctx); err != nil { 31614 return thrift.PrependError("write struct stop error: ", err) } 31615 return nil 31616 } 31617 31618 func (p *ApplyGetSenderArgs) String() string { 31619 if p == nil { 31620 return "<nil>" 31621 } 31622 return fmt.Sprintf("ApplyGetSenderArgs(%+v)", *p) 31623 } 31624 31625 // Attributes: 31626 // - Success 31627 type ApplyGetSenderResult struct { 31628 Success *Uint64 `thrift:"success,0" db:"success" json:"success,omitempty"` 31629 } 31630 31631 func NewApplyGetSenderResult() *ApplyGetSenderResult { 31632 return &ApplyGetSenderResult{} 31633 } 31634 31635 var ApplyGetSenderResult_Success_DEFAULT *Uint64 31636 func (p *ApplyGetSenderResult) GetSuccess() *Uint64 { 31637 if !p.IsSetSuccess() { 31638 return ApplyGetSenderResult_Success_DEFAULT 31639 } 31640 return p.Success 31641 } 31642 func (p *ApplyGetSenderResult) IsSetSuccess() bool { 31643 return p.Success != nil 31644 } 31645 31646 func (p *ApplyGetSenderResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 31647 if _, err := iprot.ReadStructBegin(ctx); err != nil { 31648 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 31649 } 31650 31651 31652 for { 31653 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 31654 if err != nil { 31655 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 31656 } 31657 if fieldTypeId == thrift.STOP { break; } 31658 switch fieldId { 31659 case 0: 31660 if fieldTypeId == thrift.STRUCT { 31661 if err := p.ReadField0(ctx, iprot); err != nil { 31662 return err 31663 } 31664 } else { 31665 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31666 return err 31667 } 31668 } 31669 default: 31670 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31671 return err 31672 } 31673 } 31674 if err := iprot.ReadFieldEnd(ctx); err != nil { 31675 return err 31676 } 31677 } 31678 if err := iprot.ReadStructEnd(ctx); err != nil { 31679 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 31680 } 31681 return nil 31682 } 31683 31684 func (p *ApplyGetSenderResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 31685 p.Success = &Uint64{} 31686 if err := p.Success.Read(ctx, iprot); err != nil { 31687 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 31688 } 31689 return nil 31690 } 31691 31692 func (p *ApplyGetSenderResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 31693 if err := oprot.WriteStructBegin(ctx, "get_sender_result"); err != nil { 31694 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31695 if p != nil { 31696 if err := p.writeField0(ctx, oprot); err != nil { return err } 31697 } 31698 if err := oprot.WriteFieldStop(ctx); err != nil { 31699 return thrift.PrependError("write field stop error: ", err) } 31700 if err := oprot.WriteStructEnd(ctx); err != nil { 31701 return thrift.PrependError("write struct stop error: ", err) } 31702 return nil 31703 } 31704 31705 func (p *ApplyGetSenderResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 31706 if p.IsSetSuccess() { 31707 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 31708 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 31709 if err := p.Success.Write(ctx, oprot); err != nil { 31710 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 31711 } 31712 if err := oprot.WriteFieldEnd(ctx); err != nil { 31713 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 31714 } 31715 return err 31716 } 31717 31718 func (p *ApplyGetSenderResult) String() string { 31719 if p == nil { 31720 return "<nil>" 31721 } 31722 return fmt.Sprintf("ApplyGetSenderResult(%+v)", *p) 31723 } 31724 31725 // Attributes: 31726 // - Data 31727 // - Hash 31728 type ApplyAssertSha256Args struct { 31729 Data []byte `thrift:"data,1" db:"data" json:"data"` 31730 Hash []byte `thrift:"hash,2" db:"hash" json:"hash"` 31731 } 31732 31733 func NewApplyAssertSha256Args() *ApplyAssertSha256Args { 31734 return &ApplyAssertSha256Args{} 31735 } 31736 31737 31738 func (p *ApplyAssertSha256Args) GetData() []byte { 31739 return p.Data 31740 } 31741 31742 func (p *ApplyAssertSha256Args) GetHash() []byte { 31743 return p.Hash 31744 } 31745 func (p *ApplyAssertSha256Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 31746 if _, err := iprot.ReadStructBegin(ctx); err != nil { 31747 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 31748 } 31749 31750 31751 for { 31752 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 31753 if err != nil { 31754 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 31755 } 31756 if fieldTypeId == thrift.STOP { break; } 31757 switch fieldId { 31758 case 1: 31759 if fieldTypeId == thrift.STRING { 31760 if err := p.ReadField1(ctx, iprot); err != nil { 31761 return err 31762 } 31763 } else { 31764 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31765 return err 31766 } 31767 } 31768 case 2: 31769 if fieldTypeId == thrift.STRING { 31770 if err := p.ReadField2(ctx, iprot); err != nil { 31771 return err 31772 } 31773 } else { 31774 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31775 return err 31776 } 31777 } 31778 default: 31779 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31780 return err 31781 } 31782 } 31783 if err := iprot.ReadFieldEnd(ctx); err != nil { 31784 return err 31785 } 31786 } 31787 if err := iprot.ReadStructEnd(ctx); err != nil { 31788 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 31789 } 31790 return nil 31791 } 31792 31793 func (p *ApplyAssertSha256Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 31794 if v, err := iprot.ReadBinary(ctx); err != nil { 31795 return thrift.PrependError("error reading field 1: ", err) 31796 } else { 31797 p.Data = v 31798 } 31799 return nil 31800 } 31801 31802 func (p *ApplyAssertSha256Args) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 31803 if v, err := iprot.ReadBinary(ctx); err != nil { 31804 return thrift.PrependError("error reading field 2: ", err) 31805 } else { 31806 p.Hash = v 31807 } 31808 return nil 31809 } 31810 31811 func (p *ApplyAssertSha256Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 31812 if err := oprot.WriteStructBegin(ctx, "assert_sha256_args"); err != nil { 31813 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31814 if p != nil { 31815 if err := p.writeField1(ctx, oprot); err != nil { return err } 31816 if err := p.writeField2(ctx, oprot); err != nil { return err } 31817 } 31818 if err := oprot.WriteFieldStop(ctx); err != nil { 31819 return thrift.PrependError("write field stop error: ", err) } 31820 if err := oprot.WriteStructEnd(ctx); err != nil { 31821 return thrift.PrependError("write struct stop error: ", err) } 31822 return nil 31823 } 31824 31825 func (p *ApplyAssertSha256Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 31826 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 1); err != nil { 31827 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:data: ", p), err) } 31828 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 31829 return thrift.PrependError(fmt.Sprintf("%T.data (1) field write error: ", p), err) } 31830 if err := oprot.WriteFieldEnd(ctx); err != nil { 31831 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:data: ", p), err) } 31832 return err 31833 } 31834 31835 func (p *ApplyAssertSha256Args) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 31836 if err := oprot.WriteFieldBegin(ctx, "hash", thrift.STRING, 2); err != nil { 31837 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:hash: ", p), err) } 31838 if err := oprot.WriteBinary(ctx, p.Hash); err != nil { 31839 return thrift.PrependError(fmt.Sprintf("%T.hash (2) field write error: ", p), err) } 31840 if err := oprot.WriteFieldEnd(ctx); err != nil { 31841 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:hash: ", p), err) } 31842 return err 31843 } 31844 31845 func (p *ApplyAssertSha256Args) String() string { 31846 if p == nil { 31847 return "<nil>" 31848 } 31849 return fmt.Sprintf("ApplyAssertSha256Args(%+v)", *p) 31850 } 31851 31852 type ApplyAssertSha256Result struct { 31853 } 31854 31855 func NewApplyAssertSha256Result() *ApplyAssertSha256Result { 31856 return &ApplyAssertSha256Result{} 31857 } 31858 31859 func (p *ApplyAssertSha256Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 31860 if _, err := iprot.ReadStructBegin(ctx); err != nil { 31861 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 31862 } 31863 31864 31865 for { 31866 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 31867 if err != nil { 31868 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 31869 } 31870 if fieldTypeId == thrift.STOP { break; } 31871 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31872 return err 31873 } 31874 if err := iprot.ReadFieldEnd(ctx); err != nil { 31875 return err 31876 } 31877 } 31878 if err := iprot.ReadStructEnd(ctx); err != nil { 31879 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 31880 } 31881 return nil 31882 } 31883 31884 func (p *ApplyAssertSha256Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 31885 if err := oprot.WriteStructBegin(ctx, "assert_sha256_result"); err != nil { 31886 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31887 if p != nil { 31888 } 31889 if err := oprot.WriteFieldStop(ctx); err != nil { 31890 return thrift.PrependError("write field stop error: ", err) } 31891 if err := oprot.WriteStructEnd(ctx); err != nil { 31892 return thrift.PrependError("write struct stop error: ", err) } 31893 return nil 31894 } 31895 31896 func (p *ApplyAssertSha256Result) String() string { 31897 if p == nil { 31898 return "<nil>" 31899 } 31900 return fmt.Sprintf("ApplyAssertSha256Result(%+v)", *p) 31901 } 31902 31903 // Attributes: 31904 // - Data 31905 // - Hash 31906 type ApplyAssertSha1Args struct { 31907 Data []byte `thrift:"data,1" db:"data" json:"data"` 31908 Hash []byte `thrift:"hash,2" db:"hash" json:"hash"` 31909 } 31910 31911 func NewApplyAssertSha1Args() *ApplyAssertSha1Args { 31912 return &ApplyAssertSha1Args{} 31913 } 31914 31915 31916 func (p *ApplyAssertSha1Args) GetData() []byte { 31917 return p.Data 31918 } 31919 31920 func (p *ApplyAssertSha1Args) GetHash() []byte { 31921 return p.Hash 31922 } 31923 func (p *ApplyAssertSha1Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 31924 if _, err := iprot.ReadStructBegin(ctx); err != nil { 31925 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 31926 } 31927 31928 31929 for { 31930 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 31931 if err != nil { 31932 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 31933 } 31934 if fieldTypeId == thrift.STOP { break; } 31935 switch fieldId { 31936 case 1: 31937 if fieldTypeId == thrift.STRING { 31938 if err := p.ReadField1(ctx, iprot); err != nil { 31939 return err 31940 } 31941 } else { 31942 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31943 return err 31944 } 31945 } 31946 case 2: 31947 if fieldTypeId == thrift.STRING { 31948 if err := p.ReadField2(ctx, iprot); err != nil { 31949 return err 31950 } 31951 } else { 31952 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31953 return err 31954 } 31955 } 31956 default: 31957 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 31958 return err 31959 } 31960 } 31961 if err := iprot.ReadFieldEnd(ctx); err != nil { 31962 return err 31963 } 31964 } 31965 if err := iprot.ReadStructEnd(ctx); err != nil { 31966 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 31967 } 31968 return nil 31969 } 31970 31971 func (p *ApplyAssertSha1Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 31972 if v, err := iprot.ReadBinary(ctx); err != nil { 31973 return thrift.PrependError("error reading field 1: ", err) 31974 } else { 31975 p.Data = v 31976 } 31977 return nil 31978 } 31979 31980 func (p *ApplyAssertSha1Args) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 31981 if v, err := iprot.ReadBinary(ctx); err != nil { 31982 return thrift.PrependError("error reading field 2: ", err) 31983 } else { 31984 p.Hash = v 31985 } 31986 return nil 31987 } 31988 31989 func (p *ApplyAssertSha1Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 31990 if err := oprot.WriteStructBegin(ctx, "assert_sha1_args"); err != nil { 31991 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 31992 if p != nil { 31993 if err := p.writeField1(ctx, oprot); err != nil { return err } 31994 if err := p.writeField2(ctx, oprot); err != nil { return err } 31995 } 31996 if err := oprot.WriteFieldStop(ctx); err != nil { 31997 return thrift.PrependError("write field stop error: ", err) } 31998 if err := oprot.WriteStructEnd(ctx); err != nil { 31999 return thrift.PrependError("write struct stop error: ", err) } 32000 return nil 32001 } 32002 32003 func (p *ApplyAssertSha1Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 32004 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 1); err != nil { 32005 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:data: ", p), err) } 32006 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 32007 return thrift.PrependError(fmt.Sprintf("%T.data (1) field write error: ", p), err) } 32008 if err := oprot.WriteFieldEnd(ctx); err != nil { 32009 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:data: ", p), err) } 32010 return err 32011 } 32012 32013 func (p *ApplyAssertSha1Args) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 32014 if err := oprot.WriteFieldBegin(ctx, "hash", thrift.STRING, 2); err != nil { 32015 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:hash: ", p), err) } 32016 if err := oprot.WriteBinary(ctx, p.Hash); err != nil { 32017 return thrift.PrependError(fmt.Sprintf("%T.hash (2) field write error: ", p), err) } 32018 if err := oprot.WriteFieldEnd(ctx); err != nil { 32019 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:hash: ", p), err) } 32020 return err 32021 } 32022 32023 func (p *ApplyAssertSha1Args) String() string { 32024 if p == nil { 32025 return "<nil>" 32026 } 32027 return fmt.Sprintf("ApplyAssertSha1Args(%+v)", *p) 32028 } 32029 32030 type ApplyAssertSha1Result struct { 32031 } 32032 32033 func NewApplyAssertSha1Result() *ApplyAssertSha1Result { 32034 return &ApplyAssertSha1Result{} 32035 } 32036 32037 func (p *ApplyAssertSha1Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 32038 if _, err := iprot.ReadStructBegin(ctx); err != nil { 32039 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 32040 } 32041 32042 32043 for { 32044 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 32045 if err != nil { 32046 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 32047 } 32048 if fieldTypeId == thrift.STOP { break; } 32049 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32050 return err 32051 } 32052 if err := iprot.ReadFieldEnd(ctx); err != nil { 32053 return err 32054 } 32055 } 32056 if err := iprot.ReadStructEnd(ctx); err != nil { 32057 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 32058 } 32059 return nil 32060 } 32061 32062 func (p *ApplyAssertSha1Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 32063 if err := oprot.WriteStructBegin(ctx, "assert_sha1_result"); err != nil { 32064 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 32065 if p != nil { 32066 } 32067 if err := oprot.WriteFieldStop(ctx); err != nil { 32068 return thrift.PrependError("write field stop error: ", err) } 32069 if err := oprot.WriteStructEnd(ctx); err != nil { 32070 return thrift.PrependError("write struct stop error: ", err) } 32071 return nil 32072 } 32073 32074 func (p *ApplyAssertSha1Result) String() string { 32075 if p == nil { 32076 return "<nil>" 32077 } 32078 return fmt.Sprintf("ApplyAssertSha1Result(%+v)", *p) 32079 } 32080 32081 // Attributes: 32082 // - Data 32083 // - Hash 32084 type ApplyAssertSha512Args struct { 32085 Data []byte `thrift:"data,1" db:"data" json:"data"` 32086 Hash []byte `thrift:"hash,2" db:"hash" json:"hash"` 32087 } 32088 32089 func NewApplyAssertSha512Args() *ApplyAssertSha512Args { 32090 return &ApplyAssertSha512Args{} 32091 } 32092 32093 32094 func (p *ApplyAssertSha512Args) GetData() []byte { 32095 return p.Data 32096 } 32097 32098 func (p *ApplyAssertSha512Args) GetHash() []byte { 32099 return p.Hash 32100 } 32101 func (p *ApplyAssertSha512Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 32102 if _, err := iprot.ReadStructBegin(ctx); err != nil { 32103 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 32104 } 32105 32106 32107 for { 32108 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 32109 if err != nil { 32110 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 32111 } 32112 if fieldTypeId == thrift.STOP { break; } 32113 switch fieldId { 32114 case 1: 32115 if fieldTypeId == thrift.STRING { 32116 if err := p.ReadField1(ctx, iprot); err != nil { 32117 return err 32118 } 32119 } else { 32120 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32121 return err 32122 } 32123 } 32124 case 2: 32125 if fieldTypeId == thrift.STRING { 32126 if err := p.ReadField2(ctx, iprot); err != nil { 32127 return err 32128 } 32129 } else { 32130 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32131 return err 32132 } 32133 } 32134 default: 32135 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32136 return err 32137 } 32138 } 32139 if err := iprot.ReadFieldEnd(ctx); err != nil { 32140 return err 32141 } 32142 } 32143 if err := iprot.ReadStructEnd(ctx); err != nil { 32144 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 32145 } 32146 return nil 32147 } 32148 32149 func (p *ApplyAssertSha512Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 32150 if v, err := iprot.ReadBinary(ctx); err != nil { 32151 return thrift.PrependError("error reading field 1: ", err) 32152 } else { 32153 p.Data = v 32154 } 32155 return nil 32156 } 32157 32158 func (p *ApplyAssertSha512Args) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 32159 if v, err := iprot.ReadBinary(ctx); err != nil { 32160 return thrift.PrependError("error reading field 2: ", err) 32161 } else { 32162 p.Hash = v 32163 } 32164 return nil 32165 } 32166 32167 func (p *ApplyAssertSha512Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 32168 if err := oprot.WriteStructBegin(ctx, "assert_sha512_args"); err != nil { 32169 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 32170 if p != nil { 32171 if err := p.writeField1(ctx, oprot); err != nil { return err } 32172 if err := p.writeField2(ctx, oprot); err != nil { return err } 32173 } 32174 if err := oprot.WriteFieldStop(ctx); err != nil { 32175 return thrift.PrependError("write field stop error: ", err) } 32176 if err := oprot.WriteStructEnd(ctx); err != nil { 32177 return thrift.PrependError("write struct stop error: ", err) } 32178 return nil 32179 } 32180 32181 func (p *ApplyAssertSha512Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 32182 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 1); err != nil { 32183 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:data: ", p), err) } 32184 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 32185 return thrift.PrependError(fmt.Sprintf("%T.data (1) field write error: ", p), err) } 32186 if err := oprot.WriteFieldEnd(ctx); err != nil { 32187 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:data: ", p), err) } 32188 return err 32189 } 32190 32191 func (p *ApplyAssertSha512Args) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 32192 if err := oprot.WriteFieldBegin(ctx, "hash", thrift.STRING, 2); err != nil { 32193 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:hash: ", p), err) } 32194 if err := oprot.WriteBinary(ctx, p.Hash); err != nil { 32195 return thrift.PrependError(fmt.Sprintf("%T.hash (2) field write error: ", p), err) } 32196 if err := oprot.WriteFieldEnd(ctx); err != nil { 32197 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:hash: ", p), err) } 32198 return err 32199 } 32200 32201 func (p *ApplyAssertSha512Args) String() string { 32202 if p == nil { 32203 return "<nil>" 32204 } 32205 return fmt.Sprintf("ApplyAssertSha512Args(%+v)", *p) 32206 } 32207 32208 type ApplyAssertSha512Result struct { 32209 } 32210 32211 func NewApplyAssertSha512Result() *ApplyAssertSha512Result { 32212 return &ApplyAssertSha512Result{} 32213 } 32214 32215 func (p *ApplyAssertSha512Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 32216 if _, err := iprot.ReadStructBegin(ctx); err != nil { 32217 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 32218 } 32219 32220 32221 for { 32222 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 32223 if err != nil { 32224 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 32225 } 32226 if fieldTypeId == thrift.STOP { break; } 32227 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32228 return err 32229 } 32230 if err := iprot.ReadFieldEnd(ctx); err != nil { 32231 return err 32232 } 32233 } 32234 if err := iprot.ReadStructEnd(ctx); err != nil { 32235 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 32236 } 32237 return nil 32238 } 32239 32240 func (p *ApplyAssertSha512Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 32241 if err := oprot.WriteStructBegin(ctx, "assert_sha512_result"); err != nil { 32242 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 32243 if p != nil { 32244 } 32245 if err := oprot.WriteFieldStop(ctx); err != nil { 32246 return thrift.PrependError("write field stop error: ", err) } 32247 if err := oprot.WriteStructEnd(ctx); err != nil { 32248 return thrift.PrependError("write struct stop error: ", err) } 32249 return nil 32250 } 32251 32252 func (p *ApplyAssertSha512Result) String() string { 32253 if p == nil { 32254 return "<nil>" 32255 } 32256 return fmt.Sprintf("ApplyAssertSha512Result(%+v)", *p) 32257 } 32258 32259 // Attributes: 32260 // - Data 32261 // - Hash 32262 type ApplyAssertRipemd160Args struct { 32263 Data []byte `thrift:"data,1" db:"data" json:"data"` 32264 Hash []byte `thrift:"hash,2" db:"hash" json:"hash"` 32265 } 32266 32267 func NewApplyAssertRipemd160Args() *ApplyAssertRipemd160Args { 32268 return &ApplyAssertRipemd160Args{} 32269 } 32270 32271 32272 func (p *ApplyAssertRipemd160Args) GetData() []byte { 32273 return p.Data 32274 } 32275 32276 func (p *ApplyAssertRipemd160Args) GetHash() []byte { 32277 return p.Hash 32278 } 32279 func (p *ApplyAssertRipemd160Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 32280 if _, err := iprot.ReadStructBegin(ctx); err != nil { 32281 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 32282 } 32283 32284 32285 for { 32286 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 32287 if err != nil { 32288 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 32289 } 32290 if fieldTypeId == thrift.STOP { break; } 32291 switch fieldId { 32292 case 1: 32293 if fieldTypeId == thrift.STRING { 32294 if err := p.ReadField1(ctx, iprot); err != nil { 32295 return err 32296 } 32297 } else { 32298 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32299 return err 32300 } 32301 } 32302 case 2: 32303 if fieldTypeId == thrift.STRING { 32304 if err := p.ReadField2(ctx, iprot); err != nil { 32305 return err 32306 } 32307 } else { 32308 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32309 return err 32310 } 32311 } 32312 default: 32313 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32314 return err 32315 } 32316 } 32317 if err := iprot.ReadFieldEnd(ctx); err != nil { 32318 return err 32319 } 32320 } 32321 if err := iprot.ReadStructEnd(ctx); err != nil { 32322 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 32323 } 32324 return nil 32325 } 32326 32327 func (p *ApplyAssertRipemd160Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 32328 if v, err := iprot.ReadBinary(ctx); err != nil { 32329 return thrift.PrependError("error reading field 1: ", err) 32330 } else { 32331 p.Data = v 32332 } 32333 return nil 32334 } 32335 32336 func (p *ApplyAssertRipemd160Args) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 32337 if v, err := iprot.ReadBinary(ctx); err != nil { 32338 return thrift.PrependError("error reading field 2: ", err) 32339 } else { 32340 p.Hash = v 32341 } 32342 return nil 32343 } 32344 32345 func (p *ApplyAssertRipemd160Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 32346 if err := oprot.WriteStructBegin(ctx, "assert_ripemd160_args"); err != nil { 32347 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 32348 if p != nil { 32349 if err := p.writeField1(ctx, oprot); err != nil { return err } 32350 if err := p.writeField2(ctx, oprot); err != nil { return err } 32351 } 32352 if err := oprot.WriteFieldStop(ctx); err != nil { 32353 return thrift.PrependError("write field stop error: ", err) } 32354 if err := oprot.WriteStructEnd(ctx); err != nil { 32355 return thrift.PrependError("write struct stop error: ", err) } 32356 return nil 32357 } 32358 32359 func (p *ApplyAssertRipemd160Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 32360 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 1); err != nil { 32361 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:data: ", p), err) } 32362 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 32363 return thrift.PrependError(fmt.Sprintf("%T.data (1) field write error: ", p), err) } 32364 if err := oprot.WriteFieldEnd(ctx); err != nil { 32365 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:data: ", p), err) } 32366 return err 32367 } 32368 32369 func (p *ApplyAssertRipemd160Args) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 32370 if err := oprot.WriteFieldBegin(ctx, "hash", thrift.STRING, 2); err != nil { 32371 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:hash: ", p), err) } 32372 if err := oprot.WriteBinary(ctx, p.Hash); err != nil { 32373 return thrift.PrependError(fmt.Sprintf("%T.hash (2) field write error: ", p), err) } 32374 if err := oprot.WriteFieldEnd(ctx); err != nil { 32375 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:hash: ", p), err) } 32376 return err 32377 } 32378 32379 func (p *ApplyAssertRipemd160Args) String() string { 32380 if p == nil { 32381 return "<nil>" 32382 } 32383 return fmt.Sprintf("ApplyAssertRipemd160Args(%+v)", *p) 32384 } 32385 32386 type ApplyAssertRipemd160Result struct { 32387 } 32388 32389 func NewApplyAssertRipemd160Result() *ApplyAssertRipemd160Result { 32390 return &ApplyAssertRipemd160Result{} 32391 } 32392 32393 func (p *ApplyAssertRipemd160Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 32394 if _, err := iprot.ReadStructBegin(ctx); err != nil { 32395 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 32396 } 32397 32398 32399 for { 32400 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 32401 if err != nil { 32402 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 32403 } 32404 if fieldTypeId == thrift.STOP { break; } 32405 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32406 return err 32407 } 32408 if err := iprot.ReadFieldEnd(ctx); err != nil { 32409 return err 32410 } 32411 } 32412 if err := iprot.ReadStructEnd(ctx); err != nil { 32413 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 32414 } 32415 return nil 32416 } 32417 32418 func (p *ApplyAssertRipemd160Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 32419 if err := oprot.WriteStructBegin(ctx, "assert_ripemd160_result"); err != nil { 32420 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 32421 if p != nil { 32422 } 32423 if err := oprot.WriteFieldStop(ctx); err != nil { 32424 return thrift.PrependError("write field stop error: ", err) } 32425 if err := oprot.WriteStructEnd(ctx); err != nil { 32426 return thrift.PrependError("write struct stop error: ", err) } 32427 return nil 32428 } 32429 32430 func (p *ApplyAssertRipemd160Result) String() string { 32431 if p == nil { 32432 return "<nil>" 32433 } 32434 return fmt.Sprintf("ApplyAssertRipemd160Result(%+v)", *p) 32435 } 32436 32437 // Attributes: 32438 // - Data 32439 type ApplySha256Args struct { 32440 Data []byte `thrift:"data,1" db:"data" json:"data"` 32441 } 32442 32443 func NewApplySha256Args() *ApplySha256Args { 32444 return &ApplySha256Args{} 32445 } 32446 32447 32448 func (p *ApplySha256Args) GetData() []byte { 32449 return p.Data 32450 } 32451 func (p *ApplySha256Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 32452 if _, err := iprot.ReadStructBegin(ctx); err != nil { 32453 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 32454 } 32455 32456 32457 for { 32458 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 32459 if err != nil { 32460 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 32461 } 32462 if fieldTypeId == thrift.STOP { break; } 32463 switch fieldId { 32464 case 1: 32465 if fieldTypeId == thrift.STRING { 32466 if err := p.ReadField1(ctx, iprot); err != nil { 32467 return err 32468 } 32469 } else { 32470 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32471 return err 32472 } 32473 } 32474 default: 32475 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32476 return err 32477 } 32478 } 32479 if err := iprot.ReadFieldEnd(ctx); err != nil { 32480 return err 32481 } 32482 } 32483 if err := iprot.ReadStructEnd(ctx); err != nil { 32484 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 32485 } 32486 return nil 32487 } 32488 32489 func (p *ApplySha256Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 32490 if v, err := iprot.ReadBinary(ctx); err != nil { 32491 return thrift.PrependError("error reading field 1: ", err) 32492 } else { 32493 p.Data = v 32494 } 32495 return nil 32496 } 32497 32498 func (p *ApplySha256Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 32499 if err := oprot.WriteStructBegin(ctx, "sha256_args"); err != nil { 32500 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 32501 if p != nil { 32502 if err := p.writeField1(ctx, oprot); err != nil { return err } 32503 } 32504 if err := oprot.WriteFieldStop(ctx); err != nil { 32505 return thrift.PrependError("write field stop error: ", err) } 32506 if err := oprot.WriteStructEnd(ctx); err != nil { 32507 return thrift.PrependError("write struct stop error: ", err) } 32508 return nil 32509 } 32510 32511 func (p *ApplySha256Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 32512 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 1); err != nil { 32513 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:data: ", p), err) } 32514 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 32515 return thrift.PrependError(fmt.Sprintf("%T.data (1) field write error: ", p), err) } 32516 if err := oprot.WriteFieldEnd(ctx); err != nil { 32517 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:data: ", p), err) } 32518 return err 32519 } 32520 32521 func (p *ApplySha256Args) String() string { 32522 if p == nil { 32523 return "<nil>" 32524 } 32525 return fmt.Sprintf("ApplySha256Args(%+v)", *p) 32526 } 32527 32528 // Attributes: 32529 // - Success 32530 type ApplySha256Result struct { 32531 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 32532 } 32533 32534 func NewApplySha256Result() *ApplySha256Result { 32535 return &ApplySha256Result{} 32536 } 32537 32538 var ApplySha256Result_Success_DEFAULT []byte 32539 32540 func (p *ApplySha256Result) GetSuccess() []byte { 32541 return p.Success 32542 } 32543 func (p *ApplySha256Result) IsSetSuccess() bool { 32544 return p.Success != nil 32545 } 32546 32547 func (p *ApplySha256Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 32548 if _, err := iprot.ReadStructBegin(ctx); err != nil { 32549 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 32550 } 32551 32552 32553 for { 32554 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 32555 if err != nil { 32556 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 32557 } 32558 if fieldTypeId == thrift.STOP { break; } 32559 switch fieldId { 32560 case 0: 32561 if fieldTypeId == thrift.STRING { 32562 if err := p.ReadField0(ctx, iprot); err != nil { 32563 return err 32564 } 32565 } else { 32566 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32567 return err 32568 } 32569 } 32570 default: 32571 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32572 return err 32573 } 32574 } 32575 if err := iprot.ReadFieldEnd(ctx); err != nil { 32576 return err 32577 } 32578 } 32579 if err := iprot.ReadStructEnd(ctx); err != nil { 32580 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 32581 } 32582 return nil 32583 } 32584 32585 func (p *ApplySha256Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 32586 if v, err := iprot.ReadBinary(ctx); err != nil { 32587 return thrift.PrependError("error reading field 0: ", err) 32588 } else { 32589 p.Success = v 32590 } 32591 return nil 32592 } 32593 32594 func (p *ApplySha256Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 32595 if err := oprot.WriteStructBegin(ctx, "sha256_result"); err != nil { 32596 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 32597 if p != nil { 32598 if err := p.writeField0(ctx, oprot); err != nil { return err } 32599 } 32600 if err := oprot.WriteFieldStop(ctx); err != nil { 32601 return thrift.PrependError("write field stop error: ", err) } 32602 if err := oprot.WriteStructEnd(ctx); err != nil { 32603 return thrift.PrependError("write struct stop error: ", err) } 32604 return nil 32605 } 32606 32607 func (p *ApplySha256Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 32608 if p.IsSetSuccess() { 32609 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 32610 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 32611 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 32612 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 32613 if err := oprot.WriteFieldEnd(ctx); err != nil { 32614 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 32615 } 32616 return err 32617 } 32618 32619 func (p *ApplySha256Result) String() string { 32620 if p == nil { 32621 return "<nil>" 32622 } 32623 return fmt.Sprintf("ApplySha256Result(%+v)", *p) 32624 } 32625 32626 // Attributes: 32627 // - Data 32628 type ApplySha1Args struct { 32629 Data []byte `thrift:"data,1" db:"data" json:"data"` 32630 } 32631 32632 func NewApplySha1Args() *ApplySha1Args { 32633 return &ApplySha1Args{} 32634 } 32635 32636 32637 func (p *ApplySha1Args) GetData() []byte { 32638 return p.Data 32639 } 32640 func (p *ApplySha1Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 32641 if _, err := iprot.ReadStructBegin(ctx); err != nil { 32642 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 32643 } 32644 32645 32646 for { 32647 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 32648 if err != nil { 32649 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 32650 } 32651 if fieldTypeId == thrift.STOP { break; } 32652 switch fieldId { 32653 case 1: 32654 if fieldTypeId == thrift.STRING { 32655 if err := p.ReadField1(ctx, iprot); err != nil { 32656 return err 32657 } 32658 } else { 32659 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32660 return err 32661 } 32662 } 32663 default: 32664 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32665 return err 32666 } 32667 } 32668 if err := iprot.ReadFieldEnd(ctx); err != nil { 32669 return err 32670 } 32671 } 32672 if err := iprot.ReadStructEnd(ctx); err != nil { 32673 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 32674 } 32675 return nil 32676 } 32677 32678 func (p *ApplySha1Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 32679 if v, err := iprot.ReadBinary(ctx); err != nil { 32680 return thrift.PrependError("error reading field 1: ", err) 32681 } else { 32682 p.Data = v 32683 } 32684 return nil 32685 } 32686 32687 func (p *ApplySha1Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 32688 if err := oprot.WriteStructBegin(ctx, "sha1_args"); err != nil { 32689 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 32690 if p != nil { 32691 if err := p.writeField1(ctx, oprot); err != nil { return err } 32692 } 32693 if err := oprot.WriteFieldStop(ctx); err != nil { 32694 return thrift.PrependError("write field stop error: ", err) } 32695 if err := oprot.WriteStructEnd(ctx); err != nil { 32696 return thrift.PrependError("write struct stop error: ", err) } 32697 return nil 32698 } 32699 32700 func (p *ApplySha1Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 32701 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 1); err != nil { 32702 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:data: ", p), err) } 32703 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 32704 return thrift.PrependError(fmt.Sprintf("%T.data (1) field write error: ", p), err) } 32705 if err := oprot.WriteFieldEnd(ctx); err != nil { 32706 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:data: ", p), err) } 32707 return err 32708 } 32709 32710 func (p *ApplySha1Args) String() string { 32711 if p == nil { 32712 return "<nil>" 32713 } 32714 return fmt.Sprintf("ApplySha1Args(%+v)", *p) 32715 } 32716 32717 // Attributes: 32718 // - Success 32719 type ApplySha1Result struct { 32720 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 32721 } 32722 32723 func NewApplySha1Result() *ApplySha1Result { 32724 return &ApplySha1Result{} 32725 } 32726 32727 var ApplySha1Result_Success_DEFAULT []byte 32728 32729 func (p *ApplySha1Result) GetSuccess() []byte { 32730 return p.Success 32731 } 32732 func (p *ApplySha1Result) IsSetSuccess() bool { 32733 return p.Success != nil 32734 } 32735 32736 func (p *ApplySha1Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 32737 if _, err := iprot.ReadStructBegin(ctx); err != nil { 32738 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 32739 } 32740 32741 32742 for { 32743 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 32744 if err != nil { 32745 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 32746 } 32747 if fieldTypeId == thrift.STOP { break; } 32748 switch fieldId { 32749 case 0: 32750 if fieldTypeId == thrift.STRING { 32751 if err := p.ReadField0(ctx, iprot); err != nil { 32752 return err 32753 } 32754 } else { 32755 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32756 return err 32757 } 32758 } 32759 default: 32760 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32761 return err 32762 } 32763 } 32764 if err := iprot.ReadFieldEnd(ctx); err != nil { 32765 return err 32766 } 32767 } 32768 if err := iprot.ReadStructEnd(ctx); err != nil { 32769 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 32770 } 32771 return nil 32772 } 32773 32774 func (p *ApplySha1Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 32775 if v, err := iprot.ReadBinary(ctx); err != nil { 32776 return thrift.PrependError("error reading field 0: ", err) 32777 } else { 32778 p.Success = v 32779 } 32780 return nil 32781 } 32782 32783 func (p *ApplySha1Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 32784 if err := oprot.WriteStructBegin(ctx, "sha1_result"); err != nil { 32785 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 32786 if p != nil { 32787 if err := p.writeField0(ctx, oprot); err != nil { return err } 32788 } 32789 if err := oprot.WriteFieldStop(ctx); err != nil { 32790 return thrift.PrependError("write field stop error: ", err) } 32791 if err := oprot.WriteStructEnd(ctx); err != nil { 32792 return thrift.PrependError("write struct stop error: ", err) } 32793 return nil 32794 } 32795 32796 func (p *ApplySha1Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 32797 if p.IsSetSuccess() { 32798 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 32799 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 32800 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 32801 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 32802 if err := oprot.WriteFieldEnd(ctx); err != nil { 32803 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 32804 } 32805 return err 32806 } 32807 32808 func (p *ApplySha1Result) String() string { 32809 if p == nil { 32810 return "<nil>" 32811 } 32812 return fmt.Sprintf("ApplySha1Result(%+v)", *p) 32813 } 32814 32815 // Attributes: 32816 // - Data 32817 type ApplySha512Args struct { 32818 Data []byte `thrift:"data,1" db:"data" json:"data"` 32819 } 32820 32821 func NewApplySha512Args() *ApplySha512Args { 32822 return &ApplySha512Args{} 32823 } 32824 32825 32826 func (p *ApplySha512Args) GetData() []byte { 32827 return p.Data 32828 } 32829 func (p *ApplySha512Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 32830 if _, err := iprot.ReadStructBegin(ctx); err != nil { 32831 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 32832 } 32833 32834 32835 for { 32836 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 32837 if err != nil { 32838 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 32839 } 32840 if fieldTypeId == thrift.STOP { break; } 32841 switch fieldId { 32842 case 1: 32843 if fieldTypeId == thrift.STRING { 32844 if err := p.ReadField1(ctx, iprot); err != nil { 32845 return err 32846 } 32847 } else { 32848 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32849 return err 32850 } 32851 } 32852 default: 32853 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32854 return err 32855 } 32856 } 32857 if err := iprot.ReadFieldEnd(ctx); err != nil { 32858 return err 32859 } 32860 } 32861 if err := iprot.ReadStructEnd(ctx); err != nil { 32862 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 32863 } 32864 return nil 32865 } 32866 32867 func (p *ApplySha512Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 32868 if v, err := iprot.ReadBinary(ctx); err != nil { 32869 return thrift.PrependError("error reading field 1: ", err) 32870 } else { 32871 p.Data = v 32872 } 32873 return nil 32874 } 32875 32876 func (p *ApplySha512Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 32877 if err := oprot.WriteStructBegin(ctx, "sha512_args"); err != nil { 32878 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 32879 if p != nil { 32880 if err := p.writeField1(ctx, oprot); err != nil { return err } 32881 } 32882 if err := oprot.WriteFieldStop(ctx); err != nil { 32883 return thrift.PrependError("write field stop error: ", err) } 32884 if err := oprot.WriteStructEnd(ctx); err != nil { 32885 return thrift.PrependError("write struct stop error: ", err) } 32886 return nil 32887 } 32888 32889 func (p *ApplySha512Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 32890 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 1); err != nil { 32891 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:data: ", p), err) } 32892 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 32893 return thrift.PrependError(fmt.Sprintf("%T.data (1) field write error: ", p), err) } 32894 if err := oprot.WriteFieldEnd(ctx); err != nil { 32895 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:data: ", p), err) } 32896 return err 32897 } 32898 32899 func (p *ApplySha512Args) String() string { 32900 if p == nil { 32901 return "<nil>" 32902 } 32903 return fmt.Sprintf("ApplySha512Args(%+v)", *p) 32904 } 32905 32906 // Attributes: 32907 // - Success 32908 type ApplySha512Result struct { 32909 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 32910 } 32911 32912 func NewApplySha512Result() *ApplySha512Result { 32913 return &ApplySha512Result{} 32914 } 32915 32916 var ApplySha512Result_Success_DEFAULT []byte 32917 32918 func (p *ApplySha512Result) GetSuccess() []byte { 32919 return p.Success 32920 } 32921 func (p *ApplySha512Result) IsSetSuccess() bool { 32922 return p.Success != nil 32923 } 32924 32925 func (p *ApplySha512Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 32926 if _, err := iprot.ReadStructBegin(ctx); err != nil { 32927 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 32928 } 32929 32930 32931 for { 32932 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 32933 if err != nil { 32934 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 32935 } 32936 if fieldTypeId == thrift.STOP { break; } 32937 switch fieldId { 32938 case 0: 32939 if fieldTypeId == thrift.STRING { 32940 if err := p.ReadField0(ctx, iprot); err != nil { 32941 return err 32942 } 32943 } else { 32944 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32945 return err 32946 } 32947 } 32948 default: 32949 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 32950 return err 32951 } 32952 } 32953 if err := iprot.ReadFieldEnd(ctx); err != nil { 32954 return err 32955 } 32956 } 32957 if err := iprot.ReadStructEnd(ctx); err != nil { 32958 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 32959 } 32960 return nil 32961 } 32962 32963 func (p *ApplySha512Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 32964 if v, err := iprot.ReadBinary(ctx); err != nil { 32965 return thrift.PrependError("error reading field 0: ", err) 32966 } else { 32967 p.Success = v 32968 } 32969 return nil 32970 } 32971 32972 func (p *ApplySha512Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 32973 if err := oprot.WriteStructBegin(ctx, "sha512_result"); err != nil { 32974 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 32975 if p != nil { 32976 if err := p.writeField0(ctx, oprot); err != nil { return err } 32977 } 32978 if err := oprot.WriteFieldStop(ctx); err != nil { 32979 return thrift.PrependError("write field stop error: ", err) } 32980 if err := oprot.WriteStructEnd(ctx); err != nil { 32981 return thrift.PrependError("write struct stop error: ", err) } 32982 return nil 32983 } 32984 32985 func (p *ApplySha512Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 32986 if p.IsSetSuccess() { 32987 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 32988 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 32989 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 32990 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 32991 if err := oprot.WriteFieldEnd(ctx); err != nil { 32992 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 32993 } 32994 return err 32995 } 32996 32997 func (p *ApplySha512Result) String() string { 32998 if p == nil { 32999 return "<nil>" 33000 } 33001 return fmt.Sprintf("ApplySha512Result(%+v)", *p) 33002 } 33003 33004 // Attributes: 33005 // - Data 33006 type ApplyRipemd160Args struct { 33007 Data []byte `thrift:"data,1" db:"data" json:"data"` 33008 } 33009 33010 func NewApplyRipemd160Args() *ApplyRipemd160Args { 33011 return &ApplyRipemd160Args{} 33012 } 33013 33014 33015 func (p *ApplyRipemd160Args) GetData() []byte { 33016 return p.Data 33017 } 33018 func (p *ApplyRipemd160Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 33019 if _, err := iprot.ReadStructBegin(ctx); err != nil { 33020 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 33021 } 33022 33023 33024 for { 33025 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 33026 if err != nil { 33027 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 33028 } 33029 if fieldTypeId == thrift.STOP { break; } 33030 switch fieldId { 33031 case 1: 33032 if fieldTypeId == thrift.STRING { 33033 if err := p.ReadField1(ctx, iprot); err != nil { 33034 return err 33035 } 33036 } else { 33037 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33038 return err 33039 } 33040 } 33041 default: 33042 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33043 return err 33044 } 33045 } 33046 if err := iprot.ReadFieldEnd(ctx); err != nil { 33047 return err 33048 } 33049 } 33050 if err := iprot.ReadStructEnd(ctx); err != nil { 33051 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 33052 } 33053 return nil 33054 } 33055 33056 func (p *ApplyRipemd160Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 33057 if v, err := iprot.ReadBinary(ctx); err != nil { 33058 return thrift.PrependError("error reading field 1: ", err) 33059 } else { 33060 p.Data = v 33061 } 33062 return nil 33063 } 33064 33065 func (p *ApplyRipemd160Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 33066 if err := oprot.WriteStructBegin(ctx, "ripemd160_args"); err != nil { 33067 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 33068 if p != nil { 33069 if err := p.writeField1(ctx, oprot); err != nil { return err } 33070 } 33071 if err := oprot.WriteFieldStop(ctx); err != nil { 33072 return thrift.PrependError("write field stop error: ", err) } 33073 if err := oprot.WriteStructEnd(ctx); err != nil { 33074 return thrift.PrependError("write struct stop error: ", err) } 33075 return nil 33076 } 33077 33078 func (p *ApplyRipemd160Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 33079 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 1); err != nil { 33080 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:data: ", p), err) } 33081 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 33082 return thrift.PrependError(fmt.Sprintf("%T.data (1) field write error: ", p), err) } 33083 if err := oprot.WriteFieldEnd(ctx); err != nil { 33084 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:data: ", p), err) } 33085 return err 33086 } 33087 33088 func (p *ApplyRipemd160Args) String() string { 33089 if p == nil { 33090 return "<nil>" 33091 } 33092 return fmt.Sprintf("ApplyRipemd160Args(%+v)", *p) 33093 } 33094 33095 // Attributes: 33096 // - Success 33097 type ApplyRipemd160Result struct { 33098 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 33099 } 33100 33101 func NewApplyRipemd160Result() *ApplyRipemd160Result { 33102 return &ApplyRipemd160Result{} 33103 } 33104 33105 var ApplyRipemd160Result_Success_DEFAULT []byte 33106 33107 func (p *ApplyRipemd160Result) GetSuccess() []byte { 33108 return p.Success 33109 } 33110 func (p *ApplyRipemd160Result) IsSetSuccess() bool { 33111 return p.Success != nil 33112 } 33113 33114 func (p *ApplyRipemd160Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 33115 if _, err := iprot.ReadStructBegin(ctx); err != nil { 33116 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 33117 } 33118 33119 33120 for { 33121 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 33122 if err != nil { 33123 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 33124 } 33125 if fieldTypeId == thrift.STOP { break; } 33126 switch fieldId { 33127 case 0: 33128 if fieldTypeId == thrift.STRING { 33129 if err := p.ReadField0(ctx, iprot); err != nil { 33130 return err 33131 } 33132 } else { 33133 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33134 return err 33135 } 33136 } 33137 default: 33138 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33139 return err 33140 } 33141 } 33142 if err := iprot.ReadFieldEnd(ctx); err != nil { 33143 return err 33144 } 33145 } 33146 if err := iprot.ReadStructEnd(ctx); err != nil { 33147 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 33148 } 33149 return nil 33150 } 33151 33152 func (p *ApplyRipemd160Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 33153 if v, err := iprot.ReadBinary(ctx); err != nil { 33154 return thrift.PrependError("error reading field 0: ", err) 33155 } else { 33156 p.Success = v 33157 } 33158 return nil 33159 } 33160 33161 func (p *ApplyRipemd160Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 33162 if err := oprot.WriteStructBegin(ctx, "ripemd160_result"); err != nil { 33163 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 33164 if p != nil { 33165 if err := p.writeField0(ctx, oprot); err != nil { return err } 33166 } 33167 if err := oprot.WriteFieldStop(ctx); err != nil { 33168 return thrift.PrependError("write field stop error: ", err) } 33169 if err := oprot.WriteStructEnd(ctx); err != nil { 33170 return thrift.PrependError("write struct stop error: ", err) } 33171 return nil 33172 } 33173 33174 func (p *ApplyRipemd160Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 33175 if p.IsSetSuccess() { 33176 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 33177 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 33178 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 33179 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 33180 if err := oprot.WriteFieldEnd(ctx); err != nil { 33181 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 33182 } 33183 return err 33184 } 33185 33186 func (p *ApplyRipemd160Result) String() string { 33187 if p == nil { 33188 return "<nil>" 33189 } 33190 return fmt.Sprintf("ApplyRipemd160Result(%+v)", *p) 33191 } 33192 33193 // Attributes: 33194 // - Digest 33195 // - Sig 33196 type ApplyRecoverKeyArgs struct { 33197 Digest []byte `thrift:"digest,1" db:"digest" json:"digest"` 33198 Sig []byte `thrift:"sig,2" db:"sig" json:"sig"` 33199 } 33200 33201 func NewApplyRecoverKeyArgs() *ApplyRecoverKeyArgs { 33202 return &ApplyRecoverKeyArgs{} 33203 } 33204 33205 33206 func (p *ApplyRecoverKeyArgs) GetDigest() []byte { 33207 return p.Digest 33208 } 33209 33210 func (p *ApplyRecoverKeyArgs) GetSig() []byte { 33211 return p.Sig 33212 } 33213 func (p *ApplyRecoverKeyArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 33214 if _, err := iprot.ReadStructBegin(ctx); err != nil { 33215 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 33216 } 33217 33218 33219 for { 33220 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 33221 if err != nil { 33222 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 33223 } 33224 if fieldTypeId == thrift.STOP { break; } 33225 switch fieldId { 33226 case 1: 33227 if fieldTypeId == thrift.STRING { 33228 if err := p.ReadField1(ctx, iprot); err != nil { 33229 return err 33230 } 33231 } else { 33232 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33233 return err 33234 } 33235 } 33236 case 2: 33237 if fieldTypeId == thrift.STRING { 33238 if err := p.ReadField2(ctx, iprot); err != nil { 33239 return err 33240 } 33241 } else { 33242 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33243 return err 33244 } 33245 } 33246 default: 33247 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33248 return err 33249 } 33250 } 33251 if err := iprot.ReadFieldEnd(ctx); err != nil { 33252 return err 33253 } 33254 } 33255 if err := iprot.ReadStructEnd(ctx); err != nil { 33256 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 33257 } 33258 return nil 33259 } 33260 33261 func (p *ApplyRecoverKeyArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 33262 if v, err := iprot.ReadBinary(ctx); err != nil { 33263 return thrift.PrependError("error reading field 1: ", err) 33264 } else { 33265 p.Digest = v 33266 } 33267 return nil 33268 } 33269 33270 func (p *ApplyRecoverKeyArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 33271 if v, err := iprot.ReadBinary(ctx); err != nil { 33272 return thrift.PrependError("error reading field 2: ", err) 33273 } else { 33274 p.Sig = v 33275 } 33276 return nil 33277 } 33278 33279 func (p *ApplyRecoverKeyArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 33280 if err := oprot.WriteStructBegin(ctx, "recover_key_args"); err != nil { 33281 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 33282 if p != nil { 33283 if err := p.writeField1(ctx, oprot); err != nil { return err } 33284 if err := p.writeField2(ctx, oprot); err != nil { return err } 33285 } 33286 if err := oprot.WriteFieldStop(ctx); err != nil { 33287 return thrift.PrependError("write field stop error: ", err) } 33288 if err := oprot.WriteStructEnd(ctx); err != nil { 33289 return thrift.PrependError("write struct stop error: ", err) } 33290 return nil 33291 } 33292 33293 func (p *ApplyRecoverKeyArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 33294 if err := oprot.WriteFieldBegin(ctx, "digest", thrift.STRING, 1); err != nil { 33295 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:digest: ", p), err) } 33296 if err := oprot.WriteBinary(ctx, p.Digest); err != nil { 33297 return thrift.PrependError(fmt.Sprintf("%T.digest (1) field write error: ", p), err) } 33298 if err := oprot.WriteFieldEnd(ctx); err != nil { 33299 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:digest: ", p), err) } 33300 return err 33301 } 33302 33303 func (p *ApplyRecoverKeyArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 33304 if err := oprot.WriteFieldBegin(ctx, "sig", thrift.STRING, 2); err != nil { 33305 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:sig: ", p), err) } 33306 if err := oprot.WriteBinary(ctx, p.Sig); err != nil { 33307 return thrift.PrependError(fmt.Sprintf("%T.sig (2) field write error: ", p), err) } 33308 if err := oprot.WriteFieldEnd(ctx); err != nil { 33309 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:sig: ", p), err) } 33310 return err 33311 } 33312 33313 func (p *ApplyRecoverKeyArgs) String() string { 33314 if p == nil { 33315 return "<nil>" 33316 } 33317 return fmt.Sprintf("ApplyRecoverKeyArgs(%+v)", *p) 33318 } 33319 33320 // Attributes: 33321 // - Success 33322 type ApplyRecoverKeyResult struct { 33323 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 33324 } 33325 33326 func NewApplyRecoverKeyResult() *ApplyRecoverKeyResult { 33327 return &ApplyRecoverKeyResult{} 33328 } 33329 33330 var ApplyRecoverKeyResult_Success_DEFAULT []byte 33331 33332 func (p *ApplyRecoverKeyResult) GetSuccess() []byte { 33333 return p.Success 33334 } 33335 func (p *ApplyRecoverKeyResult) IsSetSuccess() bool { 33336 return p.Success != nil 33337 } 33338 33339 func (p *ApplyRecoverKeyResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 33340 if _, err := iprot.ReadStructBegin(ctx); err != nil { 33341 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 33342 } 33343 33344 33345 for { 33346 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 33347 if err != nil { 33348 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 33349 } 33350 if fieldTypeId == thrift.STOP { break; } 33351 switch fieldId { 33352 case 0: 33353 if fieldTypeId == thrift.STRING { 33354 if err := p.ReadField0(ctx, iprot); err != nil { 33355 return err 33356 } 33357 } else { 33358 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33359 return err 33360 } 33361 } 33362 default: 33363 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33364 return err 33365 } 33366 } 33367 if err := iprot.ReadFieldEnd(ctx); err != nil { 33368 return err 33369 } 33370 } 33371 if err := iprot.ReadStructEnd(ctx); err != nil { 33372 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 33373 } 33374 return nil 33375 } 33376 33377 func (p *ApplyRecoverKeyResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 33378 if v, err := iprot.ReadBinary(ctx); err != nil { 33379 return thrift.PrependError("error reading field 0: ", err) 33380 } else { 33381 p.Success = v 33382 } 33383 return nil 33384 } 33385 33386 func (p *ApplyRecoverKeyResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 33387 if err := oprot.WriteStructBegin(ctx, "recover_key_result"); err != nil { 33388 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 33389 if p != nil { 33390 if err := p.writeField0(ctx, oprot); err != nil { return err } 33391 } 33392 if err := oprot.WriteFieldStop(ctx); err != nil { 33393 return thrift.PrependError("write field stop error: ", err) } 33394 if err := oprot.WriteStructEnd(ctx); err != nil { 33395 return thrift.PrependError("write struct stop error: ", err) } 33396 return nil 33397 } 33398 33399 func (p *ApplyRecoverKeyResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 33400 if p.IsSetSuccess() { 33401 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 33402 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 33403 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 33404 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 33405 if err := oprot.WriteFieldEnd(ctx); err != nil { 33406 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 33407 } 33408 return err 33409 } 33410 33411 func (p *ApplyRecoverKeyResult) String() string { 33412 if p == nil { 33413 return "<nil>" 33414 } 33415 return fmt.Sprintf("ApplyRecoverKeyResult(%+v)", *p) 33416 } 33417 33418 // Attributes: 33419 // - Digest 33420 // - Sig 33421 // - Pub 33422 type ApplyAssertRecoverKeyArgs struct { 33423 Digest []byte `thrift:"digest,1" db:"digest" json:"digest"` 33424 Sig []byte `thrift:"sig,2" db:"sig" json:"sig"` 33425 Pub []byte `thrift:"pub,3" db:"pub" json:"pub"` 33426 } 33427 33428 func NewApplyAssertRecoverKeyArgs() *ApplyAssertRecoverKeyArgs { 33429 return &ApplyAssertRecoverKeyArgs{} 33430 } 33431 33432 33433 func (p *ApplyAssertRecoverKeyArgs) GetDigest() []byte { 33434 return p.Digest 33435 } 33436 33437 func (p *ApplyAssertRecoverKeyArgs) GetSig() []byte { 33438 return p.Sig 33439 } 33440 33441 func (p *ApplyAssertRecoverKeyArgs) GetPub() []byte { 33442 return p.Pub 33443 } 33444 func (p *ApplyAssertRecoverKeyArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 33445 if _, err := iprot.ReadStructBegin(ctx); err != nil { 33446 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 33447 } 33448 33449 33450 for { 33451 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 33452 if err != nil { 33453 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 33454 } 33455 if fieldTypeId == thrift.STOP { break; } 33456 switch fieldId { 33457 case 1: 33458 if fieldTypeId == thrift.STRING { 33459 if err := p.ReadField1(ctx, iprot); err != nil { 33460 return err 33461 } 33462 } else { 33463 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33464 return err 33465 } 33466 } 33467 case 2: 33468 if fieldTypeId == thrift.STRING { 33469 if err := p.ReadField2(ctx, iprot); err != nil { 33470 return err 33471 } 33472 } else { 33473 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33474 return err 33475 } 33476 } 33477 case 3: 33478 if fieldTypeId == thrift.STRING { 33479 if err := p.ReadField3(ctx, iprot); err != nil { 33480 return err 33481 } 33482 } else { 33483 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33484 return err 33485 } 33486 } 33487 default: 33488 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33489 return err 33490 } 33491 } 33492 if err := iprot.ReadFieldEnd(ctx); err != nil { 33493 return err 33494 } 33495 } 33496 if err := iprot.ReadStructEnd(ctx); err != nil { 33497 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 33498 } 33499 return nil 33500 } 33501 33502 func (p *ApplyAssertRecoverKeyArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 33503 if v, err := iprot.ReadBinary(ctx); err != nil { 33504 return thrift.PrependError("error reading field 1: ", err) 33505 } else { 33506 p.Digest = v 33507 } 33508 return nil 33509 } 33510 33511 func (p *ApplyAssertRecoverKeyArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 33512 if v, err := iprot.ReadBinary(ctx); err != nil { 33513 return thrift.PrependError("error reading field 2: ", err) 33514 } else { 33515 p.Sig = v 33516 } 33517 return nil 33518 } 33519 33520 func (p *ApplyAssertRecoverKeyArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 33521 if v, err := iprot.ReadBinary(ctx); err != nil { 33522 return thrift.PrependError("error reading field 3: ", err) 33523 } else { 33524 p.Pub = v 33525 } 33526 return nil 33527 } 33528 33529 func (p *ApplyAssertRecoverKeyArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 33530 if err := oprot.WriteStructBegin(ctx, "assert_recover_key_args"); err != nil { 33531 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 33532 if p != nil { 33533 if err := p.writeField1(ctx, oprot); err != nil { return err } 33534 if err := p.writeField2(ctx, oprot); err != nil { return err } 33535 if err := p.writeField3(ctx, oprot); err != nil { return err } 33536 } 33537 if err := oprot.WriteFieldStop(ctx); err != nil { 33538 return thrift.PrependError("write field stop error: ", err) } 33539 if err := oprot.WriteStructEnd(ctx); err != nil { 33540 return thrift.PrependError("write struct stop error: ", err) } 33541 return nil 33542 } 33543 33544 func (p *ApplyAssertRecoverKeyArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 33545 if err := oprot.WriteFieldBegin(ctx, "digest", thrift.STRING, 1); err != nil { 33546 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:digest: ", p), err) } 33547 if err := oprot.WriteBinary(ctx, p.Digest); err != nil { 33548 return thrift.PrependError(fmt.Sprintf("%T.digest (1) field write error: ", p), err) } 33549 if err := oprot.WriteFieldEnd(ctx); err != nil { 33550 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:digest: ", p), err) } 33551 return err 33552 } 33553 33554 func (p *ApplyAssertRecoverKeyArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 33555 if err := oprot.WriteFieldBegin(ctx, "sig", thrift.STRING, 2); err != nil { 33556 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:sig: ", p), err) } 33557 if err := oprot.WriteBinary(ctx, p.Sig); err != nil { 33558 return thrift.PrependError(fmt.Sprintf("%T.sig (2) field write error: ", p), err) } 33559 if err := oprot.WriteFieldEnd(ctx); err != nil { 33560 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:sig: ", p), err) } 33561 return err 33562 } 33563 33564 func (p *ApplyAssertRecoverKeyArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 33565 if err := oprot.WriteFieldBegin(ctx, "pub", thrift.STRING, 3); err != nil { 33566 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:pub: ", p), err) } 33567 if err := oprot.WriteBinary(ctx, p.Pub); err != nil { 33568 return thrift.PrependError(fmt.Sprintf("%T.pub (3) field write error: ", p), err) } 33569 if err := oprot.WriteFieldEnd(ctx); err != nil { 33570 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:pub: ", p), err) } 33571 return err 33572 } 33573 33574 func (p *ApplyAssertRecoverKeyArgs) String() string { 33575 if p == nil { 33576 return "<nil>" 33577 } 33578 return fmt.Sprintf("ApplyAssertRecoverKeyArgs(%+v)", *p) 33579 } 33580 33581 type ApplyAssertRecoverKeyResult struct { 33582 } 33583 33584 func NewApplyAssertRecoverKeyResult() *ApplyAssertRecoverKeyResult { 33585 return &ApplyAssertRecoverKeyResult{} 33586 } 33587 33588 func (p *ApplyAssertRecoverKeyResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 33589 if _, err := iprot.ReadStructBegin(ctx); err != nil { 33590 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 33591 } 33592 33593 33594 for { 33595 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 33596 if err != nil { 33597 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 33598 } 33599 if fieldTypeId == thrift.STOP { break; } 33600 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33601 return err 33602 } 33603 if err := iprot.ReadFieldEnd(ctx); err != nil { 33604 return err 33605 } 33606 } 33607 if err := iprot.ReadStructEnd(ctx); err != nil { 33608 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 33609 } 33610 return nil 33611 } 33612 33613 func (p *ApplyAssertRecoverKeyResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 33614 if err := oprot.WriteStructBegin(ctx, "assert_recover_key_result"); err != nil { 33615 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 33616 if p != nil { 33617 } 33618 if err := oprot.WriteFieldStop(ctx); err != nil { 33619 return thrift.PrependError("write field stop error: ", err) } 33620 if err := oprot.WriteStructEnd(ctx); err != nil { 33621 return thrift.PrependError("write struct stop error: ", err) } 33622 return nil 33623 } 33624 33625 func (p *ApplyAssertRecoverKeyResult) String() string { 33626 if p == nil { 33627 return "<nil>" 33628 } 33629 return fmt.Sprintf("ApplyAssertRecoverKeyResult(%+v)", *p) 33630 } 33631 33632 // Attributes: 33633 // - SenderID 33634 // - Payer 33635 // - SerializedTransaction 33636 // - ReplaceExisting 33637 type ApplySendDeferredArgs struct { 33638 SenderID []byte `thrift:"sender_id,1" db:"sender_id" json:"sender_id"` 33639 Payer *Uint64 `thrift:"payer,2" db:"payer" json:"payer"` 33640 SerializedTransaction []byte `thrift:"serialized_transaction,3" db:"serialized_transaction" json:"serialized_transaction"` 33641 ReplaceExisting int32 `thrift:"replace_existing,4" db:"replace_existing" json:"replace_existing"` 33642 } 33643 33644 func NewApplySendDeferredArgs() *ApplySendDeferredArgs { 33645 return &ApplySendDeferredArgs{} 33646 } 33647 33648 33649 func (p *ApplySendDeferredArgs) GetSenderID() []byte { 33650 return p.SenderID 33651 } 33652 var ApplySendDeferredArgs_Payer_DEFAULT *Uint64 33653 func (p *ApplySendDeferredArgs) GetPayer() *Uint64 { 33654 if !p.IsSetPayer() { 33655 return ApplySendDeferredArgs_Payer_DEFAULT 33656 } 33657 return p.Payer 33658 } 33659 33660 func (p *ApplySendDeferredArgs) GetSerializedTransaction() []byte { 33661 return p.SerializedTransaction 33662 } 33663 33664 func (p *ApplySendDeferredArgs) GetReplaceExisting() int32 { 33665 return p.ReplaceExisting 33666 } 33667 func (p *ApplySendDeferredArgs) IsSetPayer() bool { 33668 return p.Payer != nil 33669 } 33670 33671 func (p *ApplySendDeferredArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 33672 if _, err := iprot.ReadStructBegin(ctx); err != nil { 33673 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 33674 } 33675 33676 33677 for { 33678 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 33679 if err != nil { 33680 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 33681 } 33682 if fieldTypeId == thrift.STOP { break; } 33683 switch fieldId { 33684 case 1: 33685 if fieldTypeId == thrift.STRING { 33686 if err := p.ReadField1(ctx, iprot); err != nil { 33687 return err 33688 } 33689 } else { 33690 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33691 return err 33692 } 33693 } 33694 case 2: 33695 if fieldTypeId == thrift.STRUCT { 33696 if err := p.ReadField2(ctx, iprot); err != nil { 33697 return err 33698 } 33699 } else { 33700 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33701 return err 33702 } 33703 } 33704 case 3: 33705 if fieldTypeId == thrift.STRING { 33706 if err := p.ReadField3(ctx, iprot); err != nil { 33707 return err 33708 } 33709 } else { 33710 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33711 return err 33712 } 33713 } 33714 case 4: 33715 if fieldTypeId == thrift.I32 { 33716 if err := p.ReadField4(ctx, iprot); err != nil { 33717 return err 33718 } 33719 } else { 33720 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33721 return err 33722 } 33723 } 33724 default: 33725 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33726 return err 33727 } 33728 } 33729 if err := iprot.ReadFieldEnd(ctx); err != nil { 33730 return err 33731 } 33732 } 33733 if err := iprot.ReadStructEnd(ctx); err != nil { 33734 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 33735 } 33736 return nil 33737 } 33738 33739 func (p *ApplySendDeferredArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 33740 if v, err := iprot.ReadBinary(ctx); err != nil { 33741 return thrift.PrependError("error reading field 1: ", err) 33742 } else { 33743 p.SenderID = v 33744 } 33745 return nil 33746 } 33747 33748 func (p *ApplySendDeferredArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 33749 p.Payer = &Uint64{} 33750 if err := p.Payer.Read(ctx, iprot); err != nil { 33751 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 33752 } 33753 return nil 33754 } 33755 33756 func (p *ApplySendDeferredArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 33757 if v, err := iprot.ReadBinary(ctx); err != nil { 33758 return thrift.PrependError("error reading field 3: ", err) 33759 } else { 33760 p.SerializedTransaction = v 33761 } 33762 return nil 33763 } 33764 33765 func (p *ApplySendDeferredArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 33766 if v, err := iprot.ReadI32(ctx); err != nil { 33767 return thrift.PrependError("error reading field 4: ", err) 33768 } else { 33769 p.ReplaceExisting = v 33770 } 33771 return nil 33772 } 33773 33774 func (p *ApplySendDeferredArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 33775 if err := oprot.WriteStructBegin(ctx, "send_deferred_args"); err != nil { 33776 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 33777 if p != nil { 33778 if err := p.writeField1(ctx, oprot); err != nil { return err } 33779 if err := p.writeField2(ctx, oprot); err != nil { return err } 33780 if err := p.writeField3(ctx, oprot); err != nil { return err } 33781 if err := p.writeField4(ctx, oprot); err != nil { return err } 33782 } 33783 if err := oprot.WriteFieldStop(ctx); err != nil { 33784 return thrift.PrependError("write field stop error: ", err) } 33785 if err := oprot.WriteStructEnd(ctx); err != nil { 33786 return thrift.PrependError("write struct stop error: ", err) } 33787 return nil 33788 } 33789 33790 func (p *ApplySendDeferredArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 33791 if err := oprot.WriteFieldBegin(ctx, "sender_id", thrift.STRING, 1); err != nil { 33792 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sender_id: ", p), err) } 33793 if err := oprot.WriteBinary(ctx, p.SenderID); err != nil { 33794 return thrift.PrependError(fmt.Sprintf("%T.sender_id (1) field write error: ", p), err) } 33795 if err := oprot.WriteFieldEnd(ctx); err != nil { 33796 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sender_id: ", p), err) } 33797 return err 33798 } 33799 33800 func (p *ApplySendDeferredArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 33801 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 2); err != nil { 33802 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:payer: ", p), err) } 33803 if err := p.Payer.Write(ctx, oprot); err != nil { 33804 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 33805 } 33806 if err := oprot.WriteFieldEnd(ctx); err != nil { 33807 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:payer: ", p), err) } 33808 return err 33809 } 33810 33811 func (p *ApplySendDeferredArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 33812 if err := oprot.WriteFieldBegin(ctx, "serialized_transaction", thrift.STRING, 3); err != nil { 33813 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:serialized_transaction: ", p), err) } 33814 if err := oprot.WriteBinary(ctx, p.SerializedTransaction); err != nil { 33815 return thrift.PrependError(fmt.Sprintf("%T.serialized_transaction (3) field write error: ", p), err) } 33816 if err := oprot.WriteFieldEnd(ctx); err != nil { 33817 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:serialized_transaction: ", p), err) } 33818 return err 33819 } 33820 33821 func (p *ApplySendDeferredArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 33822 if err := oprot.WriteFieldBegin(ctx, "replace_existing", thrift.I32, 4); err != nil { 33823 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:replace_existing: ", p), err) } 33824 if err := oprot.WriteI32(ctx, int32(p.ReplaceExisting)); err != nil { 33825 return thrift.PrependError(fmt.Sprintf("%T.replace_existing (4) field write error: ", p), err) } 33826 if err := oprot.WriteFieldEnd(ctx); err != nil { 33827 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:replace_existing: ", p), err) } 33828 return err 33829 } 33830 33831 func (p *ApplySendDeferredArgs) String() string { 33832 if p == nil { 33833 return "<nil>" 33834 } 33835 return fmt.Sprintf("ApplySendDeferredArgs(%+v)", *p) 33836 } 33837 33838 type ApplySendDeferredResult struct { 33839 } 33840 33841 func NewApplySendDeferredResult() *ApplySendDeferredResult { 33842 return &ApplySendDeferredResult{} 33843 } 33844 33845 func (p *ApplySendDeferredResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 33846 if _, err := iprot.ReadStructBegin(ctx); err != nil { 33847 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 33848 } 33849 33850 33851 for { 33852 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 33853 if err != nil { 33854 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 33855 } 33856 if fieldTypeId == thrift.STOP { break; } 33857 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33858 return err 33859 } 33860 if err := iprot.ReadFieldEnd(ctx); err != nil { 33861 return err 33862 } 33863 } 33864 if err := iprot.ReadStructEnd(ctx); err != nil { 33865 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 33866 } 33867 return nil 33868 } 33869 33870 func (p *ApplySendDeferredResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 33871 if err := oprot.WriteStructBegin(ctx, "send_deferred_result"); err != nil { 33872 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 33873 if p != nil { 33874 } 33875 if err := oprot.WriteFieldStop(ctx); err != nil { 33876 return thrift.PrependError("write field stop error: ", err) } 33877 if err := oprot.WriteStructEnd(ctx); err != nil { 33878 return thrift.PrependError("write struct stop error: ", err) } 33879 return nil 33880 } 33881 33882 func (p *ApplySendDeferredResult) String() string { 33883 if p == nil { 33884 return "<nil>" 33885 } 33886 return fmt.Sprintf("ApplySendDeferredResult(%+v)", *p) 33887 } 33888 33889 // Attributes: 33890 // - SenderID 33891 type ApplyCancelDeferredArgs struct { 33892 SenderID []byte `thrift:"sender_id,1" db:"sender_id" json:"sender_id"` 33893 } 33894 33895 func NewApplyCancelDeferredArgs() *ApplyCancelDeferredArgs { 33896 return &ApplyCancelDeferredArgs{} 33897 } 33898 33899 33900 func (p *ApplyCancelDeferredArgs) GetSenderID() []byte { 33901 return p.SenderID 33902 } 33903 func (p *ApplyCancelDeferredArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 33904 if _, err := iprot.ReadStructBegin(ctx); err != nil { 33905 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 33906 } 33907 33908 33909 for { 33910 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 33911 if err != nil { 33912 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 33913 } 33914 if fieldTypeId == thrift.STOP { break; } 33915 switch fieldId { 33916 case 1: 33917 if fieldTypeId == thrift.STRING { 33918 if err := p.ReadField1(ctx, iprot); err != nil { 33919 return err 33920 } 33921 } else { 33922 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33923 return err 33924 } 33925 } 33926 default: 33927 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 33928 return err 33929 } 33930 } 33931 if err := iprot.ReadFieldEnd(ctx); err != nil { 33932 return err 33933 } 33934 } 33935 if err := iprot.ReadStructEnd(ctx); err != nil { 33936 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 33937 } 33938 return nil 33939 } 33940 33941 func (p *ApplyCancelDeferredArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 33942 if v, err := iprot.ReadBinary(ctx); err != nil { 33943 return thrift.PrependError("error reading field 1: ", err) 33944 } else { 33945 p.SenderID = v 33946 } 33947 return nil 33948 } 33949 33950 func (p *ApplyCancelDeferredArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 33951 if err := oprot.WriteStructBegin(ctx, "cancel_deferred_args"); err != nil { 33952 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 33953 if p != nil { 33954 if err := p.writeField1(ctx, oprot); err != nil { return err } 33955 } 33956 if err := oprot.WriteFieldStop(ctx); err != nil { 33957 return thrift.PrependError("write field stop error: ", err) } 33958 if err := oprot.WriteStructEnd(ctx); err != nil { 33959 return thrift.PrependError("write struct stop error: ", err) } 33960 return nil 33961 } 33962 33963 func (p *ApplyCancelDeferredArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 33964 if err := oprot.WriteFieldBegin(ctx, "sender_id", thrift.STRING, 1); err != nil { 33965 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sender_id: ", p), err) } 33966 if err := oprot.WriteBinary(ctx, p.SenderID); err != nil { 33967 return thrift.PrependError(fmt.Sprintf("%T.sender_id (1) field write error: ", p), err) } 33968 if err := oprot.WriteFieldEnd(ctx); err != nil { 33969 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sender_id: ", p), err) } 33970 return err 33971 } 33972 33973 func (p *ApplyCancelDeferredArgs) String() string { 33974 if p == nil { 33975 return "<nil>" 33976 } 33977 return fmt.Sprintf("ApplyCancelDeferredArgs(%+v)", *p) 33978 } 33979 33980 // Attributes: 33981 // - Success 33982 type ApplyCancelDeferredResult struct { 33983 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 33984 } 33985 33986 func NewApplyCancelDeferredResult() *ApplyCancelDeferredResult { 33987 return &ApplyCancelDeferredResult{} 33988 } 33989 33990 var ApplyCancelDeferredResult_Success_DEFAULT int32 33991 func (p *ApplyCancelDeferredResult) GetSuccess() int32 { 33992 if !p.IsSetSuccess() { 33993 return ApplyCancelDeferredResult_Success_DEFAULT 33994 } 33995 return *p.Success 33996 } 33997 func (p *ApplyCancelDeferredResult) IsSetSuccess() bool { 33998 return p.Success != nil 33999 } 34000 34001 func (p *ApplyCancelDeferredResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 34002 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34003 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34004 } 34005 34006 34007 for { 34008 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34009 if err != nil { 34010 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34011 } 34012 if fieldTypeId == thrift.STOP { break; } 34013 switch fieldId { 34014 case 0: 34015 if fieldTypeId == thrift.I32 { 34016 if err := p.ReadField0(ctx, iprot); err != nil { 34017 return err 34018 } 34019 } else { 34020 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34021 return err 34022 } 34023 } 34024 default: 34025 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34026 return err 34027 } 34028 } 34029 if err := iprot.ReadFieldEnd(ctx); err != nil { 34030 return err 34031 } 34032 } 34033 if err := iprot.ReadStructEnd(ctx); err != nil { 34034 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 34035 } 34036 return nil 34037 } 34038 34039 func (p *ApplyCancelDeferredResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 34040 if v, err := iprot.ReadI32(ctx); err != nil { 34041 return thrift.PrependError("error reading field 0: ", err) 34042 } else { 34043 p.Success = &v 34044 } 34045 return nil 34046 } 34047 34048 func (p *ApplyCancelDeferredResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 34049 if err := oprot.WriteStructBegin(ctx, "cancel_deferred_result"); err != nil { 34050 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 34051 if p != nil { 34052 if err := p.writeField0(ctx, oprot); err != nil { return err } 34053 } 34054 if err := oprot.WriteFieldStop(ctx); err != nil { 34055 return thrift.PrependError("write field stop error: ", err) } 34056 if err := oprot.WriteStructEnd(ctx); err != nil { 34057 return thrift.PrependError("write struct stop error: ", err) } 34058 return nil 34059 } 34060 34061 func (p *ApplyCancelDeferredResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 34062 if p.IsSetSuccess() { 34063 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 34064 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 34065 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 34066 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 34067 if err := oprot.WriteFieldEnd(ctx); err != nil { 34068 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 34069 } 34070 return err 34071 } 34072 34073 func (p *ApplyCancelDeferredResult) String() string { 34074 if p == nil { 34075 return "<nil>" 34076 } 34077 return fmt.Sprintf("ApplyCancelDeferredResult(%+v)", *p) 34078 } 34079 34080 type ApplyReadTransactionArgs struct { 34081 } 34082 34083 func NewApplyReadTransactionArgs() *ApplyReadTransactionArgs { 34084 return &ApplyReadTransactionArgs{} 34085 } 34086 34087 func (p *ApplyReadTransactionArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 34088 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34089 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34090 } 34091 34092 34093 for { 34094 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34095 if err != nil { 34096 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34097 } 34098 if fieldTypeId == thrift.STOP { break; } 34099 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34100 return err 34101 } 34102 if err := iprot.ReadFieldEnd(ctx); err != nil { 34103 return err 34104 } 34105 } 34106 if err := iprot.ReadStructEnd(ctx); err != nil { 34107 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 34108 } 34109 return nil 34110 } 34111 34112 func (p *ApplyReadTransactionArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 34113 if err := oprot.WriteStructBegin(ctx, "read_transaction_args"); err != nil { 34114 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 34115 if p != nil { 34116 } 34117 if err := oprot.WriteFieldStop(ctx); err != nil { 34118 return thrift.PrependError("write field stop error: ", err) } 34119 if err := oprot.WriteStructEnd(ctx); err != nil { 34120 return thrift.PrependError("write struct stop error: ", err) } 34121 return nil 34122 } 34123 34124 func (p *ApplyReadTransactionArgs) String() string { 34125 if p == nil { 34126 return "<nil>" 34127 } 34128 return fmt.Sprintf("ApplyReadTransactionArgs(%+v)", *p) 34129 } 34130 34131 // Attributes: 34132 // - Success 34133 type ApplyReadTransactionResult struct { 34134 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 34135 } 34136 34137 func NewApplyReadTransactionResult() *ApplyReadTransactionResult { 34138 return &ApplyReadTransactionResult{} 34139 } 34140 34141 var ApplyReadTransactionResult_Success_DEFAULT []byte 34142 34143 func (p *ApplyReadTransactionResult) GetSuccess() []byte { 34144 return p.Success 34145 } 34146 func (p *ApplyReadTransactionResult) IsSetSuccess() bool { 34147 return p.Success != nil 34148 } 34149 34150 func (p *ApplyReadTransactionResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 34151 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34152 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34153 } 34154 34155 34156 for { 34157 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34158 if err != nil { 34159 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34160 } 34161 if fieldTypeId == thrift.STOP { break; } 34162 switch fieldId { 34163 case 0: 34164 if fieldTypeId == thrift.STRING { 34165 if err := p.ReadField0(ctx, iprot); err != nil { 34166 return err 34167 } 34168 } else { 34169 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34170 return err 34171 } 34172 } 34173 default: 34174 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34175 return err 34176 } 34177 } 34178 if err := iprot.ReadFieldEnd(ctx); err != nil { 34179 return err 34180 } 34181 } 34182 if err := iprot.ReadStructEnd(ctx); err != nil { 34183 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 34184 } 34185 return nil 34186 } 34187 34188 func (p *ApplyReadTransactionResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 34189 if v, err := iprot.ReadBinary(ctx); err != nil { 34190 return thrift.PrependError("error reading field 0: ", err) 34191 } else { 34192 p.Success = v 34193 } 34194 return nil 34195 } 34196 34197 func (p *ApplyReadTransactionResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 34198 if err := oprot.WriteStructBegin(ctx, "read_transaction_result"); err != nil { 34199 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 34200 if p != nil { 34201 if err := p.writeField0(ctx, oprot); err != nil { return err } 34202 } 34203 if err := oprot.WriteFieldStop(ctx); err != nil { 34204 return thrift.PrependError("write field stop error: ", err) } 34205 if err := oprot.WriteStructEnd(ctx); err != nil { 34206 return thrift.PrependError("write struct stop error: ", err) } 34207 return nil 34208 } 34209 34210 func (p *ApplyReadTransactionResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 34211 if p.IsSetSuccess() { 34212 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 34213 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 34214 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 34215 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 34216 if err := oprot.WriteFieldEnd(ctx); err != nil { 34217 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 34218 } 34219 return err 34220 } 34221 34222 func (p *ApplyReadTransactionResult) String() string { 34223 if p == nil { 34224 return "<nil>" 34225 } 34226 return fmt.Sprintf("ApplyReadTransactionResult(%+v)", *p) 34227 } 34228 34229 type ApplyTransactionSizeArgs struct { 34230 } 34231 34232 func NewApplyTransactionSizeArgs() *ApplyTransactionSizeArgs { 34233 return &ApplyTransactionSizeArgs{} 34234 } 34235 34236 func (p *ApplyTransactionSizeArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 34237 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34238 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34239 } 34240 34241 34242 for { 34243 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34244 if err != nil { 34245 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34246 } 34247 if fieldTypeId == thrift.STOP { break; } 34248 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34249 return err 34250 } 34251 if err := iprot.ReadFieldEnd(ctx); err != nil { 34252 return err 34253 } 34254 } 34255 if err := iprot.ReadStructEnd(ctx); err != nil { 34256 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 34257 } 34258 return nil 34259 } 34260 34261 func (p *ApplyTransactionSizeArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 34262 if err := oprot.WriteStructBegin(ctx, "transaction_size_args"); err != nil { 34263 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 34264 if p != nil { 34265 } 34266 if err := oprot.WriteFieldStop(ctx); err != nil { 34267 return thrift.PrependError("write field stop error: ", err) } 34268 if err := oprot.WriteStructEnd(ctx); err != nil { 34269 return thrift.PrependError("write struct stop error: ", err) } 34270 return nil 34271 } 34272 34273 func (p *ApplyTransactionSizeArgs) String() string { 34274 if p == nil { 34275 return "<nil>" 34276 } 34277 return fmt.Sprintf("ApplyTransactionSizeArgs(%+v)", *p) 34278 } 34279 34280 // Attributes: 34281 // - Success 34282 type ApplyTransactionSizeResult struct { 34283 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 34284 } 34285 34286 func NewApplyTransactionSizeResult() *ApplyTransactionSizeResult { 34287 return &ApplyTransactionSizeResult{} 34288 } 34289 34290 var ApplyTransactionSizeResult_Success_DEFAULT int32 34291 func (p *ApplyTransactionSizeResult) GetSuccess() int32 { 34292 if !p.IsSetSuccess() { 34293 return ApplyTransactionSizeResult_Success_DEFAULT 34294 } 34295 return *p.Success 34296 } 34297 func (p *ApplyTransactionSizeResult) IsSetSuccess() bool { 34298 return p.Success != nil 34299 } 34300 34301 func (p *ApplyTransactionSizeResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 34302 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34303 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34304 } 34305 34306 34307 for { 34308 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34309 if err != nil { 34310 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34311 } 34312 if fieldTypeId == thrift.STOP { break; } 34313 switch fieldId { 34314 case 0: 34315 if fieldTypeId == thrift.I32 { 34316 if err := p.ReadField0(ctx, iprot); err != nil { 34317 return err 34318 } 34319 } else { 34320 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34321 return err 34322 } 34323 } 34324 default: 34325 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34326 return err 34327 } 34328 } 34329 if err := iprot.ReadFieldEnd(ctx); err != nil { 34330 return err 34331 } 34332 } 34333 if err := iprot.ReadStructEnd(ctx); err != nil { 34334 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 34335 } 34336 return nil 34337 } 34338 34339 func (p *ApplyTransactionSizeResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 34340 if v, err := iprot.ReadI32(ctx); err != nil { 34341 return thrift.PrependError("error reading field 0: ", err) 34342 } else { 34343 p.Success = &v 34344 } 34345 return nil 34346 } 34347 34348 func (p *ApplyTransactionSizeResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 34349 if err := oprot.WriteStructBegin(ctx, "transaction_size_result"); err != nil { 34350 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 34351 if p != nil { 34352 if err := p.writeField0(ctx, oprot); err != nil { return err } 34353 } 34354 if err := oprot.WriteFieldStop(ctx); err != nil { 34355 return thrift.PrependError("write field stop error: ", err) } 34356 if err := oprot.WriteStructEnd(ctx); err != nil { 34357 return thrift.PrependError("write struct stop error: ", err) } 34358 return nil 34359 } 34360 34361 func (p *ApplyTransactionSizeResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 34362 if p.IsSetSuccess() { 34363 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 34364 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 34365 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 34366 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 34367 if err := oprot.WriteFieldEnd(ctx); err != nil { 34368 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 34369 } 34370 return err 34371 } 34372 34373 func (p *ApplyTransactionSizeResult) String() string { 34374 if p == nil { 34375 return "<nil>" 34376 } 34377 return fmt.Sprintf("ApplyTransactionSizeResult(%+v)", *p) 34378 } 34379 34380 type ApplyTaposBlockNumArgs struct { 34381 } 34382 34383 func NewApplyTaposBlockNumArgs() *ApplyTaposBlockNumArgs { 34384 return &ApplyTaposBlockNumArgs{} 34385 } 34386 34387 func (p *ApplyTaposBlockNumArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 34388 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34389 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34390 } 34391 34392 34393 for { 34394 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34395 if err != nil { 34396 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34397 } 34398 if fieldTypeId == thrift.STOP { break; } 34399 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34400 return err 34401 } 34402 if err := iprot.ReadFieldEnd(ctx); err != nil { 34403 return err 34404 } 34405 } 34406 if err := iprot.ReadStructEnd(ctx); err != nil { 34407 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 34408 } 34409 return nil 34410 } 34411 34412 func (p *ApplyTaposBlockNumArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 34413 if err := oprot.WriteStructBegin(ctx, "tapos_block_num_args"); err != nil { 34414 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 34415 if p != nil { 34416 } 34417 if err := oprot.WriteFieldStop(ctx); err != nil { 34418 return thrift.PrependError("write field stop error: ", err) } 34419 if err := oprot.WriteStructEnd(ctx); err != nil { 34420 return thrift.PrependError("write struct stop error: ", err) } 34421 return nil 34422 } 34423 34424 func (p *ApplyTaposBlockNumArgs) String() string { 34425 if p == nil { 34426 return "<nil>" 34427 } 34428 return fmt.Sprintf("ApplyTaposBlockNumArgs(%+v)", *p) 34429 } 34430 34431 // Attributes: 34432 // - Success 34433 type ApplyTaposBlockNumResult struct { 34434 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 34435 } 34436 34437 func NewApplyTaposBlockNumResult() *ApplyTaposBlockNumResult { 34438 return &ApplyTaposBlockNumResult{} 34439 } 34440 34441 var ApplyTaposBlockNumResult_Success_DEFAULT int32 34442 func (p *ApplyTaposBlockNumResult) GetSuccess() int32 { 34443 if !p.IsSetSuccess() { 34444 return ApplyTaposBlockNumResult_Success_DEFAULT 34445 } 34446 return *p.Success 34447 } 34448 func (p *ApplyTaposBlockNumResult) IsSetSuccess() bool { 34449 return p.Success != nil 34450 } 34451 34452 func (p *ApplyTaposBlockNumResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 34453 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34454 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34455 } 34456 34457 34458 for { 34459 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34460 if err != nil { 34461 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34462 } 34463 if fieldTypeId == thrift.STOP { break; } 34464 switch fieldId { 34465 case 0: 34466 if fieldTypeId == thrift.I32 { 34467 if err := p.ReadField0(ctx, iprot); err != nil { 34468 return err 34469 } 34470 } else { 34471 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34472 return err 34473 } 34474 } 34475 default: 34476 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34477 return err 34478 } 34479 } 34480 if err := iprot.ReadFieldEnd(ctx); err != nil { 34481 return err 34482 } 34483 } 34484 if err := iprot.ReadStructEnd(ctx); err != nil { 34485 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 34486 } 34487 return nil 34488 } 34489 34490 func (p *ApplyTaposBlockNumResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 34491 if v, err := iprot.ReadI32(ctx); err != nil { 34492 return thrift.PrependError("error reading field 0: ", err) 34493 } else { 34494 p.Success = &v 34495 } 34496 return nil 34497 } 34498 34499 func (p *ApplyTaposBlockNumResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 34500 if err := oprot.WriteStructBegin(ctx, "tapos_block_num_result"); err != nil { 34501 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 34502 if p != nil { 34503 if err := p.writeField0(ctx, oprot); err != nil { return err } 34504 } 34505 if err := oprot.WriteFieldStop(ctx); err != nil { 34506 return thrift.PrependError("write field stop error: ", err) } 34507 if err := oprot.WriteStructEnd(ctx); err != nil { 34508 return thrift.PrependError("write struct stop error: ", err) } 34509 return nil 34510 } 34511 34512 func (p *ApplyTaposBlockNumResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 34513 if p.IsSetSuccess() { 34514 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 34515 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 34516 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 34517 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 34518 if err := oprot.WriteFieldEnd(ctx); err != nil { 34519 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 34520 } 34521 return err 34522 } 34523 34524 func (p *ApplyTaposBlockNumResult) String() string { 34525 if p == nil { 34526 return "<nil>" 34527 } 34528 return fmt.Sprintf("ApplyTaposBlockNumResult(%+v)", *p) 34529 } 34530 34531 type ApplyTaposBlockPrefixArgs struct { 34532 } 34533 34534 func NewApplyTaposBlockPrefixArgs() *ApplyTaposBlockPrefixArgs { 34535 return &ApplyTaposBlockPrefixArgs{} 34536 } 34537 34538 func (p *ApplyTaposBlockPrefixArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 34539 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34540 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34541 } 34542 34543 34544 for { 34545 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34546 if err != nil { 34547 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34548 } 34549 if fieldTypeId == thrift.STOP { break; } 34550 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34551 return err 34552 } 34553 if err := iprot.ReadFieldEnd(ctx); err != nil { 34554 return err 34555 } 34556 } 34557 if err := iprot.ReadStructEnd(ctx); err != nil { 34558 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 34559 } 34560 return nil 34561 } 34562 34563 func (p *ApplyTaposBlockPrefixArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 34564 if err := oprot.WriteStructBegin(ctx, "tapos_block_prefix_args"); err != nil { 34565 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 34566 if p != nil { 34567 } 34568 if err := oprot.WriteFieldStop(ctx); err != nil { 34569 return thrift.PrependError("write field stop error: ", err) } 34570 if err := oprot.WriteStructEnd(ctx); err != nil { 34571 return thrift.PrependError("write struct stop error: ", err) } 34572 return nil 34573 } 34574 34575 func (p *ApplyTaposBlockPrefixArgs) String() string { 34576 if p == nil { 34577 return "<nil>" 34578 } 34579 return fmt.Sprintf("ApplyTaposBlockPrefixArgs(%+v)", *p) 34580 } 34581 34582 // Attributes: 34583 // - Success 34584 type ApplyTaposBlockPrefixResult struct { 34585 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 34586 } 34587 34588 func NewApplyTaposBlockPrefixResult() *ApplyTaposBlockPrefixResult { 34589 return &ApplyTaposBlockPrefixResult{} 34590 } 34591 34592 var ApplyTaposBlockPrefixResult_Success_DEFAULT int32 34593 func (p *ApplyTaposBlockPrefixResult) GetSuccess() int32 { 34594 if !p.IsSetSuccess() { 34595 return ApplyTaposBlockPrefixResult_Success_DEFAULT 34596 } 34597 return *p.Success 34598 } 34599 func (p *ApplyTaposBlockPrefixResult) IsSetSuccess() bool { 34600 return p.Success != nil 34601 } 34602 34603 func (p *ApplyTaposBlockPrefixResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 34604 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34605 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34606 } 34607 34608 34609 for { 34610 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34611 if err != nil { 34612 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34613 } 34614 if fieldTypeId == thrift.STOP { break; } 34615 switch fieldId { 34616 case 0: 34617 if fieldTypeId == thrift.I32 { 34618 if err := p.ReadField0(ctx, iprot); err != nil { 34619 return err 34620 } 34621 } else { 34622 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34623 return err 34624 } 34625 } 34626 default: 34627 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34628 return err 34629 } 34630 } 34631 if err := iprot.ReadFieldEnd(ctx); err != nil { 34632 return err 34633 } 34634 } 34635 if err := iprot.ReadStructEnd(ctx); err != nil { 34636 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 34637 } 34638 return nil 34639 } 34640 34641 func (p *ApplyTaposBlockPrefixResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 34642 if v, err := iprot.ReadI32(ctx); err != nil { 34643 return thrift.PrependError("error reading field 0: ", err) 34644 } else { 34645 p.Success = &v 34646 } 34647 return nil 34648 } 34649 34650 func (p *ApplyTaposBlockPrefixResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 34651 if err := oprot.WriteStructBegin(ctx, "tapos_block_prefix_result"); err != nil { 34652 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 34653 if p != nil { 34654 if err := p.writeField0(ctx, oprot); err != nil { return err } 34655 } 34656 if err := oprot.WriteFieldStop(ctx); err != nil { 34657 return thrift.PrependError("write field stop error: ", err) } 34658 if err := oprot.WriteStructEnd(ctx); err != nil { 34659 return thrift.PrependError("write struct stop error: ", err) } 34660 return nil 34661 } 34662 34663 func (p *ApplyTaposBlockPrefixResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 34664 if p.IsSetSuccess() { 34665 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 34666 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 34667 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 34668 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 34669 if err := oprot.WriteFieldEnd(ctx); err != nil { 34670 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 34671 } 34672 return err 34673 } 34674 34675 func (p *ApplyTaposBlockPrefixResult) String() string { 34676 if p == nil { 34677 return "<nil>" 34678 } 34679 return fmt.Sprintf("ApplyTaposBlockPrefixResult(%+v)", *p) 34680 } 34681 34682 type ApplyExpirationArgs struct { 34683 } 34684 34685 func NewApplyExpirationArgs() *ApplyExpirationArgs { 34686 return &ApplyExpirationArgs{} 34687 } 34688 34689 func (p *ApplyExpirationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 34690 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34691 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34692 } 34693 34694 34695 for { 34696 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34697 if err != nil { 34698 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34699 } 34700 if fieldTypeId == thrift.STOP { break; } 34701 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34702 return err 34703 } 34704 if err := iprot.ReadFieldEnd(ctx); err != nil { 34705 return err 34706 } 34707 } 34708 if err := iprot.ReadStructEnd(ctx); err != nil { 34709 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 34710 } 34711 return nil 34712 } 34713 34714 func (p *ApplyExpirationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 34715 if err := oprot.WriteStructBegin(ctx, "expiration_args"); err != nil { 34716 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 34717 if p != nil { 34718 } 34719 if err := oprot.WriteFieldStop(ctx); err != nil { 34720 return thrift.PrependError("write field stop error: ", err) } 34721 if err := oprot.WriteStructEnd(ctx); err != nil { 34722 return thrift.PrependError("write struct stop error: ", err) } 34723 return nil 34724 } 34725 34726 func (p *ApplyExpirationArgs) String() string { 34727 if p == nil { 34728 return "<nil>" 34729 } 34730 return fmt.Sprintf("ApplyExpirationArgs(%+v)", *p) 34731 } 34732 34733 // Attributes: 34734 // - Success 34735 type ApplyExpirationResult struct { 34736 Success *int64 `thrift:"success,0" db:"success" json:"success,omitempty"` 34737 } 34738 34739 func NewApplyExpirationResult() *ApplyExpirationResult { 34740 return &ApplyExpirationResult{} 34741 } 34742 34743 var ApplyExpirationResult_Success_DEFAULT int64 34744 func (p *ApplyExpirationResult) GetSuccess() int64 { 34745 if !p.IsSetSuccess() { 34746 return ApplyExpirationResult_Success_DEFAULT 34747 } 34748 return *p.Success 34749 } 34750 func (p *ApplyExpirationResult) IsSetSuccess() bool { 34751 return p.Success != nil 34752 } 34753 34754 func (p *ApplyExpirationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 34755 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34756 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34757 } 34758 34759 34760 for { 34761 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34762 if err != nil { 34763 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34764 } 34765 if fieldTypeId == thrift.STOP { break; } 34766 switch fieldId { 34767 case 0: 34768 if fieldTypeId == thrift.I64 { 34769 if err := p.ReadField0(ctx, iprot); err != nil { 34770 return err 34771 } 34772 } else { 34773 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34774 return err 34775 } 34776 } 34777 default: 34778 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34779 return err 34780 } 34781 } 34782 if err := iprot.ReadFieldEnd(ctx); err != nil { 34783 return err 34784 } 34785 } 34786 if err := iprot.ReadStructEnd(ctx); err != nil { 34787 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 34788 } 34789 return nil 34790 } 34791 34792 func (p *ApplyExpirationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 34793 if v, err := iprot.ReadI64(ctx); err != nil { 34794 return thrift.PrependError("error reading field 0: ", err) 34795 } else { 34796 p.Success = &v 34797 } 34798 return nil 34799 } 34800 34801 func (p *ApplyExpirationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 34802 if err := oprot.WriteStructBegin(ctx, "expiration_result"); err != nil { 34803 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 34804 if p != nil { 34805 if err := p.writeField0(ctx, oprot); err != nil { return err } 34806 } 34807 if err := oprot.WriteFieldStop(ctx); err != nil { 34808 return thrift.PrependError("write field stop error: ", err) } 34809 if err := oprot.WriteStructEnd(ctx); err != nil { 34810 return thrift.PrependError("write struct stop error: ", err) } 34811 return nil 34812 } 34813 34814 func (p *ApplyExpirationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 34815 if p.IsSetSuccess() { 34816 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I64, 0); err != nil { 34817 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 34818 if err := oprot.WriteI64(ctx, int64(*p.Success)); err != nil { 34819 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 34820 if err := oprot.WriteFieldEnd(ctx); err != nil { 34821 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 34822 } 34823 return err 34824 } 34825 34826 func (p *ApplyExpirationResult) String() string { 34827 if p == nil { 34828 return "<nil>" 34829 } 34830 return fmt.Sprintf("ApplyExpirationResult(%+v)", *p) 34831 } 34832 34833 // Attributes: 34834 // - _type 34835 // - Index 34836 type ApplyGetActionArgs struct { 34837 _type int32 `thrift:"_type,1" db:"_type" json:"_type"` 34838 Index int32 `thrift:"index,2" db:"index" json:"index"` 34839 } 34840 34841 func NewApplyGetActionArgs() *ApplyGetActionArgs { 34842 return &ApplyGetActionArgs{} 34843 } 34844 34845 34846 func (p *ApplyGetActionArgs) Get_type() int32 { 34847 return p._type 34848 } 34849 34850 func (p *ApplyGetActionArgs) GetIndex() int32 { 34851 return p.Index 34852 } 34853 func (p *ApplyGetActionArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 34854 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34855 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34856 } 34857 34858 34859 for { 34860 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34861 if err != nil { 34862 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34863 } 34864 if fieldTypeId == thrift.STOP { break; } 34865 switch fieldId { 34866 case 1: 34867 if fieldTypeId == thrift.I32 { 34868 if err := p.ReadField1(ctx, iprot); err != nil { 34869 return err 34870 } 34871 } else { 34872 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34873 return err 34874 } 34875 } 34876 case 2: 34877 if fieldTypeId == thrift.I32 { 34878 if err := p.ReadField2(ctx, iprot); err != nil { 34879 return err 34880 } 34881 } else { 34882 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34883 return err 34884 } 34885 } 34886 default: 34887 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34888 return err 34889 } 34890 } 34891 if err := iprot.ReadFieldEnd(ctx); err != nil { 34892 return err 34893 } 34894 } 34895 if err := iprot.ReadStructEnd(ctx); err != nil { 34896 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 34897 } 34898 return nil 34899 } 34900 34901 func (p *ApplyGetActionArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 34902 if v, err := iprot.ReadI32(ctx); err != nil { 34903 return thrift.PrependError("error reading field 1: ", err) 34904 } else { 34905 p._type = v 34906 } 34907 return nil 34908 } 34909 34910 func (p *ApplyGetActionArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 34911 if v, err := iprot.ReadI32(ctx); err != nil { 34912 return thrift.PrependError("error reading field 2: ", err) 34913 } else { 34914 p.Index = v 34915 } 34916 return nil 34917 } 34918 34919 func (p *ApplyGetActionArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 34920 if err := oprot.WriteStructBegin(ctx, "get_action_args"); err != nil { 34921 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 34922 if p != nil { 34923 if err := p.writeField1(ctx, oprot); err != nil { return err } 34924 if err := p.writeField2(ctx, oprot); err != nil { return err } 34925 } 34926 if err := oprot.WriteFieldStop(ctx); err != nil { 34927 return thrift.PrependError("write field stop error: ", err) } 34928 if err := oprot.WriteStructEnd(ctx); err != nil { 34929 return thrift.PrependError("write struct stop error: ", err) } 34930 return nil 34931 } 34932 34933 func (p *ApplyGetActionArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 34934 if err := oprot.WriteFieldBegin(ctx, "_type", thrift.I32, 1); err != nil { 34935 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:_type: ", p), err) } 34936 if err := oprot.WriteI32(ctx, int32(p._type)); err != nil { 34937 return thrift.PrependError(fmt.Sprintf("%T._type (1) field write error: ", p), err) } 34938 if err := oprot.WriteFieldEnd(ctx); err != nil { 34939 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:_type: ", p), err) } 34940 return err 34941 } 34942 34943 func (p *ApplyGetActionArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 34944 if err := oprot.WriteFieldBegin(ctx, "index", thrift.I32, 2); err != nil { 34945 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:index: ", p), err) } 34946 if err := oprot.WriteI32(ctx, int32(p.Index)); err != nil { 34947 return thrift.PrependError(fmt.Sprintf("%T.index (2) field write error: ", p), err) } 34948 if err := oprot.WriteFieldEnd(ctx); err != nil { 34949 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:index: ", p), err) } 34950 return err 34951 } 34952 34953 func (p *ApplyGetActionArgs) String() string { 34954 if p == nil { 34955 return "<nil>" 34956 } 34957 return fmt.Sprintf("ApplyGetActionArgs(%+v)", *p) 34958 } 34959 34960 // Attributes: 34961 // - Success 34962 type ApplyGetActionResult struct { 34963 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 34964 } 34965 34966 func NewApplyGetActionResult() *ApplyGetActionResult { 34967 return &ApplyGetActionResult{} 34968 } 34969 34970 var ApplyGetActionResult_Success_DEFAULT []byte 34971 34972 func (p *ApplyGetActionResult) GetSuccess() []byte { 34973 return p.Success 34974 } 34975 func (p *ApplyGetActionResult) IsSetSuccess() bool { 34976 return p.Success != nil 34977 } 34978 34979 func (p *ApplyGetActionResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 34980 if _, err := iprot.ReadStructBegin(ctx); err != nil { 34981 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 34982 } 34983 34984 34985 for { 34986 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 34987 if err != nil { 34988 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 34989 } 34990 if fieldTypeId == thrift.STOP { break; } 34991 switch fieldId { 34992 case 0: 34993 if fieldTypeId == thrift.STRING { 34994 if err := p.ReadField0(ctx, iprot); err != nil { 34995 return err 34996 } 34997 } else { 34998 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 34999 return err 35000 } 35001 } 35002 default: 35003 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35004 return err 35005 } 35006 } 35007 if err := iprot.ReadFieldEnd(ctx); err != nil { 35008 return err 35009 } 35010 } 35011 if err := iprot.ReadStructEnd(ctx); err != nil { 35012 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 35013 } 35014 return nil 35015 } 35016 35017 func (p *ApplyGetActionResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 35018 if v, err := iprot.ReadBinary(ctx); err != nil { 35019 return thrift.PrependError("error reading field 0: ", err) 35020 } else { 35021 p.Success = v 35022 } 35023 return nil 35024 } 35025 35026 func (p *ApplyGetActionResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 35027 if err := oprot.WriteStructBegin(ctx, "get_action_result"); err != nil { 35028 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 35029 if p != nil { 35030 if err := p.writeField0(ctx, oprot); err != nil { return err } 35031 } 35032 if err := oprot.WriteFieldStop(ctx); err != nil { 35033 return thrift.PrependError("write field stop error: ", err) } 35034 if err := oprot.WriteStructEnd(ctx); err != nil { 35035 return thrift.PrependError("write struct stop error: ", err) } 35036 return nil 35037 } 35038 35039 func (p *ApplyGetActionResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 35040 if p.IsSetSuccess() { 35041 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 35042 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 35043 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 35044 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 35045 if err := oprot.WriteFieldEnd(ctx); err != nil { 35046 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 35047 } 35048 return err 35049 } 35050 35051 func (p *ApplyGetActionResult) String() string { 35052 if p == nil { 35053 return "<nil>" 35054 } 35055 return fmt.Sprintf("ApplyGetActionResult(%+v)", *p) 35056 } 35057 35058 // Attributes: 35059 // - Index 35060 type ApplyGetContextFreeDataArgs struct { 35061 Index int32 `thrift:"index,1" db:"index" json:"index"` 35062 } 35063 35064 func NewApplyGetContextFreeDataArgs() *ApplyGetContextFreeDataArgs { 35065 return &ApplyGetContextFreeDataArgs{} 35066 } 35067 35068 35069 func (p *ApplyGetContextFreeDataArgs) GetIndex() int32 { 35070 return p.Index 35071 } 35072 func (p *ApplyGetContextFreeDataArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 35073 if _, err := iprot.ReadStructBegin(ctx); err != nil { 35074 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 35075 } 35076 35077 35078 for { 35079 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 35080 if err != nil { 35081 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 35082 } 35083 if fieldTypeId == thrift.STOP { break; } 35084 switch fieldId { 35085 case 1: 35086 if fieldTypeId == thrift.I32 { 35087 if err := p.ReadField1(ctx, iprot); err != nil { 35088 return err 35089 } 35090 } else { 35091 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35092 return err 35093 } 35094 } 35095 default: 35096 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35097 return err 35098 } 35099 } 35100 if err := iprot.ReadFieldEnd(ctx); err != nil { 35101 return err 35102 } 35103 } 35104 if err := iprot.ReadStructEnd(ctx); err != nil { 35105 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 35106 } 35107 return nil 35108 } 35109 35110 func (p *ApplyGetContextFreeDataArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 35111 if v, err := iprot.ReadI32(ctx); err != nil { 35112 return thrift.PrependError("error reading field 1: ", err) 35113 } else { 35114 p.Index = v 35115 } 35116 return nil 35117 } 35118 35119 func (p *ApplyGetContextFreeDataArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 35120 if err := oprot.WriteStructBegin(ctx, "get_context_free_data_args"); err != nil { 35121 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 35122 if p != nil { 35123 if err := p.writeField1(ctx, oprot); err != nil { return err } 35124 } 35125 if err := oprot.WriteFieldStop(ctx); err != nil { 35126 return thrift.PrependError("write field stop error: ", err) } 35127 if err := oprot.WriteStructEnd(ctx); err != nil { 35128 return thrift.PrependError("write struct stop error: ", err) } 35129 return nil 35130 } 35131 35132 func (p *ApplyGetContextFreeDataArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 35133 if err := oprot.WriteFieldBegin(ctx, "index", thrift.I32, 1); err != nil { 35134 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:index: ", p), err) } 35135 if err := oprot.WriteI32(ctx, int32(p.Index)); err != nil { 35136 return thrift.PrependError(fmt.Sprintf("%T.index (1) field write error: ", p), err) } 35137 if err := oprot.WriteFieldEnd(ctx); err != nil { 35138 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:index: ", p), err) } 35139 return err 35140 } 35141 35142 func (p *ApplyGetContextFreeDataArgs) String() string { 35143 if p == nil { 35144 return "<nil>" 35145 } 35146 return fmt.Sprintf("ApplyGetContextFreeDataArgs(%+v)", *p) 35147 } 35148 35149 // Attributes: 35150 // - Success 35151 type ApplyGetContextFreeDataResult struct { 35152 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 35153 } 35154 35155 func NewApplyGetContextFreeDataResult() *ApplyGetContextFreeDataResult { 35156 return &ApplyGetContextFreeDataResult{} 35157 } 35158 35159 var ApplyGetContextFreeDataResult_Success_DEFAULT []byte 35160 35161 func (p *ApplyGetContextFreeDataResult) GetSuccess() []byte { 35162 return p.Success 35163 } 35164 func (p *ApplyGetContextFreeDataResult) IsSetSuccess() bool { 35165 return p.Success != nil 35166 } 35167 35168 func (p *ApplyGetContextFreeDataResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 35169 if _, err := iprot.ReadStructBegin(ctx); err != nil { 35170 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 35171 } 35172 35173 35174 for { 35175 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 35176 if err != nil { 35177 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 35178 } 35179 if fieldTypeId == thrift.STOP { break; } 35180 switch fieldId { 35181 case 0: 35182 if fieldTypeId == thrift.STRING { 35183 if err := p.ReadField0(ctx, iprot); err != nil { 35184 return err 35185 } 35186 } else { 35187 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35188 return err 35189 } 35190 } 35191 default: 35192 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35193 return err 35194 } 35195 } 35196 if err := iprot.ReadFieldEnd(ctx); err != nil { 35197 return err 35198 } 35199 } 35200 if err := iprot.ReadStructEnd(ctx); err != nil { 35201 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 35202 } 35203 return nil 35204 } 35205 35206 func (p *ApplyGetContextFreeDataResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 35207 if v, err := iprot.ReadBinary(ctx); err != nil { 35208 return thrift.PrependError("error reading field 0: ", err) 35209 } else { 35210 p.Success = v 35211 } 35212 return nil 35213 } 35214 35215 func (p *ApplyGetContextFreeDataResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 35216 if err := oprot.WriteStructBegin(ctx, "get_context_free_data_result"); err != nil { 35217 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 35218 if p != nil { 35219 if err := p.writeField0(ctx, oprot); err != nil { return err } 35220 } 35221 if err := oprot.WriteFieldStop(ctx); err != nil { 35222 return thrift.PrependError("write field stop error: ", err) } 35223 if err := oprot.WriteStructEnd(ctx); err != nil { 35224 return thrift.PrependError("write struct stop error: ", err) } 35225 return nil 35226 } 35227 35228 func (p *ApplyGetContextFreeDataResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 35229 if p.IsSetSuccess() { 35230 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 35231 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 35232 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 35233 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 35234 if err := oprot.WriteFieldEnd(ctx); err != nil { 35235 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 35236 } 35237 return err 35238 } 35239 35240 func (p *ApplyGetContextFreeDataResult) String() string { 35241 if p == nil { 35242 return "<nil>" 35243 } 35244 return fmt.Sprintf("ApplyGetContextFreeDataResult(%+v)", *p) 35245 } 35246 35247 // Attributes: 35248 // - Scope 35249 // - Table 35250 // - Payer 35251 // - ID 35252 // - Data 35253 type ApplyDbStoreI64Args struct { 35254 Scope *Uint64 `thrift:"scope,1" db:"scope" json:"scope"` 35255 Table *Uint64 `thrift:"table,2" db:"table" json:"table"` 35256 Payer *Uint64 `thrift:"payer,3" db:"payer" json:"payer"` 35257 ID *Uint64 `thrift:"id,4" db:"id" json:"id"` 35258 Data []byte `thrift:"data,5" db:"data" json:"data"` 35259 } 35260 35261 func NewApplyDbStoreI64Args() *ApplyDbStoreI64Args { 35262 return &ApplyDbStoreI64Args{} 35263 } 35264 35265 var ApplyDbStoreI64Args_Scope_DEFAULT *Uint64 35266 func (p *ApplyDbStoreI64Args) GetScope() *Uint64 { 35267 if !p.IsSetScope() { 35268 return ApplyDbStoreI64Args_Scope_DEFAULT 35269 } 35270 return p.Scope 35271 } 35272 var ApplyDbStoreI64Args_Table_DEFAULT *Uint64 35273 func (p *ApplyDbStoreI64Args) GetTable() *Uint64 { 35274 if !p.IsSetTable() { 35275 return ApplyDbStoreI64Args_Table_DEFAULT 35276 } 35277 return p.Table 35278 } 35279 var ApplyDbStoreI64Args_Payer_DEFAULT *Uint64 35280 func (p *ApplyDbStoreI64Args) GetPayer() *Uint64 { 35281 if !p.IsSetPayer() { 35282 return ApplyDbStoreI64Args_Payer_DEFAULT 35283 } 35284 return p.Payer 35285 } 35286 var ApplyDbStoreI64Args_ID_DEFAULT *Uint64 35287 func (p *ApplyDbStoreI64Args) GetID() *Uint64 { 35288 if !p.IsSetID() { 35289 return ApplyDbStoreI64Args_ID_DEFAULT 35290 } 35291 return p.ID 35292 } 35293 35294 func (p *ApplyDbStoreI64Args) GetData() []byte { 35295 return p.Data 35296 } 35297 func (p *ApplyDbStoreI64Args) IsSetScope() bool { 35298 return p.Scope != nil 35299 } 35300 35301 func (p *ApplyDbStoreI64Args) IsSetTable() bool { 35302 return p.Table != nil 35303 } 35304 35305 func (p *ApplyDbStoreI64Args) IsSetPayer() bool { 35306 return p.Payer != nil 35307 } 35308 35309 func (p *ApplyDbStoreI64Args) IsSetID() bool { 35310 return p.ID != nil 35311 } 35312 35313 func (p *ApplyDbStoreI64Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 35314 if _, err := iprot.ReadStructBegin(ctx); err != nil { 35315 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 35316 } 35317 35318 35319 for { 35320 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 35321 if err != nil { 35322 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 35323 } 35324 if fieldTypeId == thrift.STOP { break; } 35325 switch fieldId { 35326 case 1: 35327 if fieldTypeId == thrift.STRUCT { 35328 if err := p.ReadField1(ctx, iprot); err != nil { 35329 return err 35330 } 35331 } else { 35332 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35333 return err 35334 } 35335 } 35336 case 2: 35337 if fieldTypeId == thrift.STRUCT { 35338 if err := p.ReadField2(ctx, iprot); err != nil { 35339 return err 35340 } 35341 } else { 35342 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35343 return err 35344 } 35345 } 35346 case 3: 35347 if fieldTypeId == thrift.STRUCT { 35348 if err := p.ReadField3(ctx, iprot); err != nil { 35349 return err 35350 } 35351 } else { 35352 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35353 return err 35354 } 35355 } 35356 case 4: 35357 if fieldTypeId == thrift.STRUCT { 35358 if err := p.ReadField4(ctx, iprot); err != nil { 35359 return err 35360 } 35361 } else { 35362 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35363 return err 35364 } 35365 } 35366 case 5: 35367 if fieldTypeId == thrift.STRING { 35368 if err := p.ReadField5(ctx, iprot); err != nil { 35369 return err 35370 } 35371 } else { 35372 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35373 return err 35374 } 35375 } 35376 default: 35377 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35378 return err 35379 } 35380 } 35381 if err := iprot.ReadFieldEnd(ctx); err != nil { 35382 return err 35383 } 35384 } 35385 if err := iprot.ReadStructEnd(ctx); err != nil { 35386 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 35387 } 35388 return nil 35389 } 35390 35391 func (p *ApplyDbStoreI64Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 35392 p.Scope = &Uint64{} 35393 if err := p.Scope.Read(ctx, iprot); err != nil { 35394 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 35395 } 35396 return nil 35397 } 35398 35399 func (p *ApplyDbStoreI64Args) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 35400 p.Table = &Uint64{} 35401 if err := p.Table.Read(ctx, iprot); err != nil { 35402 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 35403 } 35404 return nil 35405 } 35406 35407 func (p *ApplyDbStoreI64Args) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 35408 p.Payer = &Uint64{} 35409 if err := p.Payer.Read(ctx, iprot); err != nil { 35410 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 35411 } 35412 return nil 35413 } 35414 35415 func (p *ApplyDbStoreI64Args) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 35416 p.ID = &Uint64{} 35417 if err := p.ID.Read(ctx, iprot); err != nil { 35418 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ID), err) 35419 } 35420 return nil 35421 } 35422 35423 func (p *ApplyDbStoreI64Args) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 35424 if v, err := iprot.ReadBinary(ctx); err != nil { 35425 return thrift.PrependError("error reading field 5: ", err) 35426 } else { 35427 p.Data = v 35428 } 35429 return nil 35430 } 35431 35432 func (p *ApplyDbStoreI64Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 35433 if err := oprot.WriteStructBegin(ctx, "db_store_i64_args"); err != nil { 35434 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 35435 if p != nil { 35436 if err := p.writeField1(ctx, oprot); err != nil { return err } 35437 if err := p.writeField2(ctx, oprot); err != nil { return err } 35438 if err := p.writeField3(ctx, oprot); err != nil { return err } 35439 if err := p.writeField4(ctx, oprot); err != nil { return err } 35440 if err := p.writeField5(ctx, oprot); err != nil { return err } 35441 } 35442 if err := oprot.WriteFieldStop(ctx); err != nil { 35443 return thrift.PrependError("write field stop error: ", err) } 35444 if err := oprot.WriteStructEnd(ctx); err != nil { 35445 return thrift.PrependError("write struct stop error: ", err) } 35446 return nil 35447 } 35448 35449 func (p *ApplyDbStoreI64Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 35450 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 1); err != nil { 35451 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:scope: ", p), err) } 35452 if err := p.Scope.Write(ctx, oprot); err != nil { 35453 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 35454 } 35455 if err := oprot.WriteFieldEnd(ctx); err != nil { 35456 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:scope: ", p), err) } 35457 return err 35458 } 35459 35460 func (p *ApplyDbStoreI64Args) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 35461 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 2); err != nil { 35462 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:table: ", p), err) } 35463 if err := p.Table.Write(ctx, oprot); err != nil { 35464 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 35465 } 35466 if err := oprot.WriteFieldEnd(ctx); err != nil { 35467 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:table: ", p), err) } 35468 return err 35469 } 35470 35471 func (p *ApplyDbStoreI64Args) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 35472 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 3); err != nil { 35473 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:payer: ", p), err) } 35474 if err := p.Payer.Write(ctx, oprot); err != nil { 35475 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 35476 } 35477 if err := oprot.WriteFieldEnd(ctx); err != nil { 35478 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:payer: ", p), err) } 35479 return err 35480 } 35481 35482 func (p *ApplyDbStoreI64Args) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 35483 if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRUCT, 4); err != nil { 35484 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err) } 35485 if err := p.ID.Write(ctx, oprot); err != nil { 35486 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ID), err) 35487 } 35488 if err := oprot.WriteFieldEnd(ctx); err != nil { 35489 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err) } 35490 return err 35491 } 35492 35493 func (p *ApplyDbStoreI64Args) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 35494 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 5); err != nil { 35495 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:data: ", p), err) } 35496 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 35497 return thrift.PrependError(fmt.Sprintf("%T.data (5) field write error: ", p), err) } 35498 if err := oprot.WriteFieldEnd(ctx); err != nil { 35499 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:data: ", p), err) } 35500 return err 35501 } 35502 35503 func (p *ApplyDbStoreI64Args) String() string { 35504 if p == nil { 35505 return "<nil>" 35506 } 35507 return fmt.Sprintf("ApplyDbStoreI64Args(%+v)", *p) 35508 } 35509 35510 // Attributes: 35511 // - Success 35512 type ApplyDbStoreI64Result struct { 35513 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 35514 } 35515 35516 func NewApplyDbStoreI64Result() *ApplyDbStoreI64Result { 35517 return &ApplyDbStoreI64Result{} 35518 } 35519 35520 var ApplyDbStoreI64Result_Success_DEFAULT int32 35521 func (p *ApplyDbStoreI64Result) GetSuccess() int32 { 35522 if !p.IsSetSuccess() { 35523 return ApplyDbStoreI64Result_Success_DEFAULT 35524 } 35525 return *p.Success 35526 } 35527 func (p *ApplyDbStoreI64Result) IsSetSuccess() bool { 35528 return p.Success != nil 35529 } 35530 35531 func (p *ApplyDbStoreI64Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 35532 if _, err := iprot.ReadStructBegin(ctx); err != nil { 35533 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 35534 } 35535 35536 35537 for { 35538 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 35539 if err != nil { 35540 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 35541 } 35542 if fieldTypeId == thrift.STOP { break; } 35543 switch fieldId { 35544 case 0: 35545 if fieldTypeId == thrift.I32 { 35546 if err := p.ReadField0(ctx, iprot); err != nil { 35547 return err 35548 } 35549 } else { 35550 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35551 return err 35552 } 35553 } 35554 default: 35555 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35556 return err 35557 } 35558 } 35559 if err := iprot.ReadFieldEnd(ctx); err != nil { 35560 return err 35561 } 35562 } 35563 if err := iprot.ReadStructEnd(ctx); err != nil { 35564 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 35565 } 35566 return nil 35567 } 35568 35569 func (p *ApplyDbStoreI64Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 35570 if v, err := iprot.ReadI32(ctx); err != nil { 35571 return thrift.PrependError("error reading field 0: ", err) 35572 } else { 35573 p.Success = &v 35574 } 35575 return nil 35576 } 35577 35578 func (p *ApplyDbStoreI64Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 35579 if err := oprot.WriteStructBegin(ctx, "db_store_i64_result"); err != nil { 35580 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 35581 if p != nil { 35582 if err := p.writeField0(ctx, oprot); err != nil { return err } 35583 } 35584 if err := oprot.WriteFieldStop(ctx); err != nil { 35585 return thrift.PrependError("write field stop error: ", err) } 35586 if err := oprot.WriteStructEnd(ctx); err != nil { 35587 return thrift.PrependError("write struct stop error: ", err) } 35588 return nil 35589 } 35590 35591 func (p *ApplyDbStoreI64Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 35592 if p.IsSetSuccess() { 35593 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 35594 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 35595 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 35596 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 35597 if err := oprot.WriteFieldEnd(ctx); err != nil { 35598 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 35599 } 35600 return err 35601 } 35602 35603 func (p *ApplyDbStoreI64Result) String() string { 35604 if p == nil { 35605 return "<nil>" 35606 } 35607 return fmt.Sprintf("ApplyDbStoreI64Result(%+v)", *p) 35608 } 35609 35610 // Attributes: 35611 // - Iterator 35612 // - Payer 35613 // - Data 35614 type ApplyDbUpdateI64Args struct { 35615 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 35616 Payer *Uint64 `thrift:"payer,2" db:"payer" json:"payer"` 35617 Data []byte `thrift:"data,3" db:"data" json:"data"` 35618 } 35619 35620 func NewApplyDbUpdateI64Args() *ApplyDbUpdateI64Args { 35621 return &ApplyDbUpdateI64Args{} 35622 } 35623 35624 35625 func (p *ApplyDbUpdateI64Args) GetIterator() int32 { 35626 return p.Iterator 35627 } 35628 var ApplyDbUpdateI64Args_Payer_DEFAULT *Uint64 35629 func (p *ApplyDbUpdateI64Args) GetPayer() *Uint64 { 35630 if !p.IsSetPayer() { 35631 return ApplyDbUpdateI64Args_Payer_DEFAULT 35632 } 35633 return p.Payer 35634 } 35635 35636 func (p *ApplyDbUpdateI64Args) GetData() []byte { 35637 return p.Data 35638 } 35639 func (p *ApplyDbUpdateI64Args) IsSetPayer() bool { 35640 return p.Payer != nil 35641 } 35642 35643 func (p *ApplyDbUpdateI64Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 35644 if _, err := iprot.ReadStructBegin(ctx); err != nil { 35645 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 35646 } 35647 35648 35649 for { 35650 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 35651 if err != nil { 35652 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 35653 } 35654 if fieldTypeId == thrift.STOP { break; } 35655 switch fieldId { 35656 case 1: 35657 if fieldTypeId == thrift.I32 { 35658 if err := p.ReadField1(ctx, iprot); err != nil { 35659 return err 35660 } 35661 } else { 35662 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35663 return err 35664 } 35665 } 35666 case 2: 35667 if fieldTypeId == thrift.STRUCT { 35668 if err := p.ReadField2(ctx, iprot); err != nil { 35669 return err 35670 } 35671 } else { 35672 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35673 return err 35674 } 35675 } 35676 case 3: 35677 if fieldTypeId == thrift.STRING { 35678 if err := p.ReadField3(ctx, iprot); err != nil { 35679 return err 35680 } 35681 } else { 35682 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35683 return err 35684 } 35685 } 35686 default: 35687 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35688 return err 35689 } 35690 } 35691 if err := iprot.ReadFieldEnd(ctx); err != nil { 35692 return err 35693 } 35694 } 35695 if err := iprot.ReadStructEnd(ctx); err != nil { 35696 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 35697 } 35698 return nil 35699 } 35700 35701 func (p *ApplyDbUpdateI64Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 35702 if v, err := iprot.ReadI32(ctx); err != nil { 35703 return thrift.PrependError("error reading field 1: ", err) 35704 } else { 35705 p.Iterator = v 35706 } 35707 return nil 35708 } 35709 35710 func (p *ApplyDbUpdateI64Args) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 35711 p.Payer = &Uint64{} 35712 if err := p.Payer.Read(ctx, iprot); err != nil { 35713 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 35714 } 35715 return nil 35716 } 35717 35718 func (p *ApplyDbUpdateI64Args) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 35719 if v, err := iprot.ReadBinary(ctx); err != nil { 35720 return thrift.PrependError("error reading field 3: ", err) 35721 } else { 35722 p.Data = v 35723 } 35724 return nil 35725 } 35726 35727 func (p *ApplyDbUpdateI64Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 35728 if err := oprot.WriteStructBegin(ctx, "db_update_i64_args"); err != nil { 35729 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 35730 if p != nil { 35731 if err := p.writeField1(ctx, oprot); err != nil { return err } 35732 if err := p.writeField2(ctx, oprot); err != nil { return err } 35733 if err := p.writeField3(ctx, oprot); err != nil { return err } 35734 } 35735 if err := oprot.WriteFieldStop(ctx); err != nil { 35736 return thrift.PrependError("write field stop error: ", err) } 35737 if err := oprot.WriteStructEnd(ctx); err != nil { 35738 return thrift.PrependError("write struct stop error: ", err) } 35739 return nil 35740 } 35741 35742 func (p *ApplyDbUpdateI64Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 35743 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 35744 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 35745 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 35746 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 35747 if err := oprot.WriteFieldEnd(ctx); err != nil { 35748 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 35749 return err 35750 } 35751 35752 func (p *ApplyDbUpdateI64Args) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 35753 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 2); err != nil { 35754 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:payer: ", p), err) } 35755 if err := p.Payer.Write(ctx, oprot); err != nil { 35756 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 35757 } 35758 if err := oprot.WriteFieldEnd(ctx); err != nil { 35759 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:payer: ", p), err) } 35760 return err 35761 } 35762 35763 func (p *ApplyDbUpdateI64Args) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 35764 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 3); err != nil { 35765 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:data: ", p), err) } 35766 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 35767 return thrift.PrependError(fmt.Sprintf("%T.data (3) field write error: ", p), err) } 35768 if err := oprot.WriteFieldEnd(ctx); err != nil { 35769 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:data: ", p), err) } 35770 return err 35771 } 35772 35773 func (p *ApplyDbUpdateI64Args) String() string { 35774 if p == nil { 35775 return "<nil>" 35776 } 35777 return fmt.Sprintf("ApplyDbUpdateI64Args(%+v)", *p) 35778 } 35779 35780 type ApplyDbUpdateI64Result struct { 35781 } 35782 35783 func NewApplyDbUpdateI64Result() *ApplyDbUpdateI64Result { 35784 return &ApplyDbUpdateI64Result{} 35785 } 35786 35787 func (p *ApplyDbUpdateI64Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 35788 if _, err := iprot.ReadStructBegin(ctx); err != nil { 35789 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 35790 } 35791 35792 35793 for { 35794 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 35795 if err != nil { 35796 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 35797 } 35798 if fieldTypeId == thrift.STOP { break; } 35799 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35800 return err 35801 } 35802 if err := iprot.ReadFieldEnd(ctx); err != nil { 35803 return err 35804 } 35805 } 35806 if err := iprot.ReadStructEnd(ctx); err != nil { 35807 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 35808 } 35809 return nil 35810 } 35811 35812 func (p *ApplyDbUpdateI64Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 35813 if err := oprot.WriteStructBegin(ctx, "db_update_i64_result"); err != nil { 35814 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 35815 if p != nil { 35816 } 35817 if err := oprot.WriteFieldStop(ctx); err != nil { 35818 return thrift.PrependError("write field stop error: ", err) } 35819 if err := oprot.WriteStructEnd(ctx); err != nil { 35820 return thrift.PrependError("write struct stop error: ", err) } 35821 return nil 35822 } 35823 35824 func (p *ApplyDbUpdateI64Result) String() string { 35825 if p == nil { 35826 return "<nil>" 35827 } 35828 return fmt.Sprintf("ApplyDbUpdateI64Result(%+v)", *p) 35829 } 35830 35831 // Attributes: 35832 // - Iterator 35833 type ApplyDbRemoveI64Args struct { 35834 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 35835 } 35836 35837 func NewApplyDbRemoveI64Args() *ApplyDbRemoveI64Args { 35838 return &ApplyDbRemoveI64Args{} 35839 } 35840 35841 35842 func (p *ApplyDbRemoveI64Args) GetIterator() int32 { 35843 return p.Iterator 35844 } 35845 func (p *ApplyDbRemoveI64Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 35846 if _, err := iprot.ReadStructBegin(ctx); err != nil { 35847 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 35848 } 35849 35850 35851 for { 35852 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 35853 if err != nil { 35854 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 35855 } 35856 if fieldTypeId == thrift.STOP { break; } 35857 switch fieldId { 35858 case 1: 35859 if fieldTypeId == thrift.I32 { 35860 if err := p.ReadField1(ctx, iprot); err != nil { 35861 return err 35862 } 35863 } else { 35864 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35865 return err 35866 } 35867 } 35868 default: 35869 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35870 return err 35871 } 35872 } 35873 if err := iprot.ReadFieldEnd(ctx); err != nil { 35874 return err 35875 } 35876 } 35877 if err := iprot.ReadStructEnd(ctx); err != nil { 35878 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 35879 } 35880 return nil 35881 } 35882 35883 func (p *ApplyDbRemoveI64Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 35884 if v, err := iprot.ReadI32(ctx); err != nil { 35885 return thrift.PrependError("error reading field 1: ", err) 35886 } else { 35887 p.Iterator = v 35888 } 35889 return nil 35890 } 35891 35892 func (p *ApplyDbRemoveI64Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 35893 if err := oprot.WriteStructBegin(ctx, "db_remove_i64_args"); err != nil { 35894 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 35895 if p != nil { 35896 if err := p.writeField1(ctx, oprot); err != nil { return err } 35897 } 35898 if err := oprot.WriteFieldStop(ctx); err != nil { 35899 return thrift.PrependError("write field stop error: ", err) } 35900 if err := oprot.WriteStructEnd(ctx); err != nil { 35901 return thrift.PrependError("write struct stop error: ", err) } 35902 return nil 35903 } 35904 35905 func (p *ApplyDbRemoveI64Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 35906 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 35907 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 35908 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 35909 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 35910 if err := oprot.WriteFieldEnd(ctx); err != nil { 35911 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 35912 return err 35913 } 35914 35915 func (p *ApplyDbRemoveI64Args) String() string { 35916 if p == nil { 35917 return "<nil>" 35918 } 35919 return fmt.Sprintf("ApplyDbRemoveI64Args(%+v)", *p) 35920 } 35921 35922 type ApplyDbRemoveI64Result struct { 35923 } 35924 35925 func NewApplyDbRemoveI64Result() *ApplyDbRemoveI64Result { 35926 return &ApplyDbRemoveI64Result{} 35927 } 35928 35929 func (p *ApplyDbRemoveI64Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 35930 if _, err := iprot.ReadStructBegin(ctx); err != nil { 35931 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 35932 } 35933 35934 35935 for { 35936 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 35937 if err != nil { 35938 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 35939 } 35940 if fieldTypeId == thrift.STOP { break; } 35941 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 35942 return err 35943 } 35944 if err := iprot.ReadFieldEnd(ctx); err != nil { 35945 return err 35946 } 35947 } 35948 if err := iprot.ReadStructEnd(ctx); err != nil { 35949 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 35950 } 35951 return nil 35952 } 35953 35954 func (p *ApplyDbRemoveI64Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 35955 if err := oprot.WriteStructBegin(ctx, "db_remove_i64_result"); err != nil { 35956 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 35957 if p != nil { 35958 } 35959 if err := oprot.WriteFieldStop(ctx); err != nil { 35960 return thrift.PrependError("write field stop error: ", err) } 35961 if err := oprot.WriteStructEnd(ctx); err != nil { 35962 return thrift.PrependError("write struct stop error: ", err) } 35963 return nil 35964 } 35965 35966 func (p *ApplyDbRemoveI64Result) String() string { 35967 if p == nil { 35968 return "<nil>" 35969 } 35970 return fmt.Sprintf("ApplyDbRemoveI64Result(%+v)", *p) 35971 } 35972 35973 // Attributes: 35974 // - Iterator 35975 type ApplyDbGetI64Args struct { 35976 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 35977 } 35978 35979 func NewApplyDbGetI64Args() *ApplyDbGetI64Args { 35980 return &ApplyDbGetI64Args{} 35981 } 35982 35983 35984 func (p *ApplyDbGetI64Args) GetIterator() int32 { 35985 return p.Iterator 35986 } 35987 func (p *ApplyDbGetI64Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 35988 if _, err := iprot.ReadStructBegin(ctx); err != nil { 35989 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 35990 } 35991 35992 35993 for { 35994 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 35995 if err != nil { 35996 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 35997 } 35998 if fieldTypeId == thrift.STOP { break; } 35999 switch fieldId { 36000 case 1: 36001 if fieldTypeId == thrift.I32 { 36002 if err := p.ReadField1(ctx, iprot); err != nil { 36003 return err 36004 } 36005 } else { 36006 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36007 return err 36008 } 36009 } 36010 default: 36011 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36012 return err 36013 } 36014 } 36015 if err := iprot.ReadFieldEnd(ctx); err != nil { 36016 return err 36017 } 36018 } 36019 if err := iprot.ReadStructEnd(ctx); err != nil { 36020 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 36021 } 36022 return nil 36023 } 36024 36025 func (p *ApplyDbGetI64Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 36026 if v, err := iprot.ReadI32(ctx); err != nil { 36027 return thrift.PrependError("error reading field 1: ", err) 36028 } else { 36029 p.Iterator = v 36030 } 36031 return nil 36032 } 36033 36034 func (p *ApplyDbGetI64Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 36035 if err := oprot.WriteStructBegin(ctx, "db_get_i64_args"); err != nil { 36036 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 36037 if p != nil { 36038 if err := p.writeField1(ctx, oprot); err != nil { return err } 36039 } 36040 if err := oprot.WriteFieldStop(ctx); err != nil { 36041 return thrift.PrependError("write field stop error: ", err) } 36042 if err := oprot.WriteStructEnd(ctx); err != nil { 36043 return thrift.PrependError("write struct stop error: ", err) } 36044 return nil 36045 } 36046 36047 func (p *ApplyDbGetI64Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 36048 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 36049 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 36050 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 36051 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 36052 if err := oprot.WriteFieldEnd(ctx); err != nil { 36053 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 36054 return err 36055 } 36056 36057 func (p *ApplyDbGetI64Args) String() string { 36058 if p == nil { 36059 return "<nil>" 36060 } 36061 return fmt.Sprintf("ApplyDbGetI64Args(%+v)", *p) 36062 } 36063 36064 // Attributes: 36065 // - Success 36066 type ApplyDbGetI64Result struct { 36067 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 36068 } 36069 36070 func NewApplyDbGetI64Result() *ApplyDbGetI64Result { 36071 return &ApplyDbGetI64Result{} 36072 } 36073 36074 var ApplyDbGetI64Result_Success_DEFAULT []byte 36075 36076 func (p *ApplyDbGetI64Result) GetSuccess() []byte { 36077 return p.Success 36078 } 36079 func (p *ApplyDbGetI64Result) IsSetSuccess() bool { 36080 return p.Success != nil 36081 } 36082 36083 func (p *ApplyDbGetI64Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 36084 if _, err := iprot.ReadStructBegin(ctx); err != nil { 36085 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 36086 } 36087 36088 36089 for { 36090 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 36091 if err != nil { 36092 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 36093 } 36094 if fieldTypeId == thrift.STOP { break; } 36095 switch fieldId { 36096 case 0: 36097 if fieldTypeId == thrift.STRING { 36098 if err := p.ReadField0(ctx, iprot); err != nil { 36099 return err 36100 } 36101 } else { 36102 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36103 return err 36104 } 36105 } 36106 default: 36107 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36108 return err 36109 } 36110 } 36111 if err := iprot.ReadFieldEnd(ctx); err != nil { 36112 return err 36113 } 36114 } 36115 if err := iprot.ReadStructEnd(ctx); err != nil { 36116 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 36117 } 36118 return nil 36119 } 36120 36121 func (p *ApplyDbGetI64Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 36122 if v, err := iprot.ReadBinary(ctx); err != nil { 36123 return thrift.PrependError("error reading field 0: ", err) 36124 } else { 36125 p.Success = v 36126 } 36127 return nil 36128 } 36129 36130 func (p *ApplyDbGetI64Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 36131 if err := oprot.WriteStructBegin(ctx, "db_get_i64_result"); err != nil { 36132 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 36133 if p != nil { 36134 if err := p.writeField0(ctx, oprot); err != nil { return err } 36135 } 36136 if err := oprot.WriteFieldStop(ctx); err != nil { 36137 return thrift.PrependError("write field stop error: ", err) } 36138 if err := oprot.WriteStructEnd(ctx); err != nil { 36139 return thrift.PrependError("write struct stop error: ", err) } 36140 return nil 36141 } 36142 36143 func (p *ApplyDbGetI64Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 36144 if p.IsSetSuccess() { 36145 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 36146 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 36147 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 36148 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 36149 if err := oprot.WriteFieldEnd(ctx); err != nil { 36150 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 36151 } 36152 return err 36153 } 36154 36155 func (p *ApplyDbGetI64Result) String() string { 36156 if p == nil { 36157 return "<nil>" 36158 } 36159 return fmt.Sprintf("ApplyDbGetI64Result(%+v)", *p) 36160 } 36161 36162 // Attributes: 36163 // - Iterator 36164 type ApplyDbNextI64Args struct { 36165 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 36166 } 36167 36168 func NewApplyDbNextI64Args() *ApplyDbNextI64Args { 36169 return &ApplyDbNextI64Args{} 36170 } 36171 36172 36173 func (p *ApplyDbNextI64Args) GetIterator() int32 { 36174 return p.Iterator 36175 } 36176 func (p *ApplyDbNextI64Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 36177 if _, err := iprot.ReadStructBegin(ctx); err != nil { 36178 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 36179 } 36180 36181 36182 for { 36183 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 36184 if err != nil { 36185 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 36186 } 36187 if fieldTypeId == thrift.STOP { break; } 36188 switch fieldId { 36189 case 1: 36190 if fieldTypeId == thrift.I32 { 36191 if err := p.ReadField1(ctx, iprot); err != nil { 36192 return err 36193 } 36194 } else { 36195 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36196 return err 36197 } 36198 } 36199 default: 36200 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36201 return err 36202 } 36203 } 36204 if err := iprot.ReadFieldEnd(ctx); err != nil { 36205 return err 36206 } 36207 } 36208 if err := iprot.ReadStructEnd(ctx); err != nil { 36209 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 36210 } 36211 return nil 36212 } 36213 36214 func (p *ApplyDbNextI64Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 36215 if v, err := iprot.ReadI32(ctx); err != nil { 36216 return thrift.PrependError("error reading field 1: ", err) 36217 } else { 36218 p.Iterator = v 36219 } 36220 return nil 36221 } 36222 36223 func (p *ApplyDbNextI64Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 36224 if err := oprot.WriteStructBegin(ctx, "db_next_i64_args"); err != nil { 36225 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 36226 if p != nil { 36227 if err := p.writeField1(ctx, oprot); err != nil { return err } 36228 } 36229 if err := oprot.WriteFieldStop(ctx); err != nil { 36230 return thrift.PrependError("write field stop error: ", err) } 36231 if err := oprot.WriteStructEnd(ctx); err != nil { 36232 return thrift.PrependError("write struct stop error: ", err) } 36233 return nil 36234 } 36235 36236 func (p *ApplyDbNextI64Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 36237 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 36238 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 36239 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 36240 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 36241 if err := oprot.WriteFieldEnd(ctx); err != nil { 36242 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 36243 return err 36244 } 36245 36246 func (p *ApplyDbNextI64Args) String() string { 36247 if p == nil { 36248 return "<nil>" 36249 } 36250 return fmt.Sprintf("ApplyDbNextI64Args(%+v)", *p) 36251 } 36252 36253 // Attributes: 36254 // - Success 36255 type ApplyDbNextI64Result struct { 36256 Success *NextPreviousReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 36257 } 36258 36259 func NewApplyDbNextI64Result() *ApplyDbNextI64Result { 36260 return &ApplyDbNextI64Result{} 36261 } 36262 36263 var ApplyDbNextI64Result_Success_DEFAULT *NextPreviousReturn 36264 func (p *ApplyDbNextI64Result) GetSuccess() *NextPreviousReturn { 36265 if !p.IsSetSuccess() { 36266 return ApplyDbNextI64Result_Success_DEFAULT 36267 } 36268 return p.Success 36269 } 36270 func (p *ApplyDbNextI64Result) IsSetSuccess() bool { 36271 return p.Success != nil 36272 } 36273 36274 func (p *ApplyDbNextI64Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 36275 if _, err := iprot.ReadStructBegin(ctx); err != nil { 36276 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 36277 } 36278 36279 36280 for { 36281 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 36282 if err != nil { 36283 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 36284 } 36285 if fieldTypeId == thrift.STOP { break; } 36286 switch fieldId { 36287 case 0: 36288 if fieldTypeId == thrift.STRUCT { 36289 if err := p.ReadField0(ctx, iprot); err != nil { 36290 return err 36291 } 36292 } else { 36293 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36294 return err 36295 } 36296 } 36297 default: 36298 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36299 return err 36300 } 36301 } 36302 if err := iprot.ReadFieldEnd(ctx); err != nil { 36303 return err 36304 } 36305 } 36306 if err := iprot.ReadStructEnd(ctx); err != nil { 36307 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 36308 } 36309 return nil 36310 } 36311 36312 func (p *ApplyDbNextI64Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 36313 p.Success = &NextPreviousReturn{} 36314 if err := p.Success.Read(ctx, iprot); err != nil { 36315 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 36316 } 36317 return nil 36318 } 36319 36320 func (p *ApplyDbNextI64Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 36321 if err := oprot.WriteStructBegin(ctx, "db_next_i64_result"); err != nil { 36322 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 36323 if p != nil { 36324 if err := p.writeField0(ctx, oprot); err != nil { return err } 36325 } 36326 if err := oprot.WriteFieldStop(ctx); err != nil { 36327 return thrift.PrependError("write field stop error: ", err) } 36328 if err := oprot.WriteStructEnd(ctx); err != nil { 36329 return thrift.PrependError("write struct stop error: ", err) } 36330 return nil 36331 } 36332 36333 func (p *ApplyDbNextI64Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 36334 if p.IsSetSuccess() { 36335 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 36336 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 36337 if err := p.Success.Write(ctx, oprot); err != nil { 36338 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 36339 } 36340 if err := oprot.WriteFieldEnd(ctx); err != nil { 36341 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 36342 } 36343 return err 36344 } 36345 36346 func (p *ApplyDbNextI64Result) String() string { 36347 if p == nil { 36348 return "<nil>" 36349 } 36350 return fmt.Sprintf("ApplyDbNextI64Result(%+v)", *p) 36351 } 36352 36353 // Attributes: 36354 // - Iterator 36355 type ApplyDbPreviousI64Args struct { 36356 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 36357 } 36358 36359 func NewApplyDbPreviousI64Args() *ApplyDbPreviousI64Args { 36360 return &ApplyDbPreviousI64Args{} 36361 } 36362 36363 36364 func (p *ApplyDbPreviousI64Args) GetIterator() int32 { 36365 return p.Iterator 36366 } 36367 func (p *ApplyDbPreviousI64Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 36368 if _, err := iprot.ReadStructBegin(ctx); err != nil { 36369 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 36370 } 36371 36372 36373 for { 36374 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 36375 if err != nil { 36376 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 36377 } 36378 if fieldTypeId == thrift.STOP { break; } 36379 switch fieldId { 36380 case 1: 36381 if fieldTypeId == thrift.I32 { 36382 if err := p.ReadField1(ctx, iprot); err != nil { 36383 return err 36384 } 36385 } else { 36386 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36387 return err 36388 } 36389 } 36390 default: 36391 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36392 return err 36393 } 36394 } 36395 if err := iprot.ReadFieldEnd(ctx); err != nil { 36396 return err 36397 } 36398 } 36399 if err := iprot.ReadStructEnd(ctx); err != nil { 36400 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 36401 } 36402 return nil 36403 } 36404 36405 func (p *ApplyDbPreviousI64Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 36406 if v, err := iprot.ReadI32(ctx); err != nil { 36407 return thrift.PrependError("error reading field 1: ", err) 36408 } else { 36409 p.Iterator = v 36410 } 36411 return nil 36412 } 36413 36414 func (p *ApplyDbPreviousI64Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 36415 if err := oprot.WriteStructBegin(ctx, "db_previous_i64_args"); err != nil { 36416 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 36417 if p != nil { 36418 if err := p.writeField1(ctx, oprot); err != nil { return err } 36419 } 36420 if err := oprot.WriteFieldStop(ctx); err != nil { 36421 return thrift.PrependError("write field stop error: ", err) } 36422 if err := oprot.WriteStructEnd(ctx); err != nil { 36423 return thrift.PrependError("write struct stop error: ", err) } 36424 return nil 36425 } 36426 36427 func (p *ApplyDbPreviousI64Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 36428 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 36429 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 36430 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 36431 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 36432 if err := oprot.WriteFieldEnd(ctx); err != nil { 36433 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 36434 return err 36435 } 36436 36437 func (p *ApplyDbPreviousI64Args) String() string { 36438 if p == nil { 36439 return "<nil>" 36440 } 36441 return fmt.Sprintf("ApplyDbPreviousI64Args(%+v)", *p) 36442 } 36443 36444 // Attributes: 36445 // - Success 36446 type ApplyDbPreviousI64Result struct { 36447 Success *NextPreviousReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 36448 } 36449 36450 func NewApplyDbPreviousI64Result() *ApplyDbPreviousI64Result { 36451 return &ApplyDbPreviousI64Result{} 36452 } 36453 36454 var ApplyDbPreviousI64Result_Success_DEFAULT *NextPreviousReturn 36455 func (p *ApplyDbPreviousI64Result) GetSuccess() *NextPreviousReturn { 36456 if !p.IsSetSuccess() { 36457 return ApplyDbPreviousI64Result_Success_DEFAULT 36458 } 36459 return p.Success 36460 } 36461 func (p *ApplyDbPreviousI64Result) IsSetSuccess() bool { 36462 return p.Success != nil 36463 } 36464 36465 func (p *ApplyDbPreviousI64Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 36466 if _, err := iprot.ReadStructBegin(ctx); err != nil { 36467 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 36468 } 36469 36470 36471 for { 36472 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 36473 if err != nil { 36474 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 36475 } 36476 if fieldTypeId == thrift.STOP { break; } 36477 switch fieldId { 36478 case 0: 36479 if fieldTypeId == thrift.STRUCT { 36480 if err := p.ReadField0(ctx, iprot); err != nil { 36481 return err 36482 } 36483 } else { 36484 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36485 return err 36486 } 36487 } 36488 default: 36489 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36490 return err 36491 } 36492 } 36493 if err := iprot.ReadFieldEnd(ctx); err != nil { 36494 return err 36495 } 36496 } 36497 if err := iprot.ReadStructEnd(ctx); err != nil { 36498 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 36499 } 36500 return nil 36501 } 36502 36503 func (p *ApplyDbPreviousI64Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 36504 p.Success = &NextPreviousReturn{} 36505 if err := p.Success.Read(ctx, iprot); err != nil { 36506 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 36507 } 36508 return nil 36509 } 36510 36511 func (p *ApplyDbPreviousI64Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 36512 if err := oprot.WriteStructBegin(ctx, "db_previous_i64_result"); err != nil { 36513 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 36514 if p != nil { 36515 if err := p.writeField0(ctx, oprot); err != nil { return err } 36516 } 36517 if err := oprot.WriteFieldStop(ctx); err != nil { 36518 return thrift.PrependError("write field stop error: ", err) } 36519 if err := oprot.WriteStructEnd(ctx); err != nil { 36520 return thrift.PrependError("write struct stop error: ", err) } 36521 return nil 36522 } 36523 36524 func (p *ApplyDbPreviousI64Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 36525 if p.IsSetSuccess() { 36526 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 36527 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 36528 if err := p.Success.Write(ctx, oprot); err != nil { 36529 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 36530 } 36531 if err := oprot.WriteFieldEnd(ctx); err != nil { 36532 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 36533 } 36534 return err 36535 } 36536 36537 func (p *ApplyDbPreviousI64Result) String() string { 36538 if p == nil { 36539 return "<nil>" 36540 } 36541 return fmt.Sprintf("ApplyDbPreviousI64Result(%+v)", *p) 36542 } 36543 36544 // Attributes: 36545 // - Code 36546 // - Scope 36547 // - Table 36548 // - ID 36549 type ApplyDbFindI64Args struct { 36550 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 36551 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 36552 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 36553 ID *Uint64 `thrift:"id,4" db:"id" json:"id"` 36554 } 36555 36556 func NewApplyDbFindI64Args() *ApplyDbFindI64Args { 36557 return &ApplyDbFindI64Args{} 36558 } 36559 36560 var ApplyDbFindI64Args_Code_DEFAULT *Uint64 36561 func (p *ApplyDbFindI64Args) GetCode() *Uint64 { 36562 if !p.IsSetCode() { 36563 return ApplyDbFindI64Args_Code_DEFAULT 36564 } 36565 return p.Code 36566 } 36567 var ApplyDbFindI64Args_Scope_DEFAULT *Uint64 36568 func (p *ApplyDbFindI64Args) GetScope() *Uint64 { 36569 if !p.IsSetScope() { 36570 return ApplyDbFindI64Args_Scope_DEFAULT 36571 } 36572 return p.Scope 36573 } 36574 var ApplyDbFindI64Args_Table_DEFAULT *Uint64 36575 func (p *ApplyDbFindI64Args) GetTable() *Uint64 { 36576 if !p.IsSetTable() { 36577 return ApplyDbFindI64Args_Table_DEFAULT 36578 } 36579 return p.Table 36580 } 36581 var ApplyDbFindI64Args_ID_DEFAULT *Uint64 36582 func (p *ApplyDbFindI64Args) GetID() *Uint64 { 36583 if !p.IsSetID() { 36584 return ApplyDbFindI64Args_ID_DEFAULT 36585 } 36586 return p.ID 36587 } 36588 func (p *ApplyDbFindI64Args) IsSetCode() bool { 36589 return p.Code != nil 36590 } 36591 36592 func (p *ApplyDbFindI64Args) IsSetScope() bool { 36593 return p.Scope != nil 36594 } 36595 36596 func (p *ApplyDbFindI64Args) IsSetTable() bool { 36597 return p.Table != nil 36598 } 36599 36600 func (p *ApplyDbFindI64Args) IsSetID() bool { 36601 return p.ID != nil 36602 } 36603 36604 func (p *ApplyDbFindI64Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 36605 if _, err := iprot.ReadStructBegin(ctx); err != nil { 36606 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 36607 } 36608 36609 36610 for { 36611 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 36612 if err != nil { 36613 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 36614 } 36615 if fieldTypeId == thrift.STOP { break; } 36616 switch fieldId { 36617 case 1: 36618 if fieldTypeId == thrift.STRUCT { 36619 if err := p.ReadField1(ctx, iprot); err != nil { 36620 return err 36621 } 36622 } else { 36623 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36624 return err 36625 } 36626 } 36627 case 2: 36628 if fieldTypeId == thrift.STRUCT { 36629 if err := p.ReadField2(ctx, iprot); err != nil { 36630 return err 36631 } 36632 } else { 36633 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36634 return err 36635 } 36636 } 36637 case 3: 36638 if fieldTypeId == thrift.STRUCT { 36639 if err := p.ReadField3(ctx, iprot); err != nil { 36640 return err 36641 } 36642 } else { 36643 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36644 return err 36645 } 36646 } 36647 case 4: 36648 if fieldTypeId == thrift.STRUCT { 36649 if err := p.ReadField4(ctx, iprot); err != nil { 36650 return err 36651 } 36652 } else { 36653 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36654 return err 36655 } 36656 } 36657 default: 36658 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36659 return err 36660 } 36661 } 36662 if err := iprot.ReadFieldEnd(ctx); err != nil { 36663 return err 36664 } 36665 } 36666 if err := iprot.ReadStructEnd(ctx); err != nil { 36667 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 36668 } 36669 return nil 36670 } 36671 36672 func (p *ApplyDbFindI64Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 36673 p.Code = &Uint64{} 36674 if err := p.Code.Read(ctx, iprot); err != nil { 36675 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 36676 } 36677 return nil 36678 } 36679 36680 func (p *ApplyDbFindI64Args) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 36681 p.Scope = &Uint64{} 36682 if err := p.Scope.Read(ctx, iprot); err != nil { 36683 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 36684 } 36685 return nil 36686 } 36687 36688 func (p *ApplyDbFindI64Args) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 36689 p.Table = &Uint64{} 36690 if err := p.Table.Read(ctx, iprot); err != nil { 36691 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 36692 } 36693 return nil 36694 } 36695 36696 func (p *ApplyDbFindI64Args) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 36697 p.ID = &Uint64{} 36698 if err := p.ID.Read(ctx, iprot); err != nil { 36699 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ID), err) 36700 } 36701 return nil 36702 } 36703 36704 func (p *ApplyDbFindI64Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 36705 if err := oprot.WriteStructBegin(ctx, "db_find_i64_args"); err != nil { 36706 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 36707 if p != nil { 36708 if err := p.writeField1(ctx, oprot); err != nil { return err } 36709 if err := p.writeField2(ctx, oprot); err != nil { return err } 36710 if err := p.writeField3(ctx, oprot); err != nil { return err } 36711 if err := p.writeField4(ctx, oprot); err != nil { return err } 36712 } 36713 if err := oprot.WriteFieldStop(ctx); err != nil { 36714 return thrift.PrependError("write field stop error: ", err) } 36715 if err := oprot.WriteStructEnd(ctx); err != nil { 36716 return thrift.PrependError("write struct stop error: ", err) } 36717 return nil 36718 } 36719 36720 func (p *ApplyDbFindI64Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 36721 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 36722 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 36723 if err := p.Code.Write(ctx, oprot); err != nil { 36724 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 36725 } 36726 if err := oprot.WriteFieldEnd(ctx); err != nil { 36727 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 36728 return err 36729 } 36730 36731 func (p *ApplyDbFindI64Args) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 36732 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 36733 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 36734 if err := p.Scope.Write(ctx, oprot); err != nil { 36735 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 36736 } 36737 if err := oprot.WriteFieldEnd(ctx); err != nil { 36738 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 36739 return err 36740 } 36741 36742 func (p *ApplyDbFindI64Args) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 36743 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 36744 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 36745 if err := p.Table.Write(ctx, oprot); err != nil { 36746 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 36747 } 36748 if err := oprot.WriteFieldEnd(ctx); err != nil { 36749 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 36750 return err 36751 } 36752 36753 func (p *ApplyDbFindI64Args) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 36754 if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRUCT, 4); err != nil { 36755 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err) } 36756 if err := p.ID.Write(ctx, oprot); err != nil { 36757 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ID), err) 36758 } 36759 if err := oprot.WriteFieldEnd(ctx); err != nil { 36760 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err) } 36761 return err 36762 } 36763 36764 func (p *ApplyDbFindI64Args) String() string { 36765 if p == nil { 36766 return "<nil>" 36767 } 36768 return fmt.Sprintf("ApplyDbFindI64Args(%+v)", *p) 36769 } 36770 36771 // Attributes: 36772 // - Success 36773 type ApplyDbFindI64Result struct { 36774 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 36775 } 36776 36777 func NewApplyDbFindI64Result() *ApplyDbFindI64Result { 36778 return &ApplyDbFindI64Result{} 36779 } 36780 36781 var ApplyDbFindI64Result_Success_DEFAULT int32 36782 func (p *ApplyDbFindI64Result) GetSuccess() int32 { 36783 if !p.IsSetSuccess() { 36784 return ApplyDbFindI64Result_Success_DEFAULT 36785 } 36786 return *p.Success 36787 } 36788 func (p *ApplyDbFindI64Result) IsSetSuccess() bool { 36789 return p.Success != nil 36790 } 36791 36792 func (p *ApplyDbFindI64Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 36793 if _, err := iprot.ReadStructBegin(ctx); err != nil { 36794 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 36795 } 36796 36797 36798 for { 36799 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 36800 if err != nil { 36801 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 36802 } 36803 if fieldTypeId == thrift.STOP { break; } 36804 switch fieldId { 36805 case 0: 36806 if fieldTypeId == thrift.I32 { 36807 if err := p.ReadField0(ctx, iprot); err != nil { 36808 return err 36809 } 36810 } else { 36811 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36812 return err 36813 } 36814 } 36815 default: 36816 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36817 return err 36818 } 36819 } 36820 if err := iprot.ReadFieldEnd(ctx); err != nil { 36821 return err 36822 } 36823 } 36824 if err := iprot.ReadStructEnd(ctx); err != nil { 36825 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 36826 } 36827 return nil 36828 } 36829 36830 func (p *ApplyDbFindI64Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 36831 if v, err := iprot.ReadI32(ctx); err != nil { 36832 return thrift.PrependError("error reading field 0: ", err) 36833 } else { 36834 p.Success = &v 36835 } 36836 return nil 36837 } 36838 36839 func (p *ApplyDbFindI64Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 36840 if err := oprot.WriteStructBegin(ctx, "db_find_i64_result"); err != nil { 36841 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 36842 if p != nil { 36843 if err := p.writeField0(ctx, oprot); err != nil { return err } 36844 } 36845 if err := oprot.WriteFieldStop(ctx); err != nil { 36846 return thrift.PrependError("write field stop error: ", err) } 36847 if err := oprot.WriteStructEnd(ctx); err != nil { 36848 return thrift.PrependError("write struct stop error: ", err) } 36849 return nil 36850 } 36851 36852 func (p *ApplyDbFindI64Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 36853 if p.IsSetSuccess() { 36854 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 36855 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 36856 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 36857 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 36858 if err := oprot.WriteFieldEnd(ctx); err != nil { 36859 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 36860 } 36861 return err 36862 } 36863 36864 func (p *ApplyDbFindI64Result) String() string { 36865 if p == nil { 36866 return "<nil>" 36867 } 36868 return fmt.Sprintf("ApplyDbFindI64Result(%+v)", *p) 36869 } 36870 36871 // Attributes: 36872 // - Code 36873 // - Scope 36874 // - Table 36875 // - ID 36876 type ApplyDbLowerboundI64Args struct { 36877 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 36878 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 36879 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 36880 ID *Uint64 `thrift:"id,4" db:"id" json:"id"` 36881 } 36882 36883 func NewApplyDbLowerboundI64Args() *ApplyDbLowerboundI64Args { 36884 return &ApplyDbLowerboundI64Args{} 36885 } 36886 36887 var ApplyDbLowerboundI64Args_Code_DEFAULT *Uint64 36888 func (p *ApplyDbLowerboundI64Args) GetCode() *Uint64 { 36889 if !p.IsSetCode() { 36890 return ApplyDbLowerboundI64Args_Code_DEFAULT 36891 } 36892 return p.Code 36893 } 36894 var ApplyDbLowerboundI64Args_Scope_DEFAULT *Uint64 36895 func (p *ApplyDbLowerboundI64Args) GetScope() *Uint64 { 36896 if !p.IsSetScope() { 36897 return ApplyDbLowerboundI64Args_Scope_DEFAULT 36898 } 36899 return p.Scope 36900 } 36901 var ApplyDbLowerboundI64Args_Table_DEFAULT *Uint64 36902 func (p *ApplyDbLowerboundI64Args) GetTable() *Uint64 { 36903 if !p.IsSetTable() { 36904 return ApplyDbLowerboundI64Args_Table_DEFAULT 36905 } 36906 return p.Table 36907 } 36908 var ApplyDbLowerboundI64Args_ID_DEFAULT *Uint64 36909 func (p *ApplyDbLowerboundI64Args) GetID() *Uint64 { 36910 if !p.IsSetID() { 36911 return ApplyDbLowerboundI64Args_ID_DEFAULT 36912 } 36913 return p.ID 36914 } 36915 func (p *ApplyDbLowerboundI64Args) IsSetCode() bool { 36916 return p.Code != nil 36917 } 36918 36919 func (p *ApplyDbLowerboundI64Args) IsSetScope() bool { 36920 return p.Scope != nil 36921 } 36922 36923 func (p *ApplyDbLowerboundI64Args) IsSetTable() bool { 36924 return p.Table != nil 36925 } 36926 36927 func (p *ApplyDbLowerboundI64Args) IsSetID() bool { 36928 return p.ID != nil 36929 } 36930 36931 func (p *ApplyDbLowerboundI64Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 36932 if _, err := iprot.ReadStructBegin(ctx); err != nil { 36933 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 36934 } 36935 36936 36937 for { 36938 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 36939 if err != nil { 36940 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 36941 } 36942 if fieldTypeId == thrift.STOP { break; } 36943 switch fieldId { 36944 case 1: 36945 if fieldTypeId == thrift.STRUCT { 36946 if err := p.ReadField1(ctx, iprot); err != nil { 36947 return err 36948 } 36949 } else { 36950 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36951 return err 36952 } 36953 } 36954 case 2: 36955 if fieldTypeId == thrift.STRUCT { 36956 if err := p.ReadField2(ctx, iprot); err != nil { 36957 return err 36958 } 36959 } else { 36960 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36961 return err 36962 } 36963 } 36964 case 3: 36965 if fieldTypeId == thrift.STRUCT { 36966 if err := p.ReadField3(ctx, iprot); err != nil { 36967 return err 36968 } 36969 } else { 36970 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36971 return err 36972 } 36973 } 36974 case 4: 36975 if fieldTypeId == thrift.STRUCT { 36976 if err := p.ReadField4(ctx, iprot); err != nil { 36977 return err 36978 } 36979 } else { 36980 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36981 return err 36982 } 36983 } 36984 default: 36985 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 36986 return err 36987 } 36988 } 36989 if err := iprot.ReadFieldEnd(ctx); err != nil { 36990 return err 36991 } 36992 } 36993 if err := iprot.ReadStructEnd(ctx); err != nil { 36994 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 36995 } 36996 return nil 36997 } 36998 36999 func (p *ApplyDbLowerboundI64Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 37000 p.Code = &Uint64{} 37001 if err := p.Code.Read(ctx, iprot); err != nil { 37002 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 37003 } 37004 return nil 37005 } 37006 37007 func (p *ApplyDbLowerboundI64Args) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 37008 p.Scope = &Uint64{} 37009 if err := p.Scope.Read(ctx, iprot); err != nil { 37010 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 37011 } 37012 return nil 37013 } 37014 37015 func (p *ApplyDbLowerboundI64Args) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 37016 p.Table = &Uint64{} 37017 if err := p.Table.Read(ctx, iprot); err != nil { 37018 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 37019 } 37020 return nil 37021 } 37022 37023 func (p *ApplyDbLowerboundI64Args) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 37024 p.ID = &Uint64{} 37025 if err := p.ID.Read(ctx, iprot); err != nil { 37026 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ID), err) 37027 } 37028 return nil 37029 } 37030 37031 func (p *ApplyDbLowerboundI64Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 37032 if err := oprot.WriteStructBegin(ctx, "db_lowerbound_i64_args"); err != nil { 37033 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 37034 if p != nil { 37035 if err := p.writeField1(ctx, oprot); err != nil { return err } 37036 if err := p.writeField2(ctx, oprot); err != nil { return err } 37037 if err := p.writeField3(ctx, oprot); err != nil { return err } 37038 if err := p.writeField4(ctx, oprot); err != nil { return err } 37039 } 37040 if err := oprot.WriteFieldStop(ctx); err != nil { 37041 return thrift.PrependError("write field stop error: ", err) } 37042 if err := oprot.WriteStructEnd(ctx); err != nil { 37043 return thrift.PrependError("write struct stop error: ", err) } 37044 return nil 37045 } 37046 37047 func (p *ApplyDbLowerboundI64Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 37048 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 37049 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 37050 if err := p.Code.Write(ctx, oprot); err != nil { 37051 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 37052 } 37053 if err := oprot.WriteFieldEnd(ctx); err != nil { 37054 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 37055 return err 37056 } 37057 37058 func (p *ApplyDbLowerboundI64Args) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 37059 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 37060 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 37061 if err := p.Scope.Write(ctx, oprot); err != nil { 37062 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 37063 } 37064 if err := oprot.WriteFieldEnd(ctx); err != nil { 37065 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 37066 return err 37067 } 37068 37069 func (p *ApplyDbLowerboundI64Args) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 37070 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 37071 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 37072 if err := p.Table.Write(ctx, oprot); err != nil { 37073 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 37074 } 37075 if err := oprot.WriteFieldEnd(ctx); err != nil { 37076 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 37077 return err 37078 } 37079 37080 func (p *ApplyDbLowerboundI64Args) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 37081 if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRUCT, 4); err != nil { 37082 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err) } 37083 if err := p.ID.Write(ctx, oprot); err != nil { 37084 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ID), err) 37085 } 37086 if err := oprot.WriteFieldEnd(ctx); err != nil { 37087 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err) } 37088 return err 37089 } 37090 37091 func (p *ApplyDbLowerboundI64Args) String() string { 37092 if p == nil { 37093 return "<nil>" 37094 } 37095 return fmt.Sprintf("ApplyDbLowerboundI64Args(%+v)", *p) 37096 } 37097 37098 // Attributes: 37099 // - Success 37100 type ApplyDbLowerboundI64Result struct { 37101 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 37102 } 37103 37104 func NewApplyDbLowerboundI64Result() *ApplyDbLowerboundI64Result { 37105 return &ApplyDbLowerboundI64Result{} 37106 } 37107 37108 var ApplyDbLowerboundI64Result_Success_DEFAULT int32 37109 func (p *ApplyDbLowerboundI64Result) GetSuccess() int32 { 37110 if !p.IsSetSuccess() { 37111 return ApplyDbLowerboundI64Result_Success_DEFAULT 37112 } 37113 return *p.Success 37114 } 37115 func (p *ApplyDbLowerboundI64Result) IsSetSuccess() bool { 37116 return p.Success != nil 37117 } 37118 37119 func (p *ApplyDbLowerboundI64Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 37120 if _, err := iprot.ReadStructBegin(ctx); err != nil { 37121 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 37122 } 37123 37124 37125 for { 37126 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 37127 if err != nil { 37128 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 37129 } 37130 if fieldTypeId == thrift.STOP { break; } 37131 switch fieldId { 37132 case 0: 37133 if fieldTypeId == thrift.I32 { 37134 if err := p.ReadField0(ctx, iprot); err != nil { 37135 return err 37136 } 37137 } else { 37138 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37139 return err 37140 } 37141 } 37142 default: 37143 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37144 return err 37145 } 37146 } 37147 if err := iprot.ReadFieldEnd(ctx); err != nil { 37148 return err 37149 } 37150 } 37151 if err := iprot.ReadStructEnd(ctx); err != nil { 37152 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 37153 } 37154 return nil 37155 } 37156 37157 func (p *ApplyDbLowerboundI64Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 37158 if v, err := iprot.ReadI32(ctx); err != nil { 37159 return thrift.PrependError("error reading field 0: ", err) 37160 } else { 37161 p.Success = &v 37162 } 37163 return nil 37164 } 37165 37166 func (p *ApplyDbLowerboundI64Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 37167 if err := oprot.WriteStructBegin(ctx, "db_lowerbound_i64_result"); err != nil { 37168 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 37169 if p != nil { 37170 if err := p.writeField0(ctx, oprot); err != nil { return err } 37171 } 37172 if err := oprot.WriteFieldStop(ctx); err != nil { 37173 return thrift.PrependError("write field stop error: ", err) } 37174 if err := oprot.WriteStructEnd(ctx); err != nil { 37175 return thrift.PrependError("write struct stop error: ", err) } 37176 return nil 37177 } 37178 37179 func (p *ApplyDbLowerboundI64Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 37180 if p.IsSetSuccess() { 37181 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 37182 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 37183 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 37184 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 37185 if err := oprot.WriteFieldEnd(ctx); err != nil { 37186 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 37187 } 37188 return err 37189 } 37190 37191 func (p *ApplyDbLowerboundI64Result) String() string { 37192 if p == nil { 37193 return "<nil>" 37194 } 37195 return fmt.Sprintf("ApplyDbLowerboundI64Result(%+v)", *p) 37196 } 37197 37198 // Attributes: 37199 // - Code 37200 // - Scope 37201 // - Table 37202 // - ID 37203 type ApplyDbUpperboundI64Args struct { 37204 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 37205 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 37206 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 37207 ID *Uint64 `thrift:"id,4" db:"id" json:"id"` 37208 } 37209 37210 func NewApplyDbUpperboundI64Args() *ApplyDbUpperboundI64Args { 37211 return &ApplyDbUpperboundI64Args{} 37212 } 37213 37214 var ApplyDbUpperboundI64Args_Code_DEFAULT *Uint64 37215 func (p *ApplyDbUpperboundI64Args) GetCode() *Uint64 { 37216 if !p.IsSetCode() { 37217 return ApplyDbUpperboundI64Args_Code_DEFAULT 37218 } 37219 return p.Code 37220 } 37221 var ApplyDbUpperboundI64Args_Scope_DEFAULT *Uint64 37222 func (p *ApplyDbUpperboundI64Args) GetScope() *Uint64 { 37223 if !p.IsSetScope() { 37224 return ApplyDbUpperboundI64Args_Scope_DEFAULT 37225 } 37226 return p.Scope 37227 } 37228 var ApplyDbUpperboundI64Args_Table_DEFAULT *Uint64 37229 func (p *ApplyDbUpperboundI64Args) GetTable() *Uint64 { 37230 if !p.IsSetTable() { 37231 return ApplyDbUpperboundI64Args_Table_DEFAULT 37232 } 37233 return p.Table 37234 } 37235 var ApplyDbUpperboundI64Args_ID_DEFAULT *Uint64 37236 func (p *ApplyDbUpperboundI64Args) GetID() *Uint64 { 37237 if !p.IsSetID() { 37238 return ApplyDbUpperboundI64Args_ID_DEFAULT 37239 } 37240 return p.ID 37241 } 37242 func (p *ApplyDbUpperboundI64Args) IsSetCode() bool { 37243 return p.Code != nil 37244 } 37245 37246 func (p *ApplyDbUpperboundI64Args) IsSetScope() bool { 37247 return p.Scope != nil 37248 } 37249 37250 func (p *ApplyDbUpperboundI64Args) IsSetTable() bool { 37251 return p.Table != nil 37252 } 37253 37254 func (p *ApplyDbUpperboundI64Args) IsSetID() bool { 37255 return p.ID != nil 37256 } 37257 37258 func (p *ApplyDbUpperboundI64Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 37259 if _, err := iprot.ReadStructBegin(ctx); err != nil { 37260 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 37261 } 37262 37263 37264 for { 37265 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 37266 if err != nil { 37267 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 37268 } 37269 if fieldTypeId == thrift.STOP { break; } 37270 switch fieldId { 37271 case 1: 37272 if fieldTypeId == thrift.STRUCT { 37273 if err := p.ReadField1(ctx, iprot); err != nil { 37274 return err 37275 } 37276 } else { 37277 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37278 return err 37279 } 37280 } 37281 case 2: 37282 if fieldTypeId == thrift.STRUCT { 37283 if err := p.ReadField2(ctx, iprot); err != nil { 37284 return err 37285 } 37286 } else { 37287 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37288 return err 37289 } 37290 } 37291 case 3: 37292 if fieldTypeId == thrift.STRUCT { 37293 if err := p.ReadField3(ctx, iprot); err != nil { 37294 return err 37295 } 37296 } else { 37297 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37298 return err 37299 } 37300 } 37301 case 4: 37302 if fieldTypeId == thrift.STRUCT { 37303 if err := p.ReadField4(ctx, iprot); err != nil { 37304 return err 37305 } 37306 } else { 37307 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37308 return err 37309 } 37310 } 37311 default: 37312 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37313 return err 37314 } 37315 } 37316 if err := iprot.ReadFieldEnd(ctx); err != nil { 37317 return err 37318 } 37319 } 37320 if err := iprot.ReadStructEnd(ctx); err != nil { 37321 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 37322 } 37323 return nil 37324 } 37325 37326 func (p *ApplyDbUpperboundI64Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 37327 p.Code = &Uint64{} 37328 if err := p.Code.Read(ctx, iprot); err != nil { 37329 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 37330 } 37331 return nil 37332 } 37333 37334 func (p *ApplyDbUpperboundI64Args) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 37335 p.Scope = &Uint64{} 37336 if err := p.Scope.Read(ctx, iprot); err != nil { 37337 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 37338 } 37339 return nil 37340 } 37341 37342 func (p *ApplyDbUpperboundI64Args) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 37343 p.Table = &Uint64{} 37344 if err := p.Table.Read(ctx, iprot); err != nil { 37345 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 37346 } 37347 return nil 37348 } 37349 37350 func (p *ApplyDbUpperboundI64Args) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 37351 p.ID = &Uint64{} 37352 if err := p.ID.Read(ctx, iprot); err != nil { 37353 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ID), err) 37354 } 37355 return nil 37356 } 37357 37358 func (p *ApplyDbUpperboundI64Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 37359 if err := oprot.WriteStructBegin(ctx, "db_upperbound_i64_args"); err != nil { 37360 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 37361 if p != nil { 37362 if err := p.writeField1(ctx, oprot); err != nil { return err } 37363 if err := p.writeField2(ctx, oprot); err != nil { return err } 37364 if err := p.writeField3(ctx, oprot); err != nil { return err } 37365 if err := p.writeField4(ctx, oprot); err != nil { return err } 37366 } 37367 if err := oprot.WriteFieldStop(ctx); err != nil { 37368 return thrift.PrependError("write field stop error: ", err) } 37369 if err := oprot.WriteStructEnd(ctx); err != nil { 37370 return thrift.PrependError("write struct stop error: ", err) } 37371 return nil 37372 } 37373 37374 func (p *ApplyDbUpperboundI64Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 37375 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 37376 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 37377 if err := p.Code.Write(ctx, oprot); err != nil { 37378 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 37379 } 37380 if err := oprot.WriteFieldEnd(ctx); err != nil { 37381 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 37382 return err 37383 } 37384 37385 func (p *ApplyDbUpperboundI64Args) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 37386 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 37387 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 37388 if err := p.Scope.Write(ctx, oprot); err != nil { 37389 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 37390 } 37391 if err := oprot.WriteFieldEnd(ctx); err != nil { 37392 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 37393 return err 37394 } 37395 37396 func (p *ApplyDbUpperboundI64Args) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 37397 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 37398 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 37399 if err := p.Table.Write(ctx, oprot); err != nil { 37400 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 37401 } 37402 if err := oprot.WriteFieldEnd(ctx); err != nil { 37403 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 37404 return err 37405 } 37406 37407 func (p *ApplyDbUpperboundI64Args) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 37408 if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRUCT, 4); err != nil { 37409 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err) } 37410 if err := p.ID.Write(ctx, oprot); err != nil { 37411 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ID), err) 37412 } 37413 if err := oprot.WriteFieldEnd(ctx); err != nil { 37414 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err) } 37415 return err 37416 } 37417 37418 func (p *ApplyDbUpperboundI64Args) String() string { 37419 if p == nil { 37420 return "<nil>" 37421 } 37422 return fmt.Sprintf("ApplyDbUpperboundI64Args(%+v)", *p) 37423 } 37424 37425 // Attributes: 37426 // - Success 37427 type ApplyDbUpperboundI64Result struct { 37428 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 37429 } 37430 37431 func NewApplyDbUpperboundI64Result() *ApplyDbUpperboundI64Result { 37432 return &ApplyDbUpperboundI64Result{} 37433 } 37434 37435 var ApplyDbUpperboundI64Result_Success_DEFAULT int32 37436 func (p *ApplyDbUpperboundI64Result) GetSuccess() int32 { 37437 if !p.IsSetSuccess() { 37438 return ApplyDbUpperboundI64Result_Success_DEFAULT 37439 } 37440 return *p.Success 37441 } 37442 func (p *ApplyDbUpperboundI64Result) IsSetSuccess() bool { 37443 return p.Success != nil 37444 } 37445 37446 func (p *ApplyDbUpperboundI64Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 37447 if _, err := iprot.ReadStructBegin(ctx); err != nil { 37448 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 37449 } 37450 37451 37452 for { 37453 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 37454 if err != nil { 37455 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 37456 } 37457 if fieldTypeId == thrift.STOP { break; } 37458 switch fieldId { 37459 case 0: 37460 if fieldTypeId == thrift.I32 { 37461 if err := p.ReadField0(ctx, iprot); err != nil { 37462 return err 37463 } 37464 } else { 37465 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37466 return err 37467 } 37468 } 37469 default: 37470 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37471 return err 37472 } 37473 } 37474 if err := iprot.ReadFieldEnd(ctx); err != nil { 37475 return err 37476 } 37477 } 37478 if err := iprot.ReadStructEnd(ctx); err != nil { 37479 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 37480 } 37481 return nil 37482 } 37483 37484 func (p *ApplyDbUpperboundI64Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 37485 if v, err := iprot.ReadI32(ctx); err != nil { 37486 return thrift.PrependError("error reading field 0: ", err) 37487 } else { 37488 p.Success = &v 37489 } 37490 return nil 37491 } 37492 37493 func (p *ApplyDbUpperboundI64Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 37494 if err := oprot.WriteStructBegin(ctx, "db_upperbound_i64_result"); err != nil { 37495 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 37496 if p != nil { 37497 if err := p.writeField0(ctx, oprot); err != nil { return err } 37498 } 37499 if err := oprot.WriteFieldStop(ctx); err != nil { 37500 return thrift.PrependError("write field stop error: ", err) } 37501 if err := oprot.WriteStructEnd(ctx); err != nil { 37502 return thrift.PrependError("write struct stop error: ", err) } 37503 return nil 37504 } 37505 37506 func (p *ApplyDbUpperboundI64Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 37507 if p.IsSetSuccess() { 37508 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 37509 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 37510 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 37511 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 37512 if err := oprot.WriteFieldEnd(ctx); err != nil { 37513 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 37514 } 37515 return err 37516 } 37517 37518 func (p *ApplyDbUpperboundI64Result) String() string { 37519 if p == nil { 37520 return "<nil>" 37521 } 37522 return fmt.Sprintf("ApplyDbUpperboundI64Result(%+v)", *p) 37523 } 37524 37525 // Attributes: 37526 // - Code 37527 // - Scope 37528 // - Table 37529 type ApplyDbEndI64Args struct { 37530 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 37531 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 37532 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 37533 } 37534 37535 func NewApplyDbEndI64Args() *ApplyDbEndI64Args { 37536 return &ApplyDbEndI64Args{} 37537 } 37538 37539 var ApplyDbEndI64Args_Code_DEFAULT *Uint64 37540 func (p *ApplyDbEndI64Args) GetCode() *Uint64 { 37541 if !p.IsSetCode() { 37542 return ApplyDbEndI64Args_Code_DEFAULT 37543 } 37544 return p.Code 37545 } 37546 var ApplyDbEndI64Args_Scope_DEFAULT *Uint64 37547 func (p *ApplyDbEndI64Args) GetScope() *Uint64 { 37548 if !p.IsSetScope() { 37549 return ApplyDbEndI64Args_Scope_DEFAULT 37550 } 37551 return p.Scope 37552 } 37553 var ApplyDbEndI64Args_Table_DEFAULT *Uint64 37554 func (p *ApplyDbEndI64Args) GetTable() *Uint64 { 37555 if !p.IsSetTable() { 37556 return ApplyDbEndI64Args_Table_DEFAULT 37557 } 37558 return p.Table 37559 } 37560 func (p *ApplyDbEndI64Args) IsSetCode() bool { 37561 return p.Code != nil 37562 } 37563 37564 func (p *ApplyDbEndI64Args) IsSetScope() bool { 37565 return p.Scope != nil 37566 } 37567 37568 func (p *ApplyDbEndI64Args) IsSetTable() bool { 37569 return p.Table != nil 37570 } 37571 37572 func (p *ApplyDbEndI64Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 37573 if _, err := iprot.ReadStructBegin(ctx); err != nil { 37574 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 37575 } 37576 37577 37578 for { 37579 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 37580 if err != nil { 37581 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 37582 } 37583 if fieldTypeId == thrift.STOP { break; } 37584 switch fieldId { 37585 case 1: 37586 if fieldTypeId == thrift.STRUCT { 37587 if err := p.ReadField1(ctx, iprot); err != nil { 37588 return err 37589 } 37590 } else { 37591 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37592 return err 37593 } 37594 } 37595 case 2: 37596 if fieldTypeId == thrift.STRUCT { 37597 if err := p.ReadField2(ctx, iprot); err != nil { 37598 return err 37599 } 37600 } else { 37601 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37602 return err 37603 } 37604 } 37605 case 3: 37606 if fieldTypeId == thrift.STRUCT { 37607 if err := p.ReadField3(ctx, iprot); err != nil { 37608 return err 37609 } 37610 } else { 37611 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37612 return err 37613 } 37614 } 37615 default: 37616 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37617 return err 37618 } 37619 } 37620 if err := iprot.ReadFieldEnd(ctx); err != nil { 37621 return err 37622 } 37623 } 37624 if err := iprot.ReadStructEnd(ctx); err != nil { 37625 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 37626 } 37627 return nil 37628 } 37629 37630 func (p *ApplyDbEndI64Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 37631 p.Code = &Uint64{} 37632 if err := p.Code.Read(ctx, iprot); err != nil { 37633 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 37634 } 37635 return nil 37636 } 37637 37638 func (p *ApplyDbEndI64Args) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 37639 p.Scope = &Uint64{} 37640 if err := p.Scope.Read(ctx, iprot); err != nil { 37641 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 37642 } 37643 return nil 37644 } 37645 37646 func (p *ApplyDbEndI64Args) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 37647 p.Table = &Uint64{} 37648 if err := p.Table.Read(ctx, iprot); err != nil { 37649 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 37650 } 37651 return nil 37652 } 37653 37654 func (p *ApplyDbEndI64Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 37655 if err := oprot.WriteStructBegin(ctx, "db_end_i64_args"); err != nil { 37656 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 37657 if p != nil { 37658 if err := p.writeField1(ctx, oprot); err != nil { return err } 37659 if err := p.writeField2(ctx, oprot); err != nil { return err } 37660 if err := p.writeField3(ctx, oprot); err != nil { return err } 37661 } 37662 if err := oprot.WriteFieldStop(ctx); err != nil { 37663 return thrift.PrependError("write field stop error: ", err) } 37664 if err := oprot.WriteStructEnd(ctx); err != nil { 37665 return thrift.PrependError("write struct stop error: ", err) } 37666 return nil 37667 } 37668 37669 func (p *ApplyDbEndI64Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 37670 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 37671 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 37672 if err := p.Code.Write(ctx, oprot); err != nil { 37673 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 37674 } 37675 if err := oprot.WriteFieldEnd(ctx); err != nil { 37676 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 37677 return err 37678 } 37679 37680 func (p *ApplyDbEndI64Args) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 37681 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 37682 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 37683 if err := p.Scope.Write(ctx, oprot); err != nil { 37684 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 37685 } 37686 if err := oprot.WriteFieldEnd(ctx); err != nil { 37687 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 37688 return err 37689 } 37690 37691 func (p *ApplyDbEndI64Args) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 37692 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 37693 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 37694 if err := p.Table.Write(ctx, oprot); err != nil { 37695 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 37696 } 37697 if err := oprot.WriteFieldEnd(ctx); err != nil { 37698 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 37699 return err 37700 } 37701 37702 func (p *ApplyDbEndI64Args) String() string { 37703 if p == nil { 37704 return "<nil>" 37705 } 37706 return fmt.Sprintf("ApplyDbEndI64Args(%+v)", *p) 37707 } 37708 37709 // Attributes: 37710 // - Success 37711 type ApplyDbEndI64Result struct { 37712 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 37713 } 37714 37715 func NewApplyDbEndI64Result() *ApplyDbEndI64Result { 37716 return &ApplyDbEndI64Result{} 37717 } 37718 37719 var ApplyDbEndI64Result_Success_DEFAULT int32 37720 func (p *ApplyDbEndI64Result) GetSuccess() int32 { 37721 if !p.IsSetSuccess() { 37722 return ApplyDbEndI64Result_Success_DEFAULT 37723 } 37724 return *p.Success 37725 } 37726 func (p *ApplyDbEndI64Result) IsSetSuccess() bool { 37727 return p.Success != nil 37728 } 37729 37730 func (p *ApplyDbEndI64Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 37731 if _, err := iprot.ReadStructBegin(ctx); err != nil { 37732 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 37733 } 37734 37735 37736 for { 37737 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 37738 if err != nil { 37739 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 37740 } 37741 if fieldTypeId == thrift.STOP { break; } 37742 switch fieldId { 37743 case 0: 37744 if fieldTypeId == thrift.I32 { 37745 if err := p.ReadField0(ctx, iprot); err != nil { 37746 return err 37747 } 37748 } else { 37749 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37750 return err 37751 } 37752 } 37753 default: 37754 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37755 return err 37756 } 37757 } 37758 if err := iprot.ReadFieldEnd(ctx); err != nil { 37759 return err 37760 } 37761 } 37762 if err := iprot.ReadStructEnd(ctx); err != nil { 37763 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 37764 } 37765 return nil 37766 } 37767 37768 func (p *ApplyDbEndI64Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 37769 if v, err := iprot.ReadI32(ctx); err != nil { 37770 return thrift.PrependError("error reading field 0: ", err) 37771 } else { 37772 p.Success = &v 37773 } 37774 return nil 37775 } 37776 37777 func (p *ApplyDbEndI64Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 37778 if err := oprot.WriteStructBegin(ctx, "db_end_i64_result"); err != nil { 37779 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 37780 if p != nil { 37781 if err := p.writeField0(ctx, oprot); err != nil { return err } 37782 } 37783 if err := oprot.WriteFieldStop(ctx); err != nil { 37784 return thrift.PrependError("write field stop error: ", err) } 37785 if err := oprot.WriteStructEnd(ctx); err != nil { 37786 return thrift.PrependError("write struct stop error: ", err) } 37787 return nil 37788 } 37789 37790 func (p *ApplyDbEndI64Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 37791 if p.IsSetSuccess() { 37792 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 37793 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 37794 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 37795 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 37796 if err := oprot.WriteFieldEnd(ctx); err != nil { 37797 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 37798 } 37799 return err 37800 } 37801 37802 func (p *ApplyDbEndI64Result) String() string { 37803 if p == nil { 37804 return "<nil>" 37805 } 37806 return fmt.Sprintf("ApplyDbEndI64Result(%+v)", *p) 37807 } 37808 37809 // Attributes: 37810 // - Scope 37811 // - Table 37812 // - Payer 37813 // - ID 37814 // - Secondary 37815 type ApplyDbIdx64StoreArgs struct { 37816 Scope *Uint64 `thrift:"scope,1" db:"scope" json:"scope"` 37817 Table *Uint64 `thrift:"table,2" db:"table" json:"table"` 37818 Payer *Uint64 `thrift:"payer,3" db:"payer" json:"payer"` 37819 ID *Uint64 `thrift:"id,4" db:"id" json:"id"` 37820 Secondary *Uint64 `thrift:"secondary,5" db:"secondary" json:"secondary"` 37821 } 37822 37823 func NewApplyDbIdx64StoreArgs() *ApplyDbIdx64StoreArgs { 37824 return &ApplyDbIdx64StoreArgs{} 37825 } 37826 37827 var ApplyDbIdx64StoreArgs_Scope_DEFAULT *Uint64 37828 func (p *ApplyDbIdx64StoreArgs) GetScope() *Uint64 { 37829 if !p.IsSetScope() { 37830 return ApplyDbIdx64StoreArgs_Scope_DEFAULT 37831 } 37832 return p.Scope 37833 } 37834 var ApplyDbIdx64StoreArgs_Table_DEFAULT *Uint64 37835 func (p *ApplyDbIdx64StoreArgs) GetTable() *Uint64 { 37836 if !p.IsSetTable() { 37837 return ApplyDbIdx64StoreArgs_Table_DEFAULT 37838 } 37839 return p.Table 37840 } 37841 var ApplyDbIdx64StoreArgs_Payer_DEFAULT *Uint64 37842 func (p *ApplyDbIdx64StoreArgs) GetPayer() *Uint64 { 37843 if !p.IsSetPayer() { 37844 return ApplyDbIdx64StoreArgs_Payer_DEFAULT 37845 } 37846 return p.Payer 37847 } 37848 var ApplyDbIdx64StoreArgs_ID_DEFAULT *Uint64 37849 func (p *ApplyDbIdx64StoreArgs) GetID() *Uint64 { 37850 if !p.IsSetID() { 37851 return ApplyDbIdx64StoreArgs_ID_DEFAULT 37852 } 37853 return p.ID 37854 } 37855 var ApplyDbIdx64StoreArgs_Secondary_DEFAULT *Uint64 37856 func (p *ApplyDbIdx64StoreArgs) GetSecondary() *Uint64 { 37857 if !p.IsSetSecondary() { 37858 return ApplyDbIdx64StoreArgs_Secondary_DEFAULT 37859 } 37860 return p.Secondary 37861 } 37862 func (p *ApplyDbIdx64StoreArgs) IsSetScope() bool { 37863 return p.Scope != nil 37864 } 37865 37866 func (p *ApplyDbIdx64StoreArgs) IsSetTable() bool { 37867 return p.Table != nil 37868 } 37869 37870 func (p *ApplyDbIdx64StoreArgs) IsSetPayer() bool { 37871 return p.Payer != nil 37872 } 37873 37874 func (p *ApplyDbIdx64StoreArgs) IsSetID() bool { 37875 return p.ID != nil 37876 } 37877 37878 func (p *ApplyDbIdx64StoreArgs) IsSetSecondary() bool { 37879 return p.Secondary != nil 37880 } 37881 37882 func (p *ApplyDbIdx64StoreArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 37883 if _, err := iprot.ReadStructBegin(ctx); err != nil { 37884 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 37885 } 37886 37887 37888 for { 37889 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 37890 if err != nil { 37891 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 37892 } 37893 if fieldTypeId == thrift.STOP { break; } 37894 switch fieldId { 37895 case 1: 37896 if fieldTypeId == thrift.STRUCT { 37897 if err := p.ReadField1(ctx, iprot); err != nil { 37898 return err 37899 } 37900 } else { 37901 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37902 return err 37903 } 37904 } 37905 case 2: 37906 if fieldTypeId == thrift.STRUCT { 37907 if err := p.ReadField2(ctx, iprot); err != nil { 37908 return err 37909 } 37910 } else { 37911 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37912 return err 37913 } 37914 } 37915 case 3: 37916 if fieldTypeId == thrift.STRUCT { 37917 if err := p.ReadField3(ctx, iprot); err != nil { 37918 return err 37919 } 37920 } else { 37921 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37922 return err 37923 } 37924 } 37925 case 4: 37926 if fieldTypeId == thrift.STRUCT { 37927 if err := p.ReadField4(ctx, iprot); err != nil { 37928 return err 37929 } 37930 } else { 37931 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37932 return err 37933 } 37934 } 37935 case 5: 37936 if fieldTypeId == thrift.STRUCT { 37937 if err := p.ReadField5(ctx, iprot); err != nil { 37938 return err 37939 } 37940 } else { 37941 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37942 return err 37943 } 37944 } 37945 default: 37946 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 37947 return err 37948 } 37949 } 37950 if err := iprot.ReadFieldEnd(ctx); err != nil { 37951 return err 37952 } 37953 } 37954 if err := iprot.ReadStructEnd(ctx); err != nil { 37955 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 37956 } 37957 return nil 37958 } 37959 37960 func (p *ApplyDbIdx64StoreArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 37961 p.Scope = &Uint64{} 37962 if err := p.Scope.Read(ctx, iprot); err != nil { 37963 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 37964 } 37965 return nil 37966 } 37967 37968 func (p *ApplyDbIdx64StoreArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 37969 p.Table = &Uint64{} 37970 if err := p.Table.Read(ctx, iprot); err != nil { 37971 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 37972 } 37973 return nil 37974 } 37975 37976 func (p *ApplyDbIdx64StoreArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 37977 p.Payer = &Uint64{} 37978 if err := p.Payer.Read(ctx, iprot); err != nil { 37979 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 37980 } 37981 return nil 37982 } 37983 37984 func (p *ApplyDbIdx64StoreArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 37985 p.ID = &Uint64{} 37986 if err := p.ID.Read(ctx, iprot); err != nil { 37987 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ID), err) 37988 } 37989 return nil 37990 } 37991 37992 func (p *ApplyDbIdx64StoreArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 37993 p.Secondary = &Uint64{} 37994 if err := p.Secondary.Read(ctx, iprot); err != nil { 37995 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Secondary), err) 37996 } 37997 return nil 37998 } 37999 38000 func (p *ApplyDbIdx64StoreArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 38001 if err := oprot.WriteStructBegin(ctx, "db_idx64_store_args"); err != nil { 38002 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 38003 if p != nil { 38004 if err := p.writeField1(ctx, oprot); err != nil { return err } 38005 if err := p.writeField2(ctx, oprot); err != nil { return err } 38006 if err := p.writeField3(ctx, oprot); err != nil { return err } 38007 if err := p.writeField4(ctx, oprot); err != nil { return err } 38008 if err := p.writeField5(ctx, oprot); err != nil { return err } 38009 } 38010 if err := oprot.WriteFieldStop(ctx); err != nil { 38011 return thrift.PrependError("write field stop error: ", err) } 38012 if err := oprot.WriteStructEnd(ctx); err != nil { 38013 return thrift.PrependError("write struct stop error: ", err) } 38014 return nil 38015 } 38016 38017 func (p *ApplyDbIdx64StoreArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 38018 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 1); err != nil { 38019 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:scope: ", p), err) } 38020 if err := p.Scope.Write(ctx, oprot); err != nil { 38021 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 38022 } 38023 if err := oprot.WriteFieldEnd(ctx); err != nil { 38024 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:scope: ", p), err) } 38025 return err 38026 } 38027 38028 func (p *ApplyDbIdx64StoreArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 38029 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 2); err != nil { 38030 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:table: ", p), err) } 38031 if err := p.Table.Write(ctx, oprot); err != nil { 38032 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 38033 } 38034 if err := oprot.WriteFieldEnd(ctx); err != nil { 38035 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:table: ", p), err) } 38036 return err 38037 } 38038 38039 func (p *ApplyDbIdx64StoreArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 38040 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 3); err != nil { 38041 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:payer: ", p), err) } 38042 if err := p.Payer.Write(ctx, oprot); err != nil { 38043 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 38044 } 38045 if err := oprot.WriteFieldEnd(ctx); err != nil { 38046 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:payer: ", p), err) } 38047 return err 38048 } 38049 38050 func (p *ApplyDbIdx64StoreArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 38051 if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRUCT, 4); err != nil { 38052 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err) } 38053 if err := p.ID.Write(ctx, oprot); err != nil { 38054 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ID), err) 38055 } 38056 if err := oprot.WriteFieldEnd(ctx); err != nil { 38057 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err) } 38058 return err 38059 } 38060 38061 func (p *ApplyDbIdx64StoreArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 38062 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRUCT, 5); err != nil { 38063 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:secondary: ", p), err) } 38064 if err := p.Secondary.Write(ctx, oprot); err != nil { 38065 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Secondary), err) 38066 } 38067 if err := oprot.WriteFieldEnd(ctx); err != nil { 38068 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:secondary: ", p), err) } 38069 return err 38070 } 38071 38072 func (p *ApplyDbIdx64StoreArgs) String() string { 38073 if p == nil { 38074 return "<nil>" 38075 } 38076 return fmt.Sprintf("ApplyDbIdx64StoreArgs(%+v)", *p) 38077 } 38078 38079 // Attributes: 38080 // - Success 38081 type ApplyDbIdx64StoreResult struct { 38082 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 38083 } 38084 38085 func NewApplyDbIdx64StoreResult() *ApplyDbIdx64StoreResult { 38086 return &ApplyDbIdx64StoreResult{} 38087 } 38088 38089 var ApplyDbIdx64StoreResult_Success_DEFAULT int32 38090 func (p *ApplyDbIdx64StoreResult) GetSuccess() int32 { 38091 if !p.IsSetSuccess() { 38092 return ApplyDbIdx64StoreResult_Success_DEFAULT 38093 } 38094 return *p.Success 38095 } 38096 func (p *ApplyDbIdx64StoreResult) IsSetSuccess() bool { 38097 return p.Success != nil 38098 } 38099 38100 func (p *ApplyDbIdx64StoreResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 38101 if _, err := iprot.ReadStructBegin(ctx); err != nil { 38102 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 38103 } 38104 38105 38106 for { 38107 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 38108 if err != nil { 38109 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 38110 } 38111 if fieldTypeId == thrift.STOP { break; } 38112 switch fieldId { 38113 case 0: 38114 if fieldTypeId == thrift.I32 { 38115 if err := p.ReadField0(ctx, iprot); err != nil { 38116 return err 38117 } 38118 } else { 38119 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38120 return err 38121 } 38122 } 38123 default: 38124 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38125 return err 38126 } 38127 } 38128 if err := iprot.ReadFieldEnd(ctx); err != nil { 38129 return err 38130 } 38131 } 38132 if err := iprot.ReadStructEnd(ctx); err != nil { 38133 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 38134 } 38135 return nil 38136 } 38137 38138 func (p *ApplyDbIdx64StoreResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 38139 if v, err := iprot.ReadI32(ctx); err != nil { 38140 return thrift.PrependError("error reading field 0: ", err) 38141 } else { 38142 p.Success = &v 38143 } 38144 return nil 38145 } 38146 38147 func (p *ApplyDbIdx64StoreResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 38148 if err := oprot.WriteStructBegin(ctx, "db_idx64_store_result"); err != nil { 38149 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 38150 if p != nil { 38151 if err := p.writeField0(ctx, oprot); err != nil { return err } 38152 } 38153 if err := oprot.WriteFieldStop(ctx); err != nil { 38154 return thrift.PrependError("write field stop error: ", err) } 38155 if err := oprot.WriteStructEnd(ctx); err != nil { 38156 return thrift.PrependError("write struct stop error: ", err) } 38157 return nil 38158 } 38159 38160 func (p *ApplyDbIdx64StoreResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 38161 if p.IsSetSuccess() { 38162 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 38163 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 38164 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 38165 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 38166 if err := oprot.WriteFieldEnd(ctx); err != nil { 38167 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 38168 } 38169 return err 38170 } 38171 38172 func (p *ApplyDbIdx64StoreResult) String() string { 38173 if p == nil { 38174 return "<nil>" 38175 } 38176 return fmt.Sprintf("ApplyDbIdx64StoreResult(%+v)", *p) 38177 } 38178 38179 // Attributes: 38180 // - Iterator 38181 // - Payer 38182 // - Secondary 38183 type ApplyDbIdx64UpdateArgs struct { 38184 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 38185 Payer *Uint64 `thrift:"payer,2" db:"payer" json:"payer"` 38186 Secondary *Uint64 `thrift:"secondary,3" db:"secondary" json:"secondary"` 38187 } 38188 38189 func NewApplyDbIdx64UpdateArgs() *ApplyDbIdx64UpdateArgs { 38190 return &ApplyDbIdx64UpdateArgs{} 38191 } 38192 38193 38194 func (p *ApplyDbIdx64UpdateArgs) GetIterator() int32 { 38195 return p.Iterator 38196 } 38197 var ApplyDbIdx64UpdateArgs_Payer_DEFAULT *Uint64 38198 func (p *ApplyDbIdx64UpdateArgs) GetPayer() *Uint64 { 38199 if !p.IsSetPayer() { 38200 return ApplyDbIdx64UpdateArgs_Payer_DEFAULT 38201 } 38202 return p.Payer 38203 } 38204 var ApplyDbIdx64UpdateArgs_Secondary_DEFAULT *Uint64 38205 func (p *ApplyDbIdx64UpdateArgs) GetSecondary() *Uint64 { 38206 if !p.IsSetSecondary() { 38207 return ApplyDbIdx64UpdateArgs_Secondary_DEFAULT 38208 } 38209 return p.Secondary 38210 } 38211 func (p *ApplyDbIdx64UpdateArgs) IsSetPayer() bool { 38212 return p.Payer != nil 38213 } 38214 38215 func (p *ApplyDbIdx64UpdateArgs) IsSetSecondary() bool { 38216 return p.Secondary != nil 38217 } 38218 38219 func (p *ApplyDbIdx64UpdateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 38220 if _, err := iprot.ReadStructBegin(ctx); err != nil { 38221 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 38222 } 38223 38224 38225 for { 38226 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 38227 if err != nil { 38228 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 38229 } 38230 if fieldTypeId == thrift.STOP { break; } 38231 switch fieldId { 38232 case 1: 38233 if fieldTypeId == thrift.I32 { 38234 if err := p.ReadField1(ctx, iprot); err != nil { 38235 return err 38236 } 38237 } else { 38238 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38239 return err 38240 } 38241 } 38242 case 2: 38243 if fieldTypeId == thrift.STRUCT { 38244 if err := p.ReadField2(ctx, iprot); err != nil { 38245 return err 38246 } 38247 } else { 38248 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38249 return err 38250 } 38251 } 38252 case 3: 38253 if fieldTypeId == thrift.STRUCT { 38254 if err := p.ReadField3(ctx, iprot); err != nil { 38255 return err 38256 } 38257 } else { 38258 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38259 return err 38260 } 38261 } 38262 default: 38263 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38264 return err 38265 } 38266 } 38267 if err := iprot.ReadFieldEnd(ctx); err != nil { 38268 return err 38269 } 38270 } 38271 if err := iprot.ReadStructEnd(ctx); err != nil { 38272 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 38273 } 38274 return nil 38275 } 38276 38277 func (p *ApplyDbIdx64UpdateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 38278 if v, err := iprot.ReadI32(ctx); err != nil { 38279 return thrift.PrependError("error reading field 1: ", err) 38280 } else { 38281 p.Iterator = v 38282 } 38283 return nil 38284 } 38285 38286 func (p *ApplyDbIdx64UpdateArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 38287 p.Payer = &Uint64{} 38288 if err := p.Payer.Read(ctx, iprot); err != nil { 38289 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 38290 } 38291 return nil 38292 } 38293 38294 func (p *ApplyDbIdx64UpdateArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 38295 p.Secondary = &Uint64{} 38296 if err := p.Secondary.Read(ctx, iprot); err != nil { 38297 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Secondary), err) 38298 } 38299 return nil 38300 } 38301 38302 func (p *ApplyDbIdx64UpdateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 38303 if err := oprot.WriteStructBegin(ctx, "db_idx64_update_args"); err != nil { 38304 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 38305 if p != nil { 38306 if err := p.writeField1(ctx, oprot); err != nil { return err } 38307 if err := p.writeField2(ctx, oprot); err != nil { return err } 38308 if err := p.writeField3(ctx, oprot); err != nil { return err } 38309 } 38310 if err := oprot.WriteFieldStop(ctx); err != nil { 38311 return thrift.PrependError("write field stop error: ", err) } 38312 if err := oprot.WriteStructEnd(ctx); err != nil { 38313 return thrift.PrependError("write struct stop error: ", err) } 38314 return nil 38315 } 38316 38317 func (p *ApplyDbIdx64UpdateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 38318 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 38319 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 38320 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 38321 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 38322 if err := oprot.WriteFieldEnd(ctx); err != nil { 38323 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 38324 return err 38325 } 38326 38327 func (p *ApplyDbIdx64UpdateArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 38328 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 2); err != nil { 38329 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:payer: ", p), err) } 38330 if err := p.Payer.Write(ctx, oprot); err != nil { 38331 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 38332 } 38333 if err := oprot.WriteFieldEnd(ctx); err != nil { 38334 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:payer: ", p), err) } 38335 return err 38336 } 38337 38338 func (p *ApplyDbIdx64UpdateArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 38339 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRUCT, 3); err != nil { 38340 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:secondary: ", p), err) } 38341 if err := p.Secondary.Write(ctx, oprot); err != nil { 38342 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Secondary), err) 38343 } 38344 if err := oprot.WriteFieldEnd(ctx); err != nil { 38345 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:secondary: ", p), err) } 38346 return err 38347 } 38348 38349 func (p *ApplyDbIdx64UpdateArgs) String() string { 38350 if p == nil { 38351 return "<nil>" 38352 } 38353 return fmt.Sprintf("ApplyDbIdx64UpdateArgs(%+v)", *p) 38354 } 38355 38356 type ApplyDbIdx64UpdateResult struct { 38357 } 38358 38359 func NewApplyDbIdx64UpdateResult() *ApplyDbIdx64UpdateResult { 38360 return &ApplyDbIdx64UpdateResult{} 38361 } 38362 38363 func (p *ApplyDbIdx64UpdateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 38364 if _, err := iprot.ReadStructBegin(ctx); err != nil { 38365 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 38366 } 38367 38368 38369 for { 38370 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 38371 if err != nil { 38372 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 38373 } 38374 if fieldTypeId == thrift.STOP { break; } 38375 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38376 return err 38377 } 38378 if err := iprot.ReadFieldEnd(ctx); err != nil { 38379 return err 38380 } 38381 } 38382 if err := iprot.ReadStructEnd(ctx); err != nil { 38383 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 38384 } 38385 return nil 38386 } 38387 38388 func (p *ApplyDbIdx64UpdateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 38389 if err := oprot.WriteStructBegin(ctx, "db_idx64_update_result"); err != nil { 38390 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 38391 if p != nil { 38392 } 38393 if err := oprot.WriteFieldStop(ctx); err != nil { 38394 return thrift.PrependError("write field stop error: ", err) } 38395 if err := oprot.WriteStructEnd(ctx); err != nil { 38396 return thrift.PrependError("write struct stop error: ", err) } 38397 return nil 38398 } 38399 38400 func (p *ApplyDbIdx64UpdateResult) String() string { 38401 if p == nil { 38402 return "<nil>" 38403 } 38404 return fmt.Sprintf("ApplyDbIdx64UpdateResult(%+v)", *p) 38405 } 38406 38407 // Attributes: 38408 // - Iterator 38409 type ApplyDbIdx64RemoveArgs struct { 38410 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 38411 } 38412 38413 func NewApplyDbIdx64RemoveArgs() *ApplyDbIdx64RemoveArgs { 38414 return &ApplyDbIdx64RemoveArgs{} 38415 } 38416 38417 38418 func (p *ApplyDbIdx64RemoveArgs) GetIterator() int32 { 38419 return p.Iterator 38420 } 38421 func (p *ApplyDbIdx64RemoveArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 38422 if _, err := iprot.ReadStructBegin(ctx); err != nil { 38423 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 38424 } 38425 38426 38427 for { 38428 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 38429 if err != nil { 38430 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 38431 } 38432 if fieldTypeId == thrift.STOP { break; } 38433 switch fieldId { 38434 case 1: 38435 if fieldTypeId == thrift.I32 { 38436 if err := p.ReadField1(ctx, iprot); err != nil { 38437 return err 38438 } 38439 } else { 38440 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38441 return err 38442 } 38443 } 38444 default: 38445 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38446 return err 38447 } 38448 } 38449 if err := iprot.ReadFieldEnd(ctx); err != nil { 38450 return err 38451 } 38452 } 38453 if err := iprot.ReadStructEnd(ctx); err != nil { 38454 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 38455 } 38456 return nil 38457 } 38458 38459 func (p *ApplyDbIdx64RemoveArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 38460 if v, err := iprot.ReadI32(ctx); err != nil { 38461 return thrift.PrependError("error reading field 1: ", err) 38462 } else { 38463 p.Iterator = v 38464 } 38465 return nil 38466 } 38467 38468 func (p *ApplyDbIdx64RemoveArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 38469 if err := oprot.WriteStructBegin(ctx, "db_idx64_remove_args"); err != nil { 38470 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 38471 if p != nil { 38472 if err := p.writeField1(ctx, oprot); err != nil { return err } 38473 } 38474 if err := oprot.WriteFieldStop(ctx); err != nil { 38475 return thrift.PrependError("write field stop error: ", err) } 38476 if err := oprot.WriteStructEnd(ctx); err != nil { 38477 return thrift.PrependError("write struct stop error: ", err) } 38478 return nil 38479 } 38480 38481 func (p *ApplyDbIdx64RemoveArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 38482 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 38483 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 38484 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 38485 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 38486 if err := oprot.WriteFieldEnd(ctx); err != nil { 38487 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 38488 return err 38489 } 38490 38491 func (p *ApplyDbIdx64RemoveArgs) String() string { 38492 if p == nil { 38493 return "<nil>" 38494 } 38495 return fmt.Sprintf("ApplyDbIdx64RemoveArgs(%+v)", *p) 38496 } 38497 38498 type ApplyDbIdx64RemoveResult struct { 38499 } 38500 38501 func NewApplyDbIdx64RemoveResult() *ApplyDbIdx64RemoveResult { 38502 return &ApplyDbIdx64RemoveResult{} 38503 } 38504 38505 func (p *ApplyDbIdx64RemoveResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 38506 if _, err := iprot.ReadStructBegin(ctx); err != nil { 38507 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 38508 } 38509 38510 38511 for { 38512 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 38513 if err != nil { 38514 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 38515 } 38516 if fieldTypeId == thrift.STOP { break; } 38517 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38518 return err 38519 } 38520 if err := iprot.ReadFieldEnd(ctx); err != nil { 38521 return err 38522 } 38523 } 38524 if err := iprot.ReadStructEnd(ctx); err != nil { 38525 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 38526 } 38527 return nil 38528 } 38529 38530 func (p *ApplyDbIdx64RemoveResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 38531 if err := oprot.WriteStructBegin(ctx, "db_idx64_remove_result"); err != nil { 38532 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 38533 if p != nil { 38534 } 38535 if err := oprot.WriteFieldStop(ctx); err != nil { 38536 return thrift.PrependError("write field stop error: ", err) } 38537 if err := oprot.WriteStructEnd(ctx); err != nil { 38538 return thrift.PrependError("write struct stop error: ", err) } 38539 return nil 38540 } 38541 38542 func (p *ApplyDbIdx64RemoveResult) String() string { 38543 if p == nil { 38544 return "<nil>" 38545 } 38546 return fmt.Sprintf("ApplyDbIdx64RemoveResult(%+v)", *p) 38547 } 38548 38549 // Attributes: 38550 // - Iterator 38551 type ApplyDbIdx64NextArgs struct { 38552 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 38553 } 38554 38555 func NewApplyDbIdx64NextArgs() *ApplyDbIdx64NextArgs { 38556 return &ApplyDbIdx64NextArgs{} 38557 } 38558 38559 38560 func (p *ApplyDbIdx64NextArgs) GetIterator() int32 { 38561 return p.Iterator 38562 } 38563 func (p *ApplyDbIdx64NextArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 38564 if _, err := iprot.ReadStructBegin(ctx); err != nil { 38565 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 38566 } 38567 38568 38569 for { 38570 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 38571 if err != nil { 38572 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 38573 } 38574 if fieldTypeId == thrift.STOP { break; } 38575 switch fieldId { 38576 case 1: 38577 if fieldTypeId == thrift.I32 { 38578 if err := p.ReadField1(ctx, iprot); err != nil { 38579 return err 38580 } 38581 } else { 38582 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38583 return err 38584 } 38585 } 38586 default: 38587 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38588 return err 38589 } 38590 } 38591 if err := iprot.ReadFieldEnd(ctx); err != nil { 38592 return err 38593 } 38594 } 38595 if err := iprot.ReadStructEnd(ctx); err != nil { 38596 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 38597 } 38598 return nil 38599 } 38600 38601 func (p *ApplyDbIdx64NextArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 38602 if v, err := iprot.ReadI32(ctx); err != nil { 38603 return thrift.PrependError("error reading field 1: ", err) 38604 } else { 38605 p.Iterator = v 38606 } 38607 return nil 38608 } 38609 38610 func (p *ApplyDbIdx64NextArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 38611 if err := oprot.WriteStructBegin(ctx, "db_idx64_next_args"); err != nil { 38612 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 38613 if p != nil { 38614 if err := p.writeField1(ctx, oprot); err != nil { return err } 38615 } 38616 if err := oprot.WriteFieldStop(ctx); err != nil { 38617 return thrift.PrependError("write field stop error: ", err) } 38618 if err := oprot.WriteStructEnd(ctx); err != nil { 38619 return thrift.PrependError("write struct stop error: ", err) } 38620 return nil 38621 } 38622 38623 func (p *ApplyDbIdx64NextArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 38624 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 38625 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 38626 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 38627 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 38628 if err := oprot.WriteFieldEnd(ctx); err != nil { 38629 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 38630 return err 38631 } 38632 38633 func (p *ApplyDbIdx64NextArgs) String() string { 38634 if p == nil { 38635 return "<nil>" 38636 } 38637 return fmt.Sprintf("ApplyDbIdx64NextArgs(%+v)", *p) 38638 } 38639 38640 // Attributes: 38641 // - Success 38642 type ApplyDbIdx64NextResult struct { 38643 Success *NextPreviousReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 38644 } 38645 38646 func NewApplyDbIdx64NextResult() *ApplyDbIdx64NextResult { 38647 return &ApplyDbIdx64NextResult{} 38648 } 38649 38650 var ApplyDbIdx64NextResult_Success_DEFAULT *NextPreviousReturn 38651 func (p *ApplyDbIdx64NextResult) GetSuccess() *NextPreviousReturn { 38652 if !p.IsSetSuccess() { 38653 return ApplyDbIdx64NextResult_Success_DEFAULT 38654 } 38655 return p.Success 38656 } 38657 func (p *ApplyDbIdx64NextResult) IsSetSuccess() bool { 38658 return p.Success != nil 38659 } 38660 38661 func (p *ApplyDbIdx64NextResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 38662 if _, err := iprot.ReadStructBegin(ctx); err != nil { 38663 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 38664 } 38665 38666 38667 for { 38668 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 38669 if err != nil { 38670 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 38671 } 38672 if fieldTypeId == thrift.STOP { break; } 38673 switch fieldId { 38674 case 0: 38675 if fieldTypeId == thrift.STRUCT { 38676 if err := p.ReadField0(ctx, iprot); err != nil { 38677 return err 38678 } 38679 } else { 38680 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38681 return err 38682 } 38683 } 38684 default: 38685 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38686 return err 38687 } 38688 } 38689 if err := iprot.ReadFieldEnd(ctx); err != nil { 38690 return err 38691 } 38692 } 38693 if err := iprot.ReadStructEnd(ctx); err != nil { 38694 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 38695 } 38696 return nil 38697 } 38698 38699 func (p *ApplyDbIdx64NextResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 38700 p.Success = &NextPreviousReturn{} 38701 if err := p.Success.Read(ctx, iprot); err != nil { 38702 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 38703 } 38704 return nil 38705 } 38706 38707 func (p *ApplyDbIdx64NextResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 38708 if err := oprot.WriteStructBegin(ctx, "db_idx64_next_result"); err != nil { 38709 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 38710 if p != nil { 38711 if err := p.writeField0(ctx, oprot); err != nil { return err } 38712 } 38713 if err := oprot.WriteFieldStop(ctx); err != nil { 38714 return thrift.PrependError("write field stop error: ", err) } 38715 if err := oprot.WriteStructEnd(ctx); err != nil { 38716 return thrift.PrependError("write struct stop error: ", err) } 38717 return nil 38718 } 38719 38720 func (p *ApplyDbIdx64NextResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 38721 if p.IsSetSuccess() { 38722 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 38723 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 38724 if err := p.Success.Write(ctx, oprot); err != nil { 38725 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 38726 } 38727 if err := oprot.WriteFieldEnd(ctx); err != nil { 38728 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 38729 } 38730 return err 38731 } 38732 38733 func (p *ApplyDbIdx64NextResult) String() string { 38734 if p == nil { 38735 return "<nil>" 38736 } 38737 return fmt.Sprintf("ApplyDbIdx64NextResult(%+v)", *p) 38738 } 38739 38740 // Attributes: 38741 // - Iteratory 38742 type ApplyDbIdx64PreviousArgs struct { 38743 Iteratory int32 `thrift:"iteratory,1" db:"iteratory" json:"iteratory"` 38744 } 38745 38746 func NewApplyDbIdx64PreviousArgs() *ApplyDbIdx64PreviousArgs { 38747 return &ApplyDbIdx64PreviousArgs{} 38748 } 38749 38750 38751 func (p *ApplyDbIdx64PreviousArgs) GetIteratory() int32 { 38752 return p.Iteratory 38753 } 38754 func (p *ApplyDbIdx64PreviousArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 38755 if _, err := iprot.ReadStructBegin(ctx); err != nil { 38756 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 38757 } 38758 38759 38760 for { 38761 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 38762 if err != nil { 38763 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 38764 } 38765 if fieldTypeId == thrift.STOP { break; } 38766 switch fieldId { 38767 case 1: 38768 if fieldTypeId == thrift.I32 { 38769 if err := p.ReadField1(ctx, iprot); err != nil { 38770 return err 38771 } 38772 } else { 38773 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38774 return err 38775 } 38776 } 38777 default: 38778 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38779 return err 38780 } 38781 } 38782 if err := iprot.ReadFieldEnd(ctx); err != nil { 38783 return err 38784 } 38785 } 38786 if err := iprot.ReadStructEnd(ctx); err != nil { 38787 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 38788 } 38789 return nil 38790 } 38791 38792 func (p *ApplyDbIdx64PreviousArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 38793 if v, err := iprot.ReadI32(ctx); err != nil { 38794 return thrift.PrependError("error reading field 1: ", err) 38795 } else { 38796 p.Iteratory = v 38797 } 38798 return nil 38799 } 38800 38801 func (p *ApplyDbIdx64PreviousArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 38802 if err := oprot.WriteStructBegin(ctx, "db_idx64_previous_args"); err != nil { 38803 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 38804 if p != nil { 38805 if err := p.writeField1(ctx, oprot); err != nil { return err } 38806 } 38807 if err := oprot.WriteFieldStop(ctx); err != nil { 38808 return thrift.PrependError("write field stop error: ", err) } 38809 if err := oprot.WriteStructEnd(ctx); err != nil { 38810 return thrift.PrependError("write struct stop error: ", err) } 38811 return nil 38812 } 38813 38814 func (p *ApplyDbIdx64PreviousArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 38815 if err := oprot.WriteFieldBegin(ctx, "iteratory", thrift.I32, 1); err != nil { 38816 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iteratory: ", p), err) } 38817 if err := oprot.WriteI32(ctx, int32(p.Iteratory)); err != nil { 38818 return thrift.PrependError(fmt.Sprintf("%T.iteratory (1) field write error: ", p), err) } 38819 if err := oprot.WriteFieldEnd(ctx); err != nil { 38820 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iteratory: ", p), err) } 38821 return err 38822 } 38823 38824 func (p *ApplyDbIdx64PreviousArgs) String() string { 38825 if p == nil { 38826 return "<nil>" 38827 } 38828 return fmt.Sprintf("ApplyDbIdx64PreviousArgs(%+v)", *p) 38829 } 38830 38831 // Attributes: 38832 // - Success 38833 type ApplyDbIdx64PreviousResult struct { 38834 Success *NextPreviousReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 38835 } 38836 38837 func NewApplyDbIdx64PreviousResult() *ApplyDbIdx64PreviousResult { 38838 return &ApplyDbIdx64PreviousResult{} 38839 } 38840 38841 var ApplyDbIdx64PreviousResult_Success_DEFAULT *NextPreviousReturn 38842 func (p *ApplyDbIdx64PreviousResult) GetSuccess() *NextPreviousReturn { 38843 if !p.IsSetSuccess() { 38844 return ApplyDbIdx64PreviousResult_Success_DEFAULT 38845 } 38846 return p.Success 38847 } 38848 func (p *ApplyDbIdx64PreviousResult) IsSetSuccess() bool { 38849 return p.Success != nil 38850 } 38851 38852 func (p *ApplyDbIdx64PreviousResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 38853 if _, err := iprot.ReadStructBegin(ctx); err != nil { 38854 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 38855 } 38856 38857 38858 for { 38859 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 38860 if err != nil { 38861 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 38862 } 38863 if fieldTypeId == thrift.STOP { break; } 38864 switch fieldId { 38865 case 0: 38866 if fieldTypeId == thrift.STRUCT { 38867 if err := p.ReadField0(ctx, iprot); err != nil { 38868 return err 38869 } 38870 } else { 38871 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38872 return err 38873 } 38874 } 38875 default: 38876 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 38877 return err 38878 } 38879 } 38880 if err := iprot.ReadFieldEnd(ctx); err != nil { 38881 return err 38882 } 38883 } 38884 if err := iprot.ReadStructEnd(ctx); err != nil { 38885 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 38886 } 38887 return nil 38888 } 38889 38890 func (p *ApplyDbIdx64PreviousResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 38891 p.Success = &NextPreviousReturn{} 38892 if err := p.Success.Read(ctx, iprot); err != nil { 38893 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 38894 } 38895 return nil 38896 } 38897 38898 func (p *ApplyDbIdx64PreviousResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 38899 if err := oprot.WriteStructBegin(ctx, "db_idx64_previous_result"); err != nil { 38900 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 38901 if p != nil { 38902 if err := p.writeField0(ctx, oprot); err != nil { return err } 38903 } 38904 if err := oprot.WriteFieldStop(ctx); err != nil { 38905 return thrift.PrependError("write field stop error: ", err) } 38906 if err := oprot.WriteStructEnd(ctx); err != nil { 38907 return thrift.PrependError("write struct stop error: ", err) } 38908 return nil 38909 } 38910 38911 func (p *ApplyDbIdx64PreviousResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 38912 if p.IsSetSuccess() { 38913 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 38914 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 38915 if err := p.Success.Write(ctx, oprot); err != nil { 38916 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 38917 } 38918 if err := oprot.WriteFieldEnd(ctx); err != nil { 38919 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 38920 } 38921 return err 38922 } 38923 38924 func (p *ApplyDbIdx64PreviousResult) String() string { 38925 if p == nil { 38926 return "<nil>" 38927 } 38928 return fmt.Sprintf("ApplyDbIdx64PreviousResult(%+v)", *p) 38929 } 38930 38931 // Attributes: 38932 // - Code 38933 // - Scope 38934 // - Table 38935 // - Primary 38936 type ApplyDbIdx64FindPrimaryArgs struct { 38937 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 38938 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 38939 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 38940 Primary *Uint64 `thrift:"primary,4" db:"primary" json:"primary"` 38941 } 38942 38943 func NewApplyDbIdx64FindPrimaryArgs() *ApplyDbIdx64FindPrimaryArgs { 38944 return &ApplyDbIdx64FindPrimaryArgs{} 38945 } 38946 38947 var ApplyDbIdx64FindPrimaryArgs_Code_DEFAULT *Uint64 38948 func (p *ApplyDbIdx64FindPrimaryArgs) GetCode() *Uint64 { 38949 if !p.IsSetCode() { 38950 return ApplyDbIdx64FindPrimaryArgs_Code_DEFAULT 38951 } 38952 return p.Code 38953 } 38954 var ApplyDbIdx64FindPrimaryArgs_Scope_DEFAULT *Uint64 38955 func (p *ApplyDbIdx64FindPrimaryArgs) GetScope() *Uint64 { 38956 if !p.IsSetScope() { 38957 return ApplyDbIdx64FindPrimaryArgs_Scope_DEFAULT 38958 } 38959 return p.Scope 38960 } 38961 var ApplyDbIdx64FindPrimaryArgs_Table_DEFAULT *Uint64 38962 func (p *ApplyDbIdx64FindPrimaryArgs) GetTable() *Uint64 { 38963 if !p.IsSetTable() { 38964 return ApplyDbIdx64FindPrimaryArgs_Table_DEFAULT 38965 } 38966 return p.Table 38967 } 38968 var ApplyDbIdx64FindPrimaryArgs_Primary_DEFAULT *Uint64 38969 func (p *ApplyDbIdx64FindPrimaryArgs) GetPrimary() *Uint64 { 38970 if !p.IsSetPrimary() { 38971 return ApplyDbIdx64FindPrimaryArgs_Primary_DEFAULT 38972 } 38973 return p.Primary 38974 } 38975 func (p *ApplyDbIdx64FindPrimaryArgs) IsSetCode() bool { 38976 return p.Code != nil 38977 } 38978 38979 func (p *ApplyDbIdx64FindPrimaryArgs) IsSetScope() bool { 38980 return p.Scope != nil 38981 } 38982 38983 func (p *ApplyDbIdx64FindPrimaryArgs) IsSetTable() bool { 38984 return p.Table != nil 38985 } 38986 38987 func (p *ApplyDbIdx64FindPrimaryArgs) IsSetPrimary() bool { 38988 return p.Primary != nil 38989 } 38990 38991 func (p *ApplyDbIdx64FindPrimaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 38992 if _, err := iprot.ReadStructBegin(ctx); err != nil { 38993 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 38994 } 38995 38996 38997 for { 38998 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 38999 if err != nil { 39000 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 39001 } 39002 if fieldTypeId == thrift.STOP { break; } 39003 switch fieldId { 39004 case 1: 39005 if fieldTypeId == thrift.STRUCT { 39006 if err := p.ReadField1(ctx, iprot); err != nil { 39007 return err 39008 } 39009 } else { 39010 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39011 return err 39012 } 39013 } 39014 case 2: 39015 if fieldTypeId == thrift.STRUCT { 39016 if err := p.ReadField2(ctx, iprot); err != nil { 39017 return err 39018 } 39019 } else { 39020 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39021 return err 39022 } 39023 } 39024 case 3: 39025 if fieldTypeId == thrift.STRUCT { 39026 if err := p.ReadField3(ctx, iprot); err != nil { 39027 return err 39028 } 39029 } else { 39030 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39031 return err 39032 } 39033 } 39034 case 4: 39035 if fieldTypeId == thrift.STRUCT { 39036 if err := p.ReadField4(ctx, iprot); err != nil { 39037 return err 39038 } 39039 } else { 39040 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39041 return err 39042 } 39043 } 39044 default: 39045 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39046 return err 39047 } 39048 } 39049 if err := iprot.ReadFieldEnd(ctx); err != nil { 39050 return err 39051 } 39052 } 39053 if err := iprot.ReadStructEnd(ctx); err != nil { 39054 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 39055 } 39056 return nil 39057 } 39058 39059 func (p *ApplyDbIdx64FindPrimaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 39060 p.Code = &Uint64{} 39061 if err := p.Code.Read(ctx, iprot); err != nil { 39062 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 39063 } 39064 return nil 39065 } 39066 39067 func (p *ApplyDbIdx64FindPrimaryArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 39068 p.Scope = &Uint64{} 39069 if err := p.Scope.Read(ctx, iprot); err != nil { 39070 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 39071 } 39072 return nil 39073 } 39074 39075 func (p *ApplyDbIdx64FindPrimaryArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 39076 p.Table = &Uint64{} 39077 if err := p.Table.Read(ctx, iprot); err != nil { 39078 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 39079 } 39080 return nil 39081 } 39082 39083 func (p *ApplyDbIdx64FindPrimaryArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 39084 p.Primary = &Uint64{} 39085 if err := p.Primary.Read(ctx, iprot); err != nil { 39086 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 39087 } 39088 return nil 39089 } 39090 39091 func (p *ApplyDbIdx64FindPrimaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 39092 if err := oprot.WriteStructBegin(ctx, "db_idx64_find_primary_args"); err != nil { 39093 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 39094 if p != nil { 39095 if err := p.writeField1(ctx, oprot); err != nil { return err } 39096 if err := p.writeField2(ctx, oprot); err != nil { return err } 39097 if err := p.writeField3(ctx, oprot); err != nil { return err } 39098 if err := p.writeField4(ctx, oprot); err != nil { return err } 39099 } 39100 if err := oprot.WriteFieldStop(ctx); err != nil { 39101 return thrift.PrependError("write field stop error: ", err) } 39102 if err := oprot.WriteStructEnd(ctx); err != nil { 39103 return thrift.PrependError("write struct stop error: ", err) } 39104 return nil 39105 } 39106 39107 func (p *ApplyDbIdx64FindPrimaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 39108 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 39109 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 39110 if err := p.Code.Write(ctx, oprot); err != nil { 39111 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 39112 } 39113 if err := oprot.WriteFieldEnd(ctx); err != nil { 39114 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 39115 return err 39116 } 39117 39118 func (p *ApplyDbIdx64FindPrimaryArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 39119 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 39120 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 39121 if err := p.Scope.Write(ctx, oprot); err != nil { 39122 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 39123 } 39124 if err := oprot.WriteFieldEnd(ctx); err != nil { 39125 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 39126 return err 39127 } 39128 39129 func (p *ApplyDbIdx64FindPrimaryArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 39130 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 39131 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 39132 if err := p.Table.Write(ctx, oprot); err != nil { 39133 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 39134 } 39135 if err := oprot.WriteFieldEnd(ctx); err != nil { 39136 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 39137 return err 39138 } 39139 39140 func (p *ApplyDbIdx64FindPrimaryArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 39141 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 4); err != nil { 39142 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:primary: ", p), err) } 39143 if err := p.Primary.Write(ctx, oprot); err != nil { 39144 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 39145 } 39146 if err := oprot.WriteFieldEnd(ctx); err != nil { 39147 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:primary: ", p), err) } 39148 return err 39149 } 39150 39151 func (p *ApplyDbIdx64FindPrimaryArgs) String() string { 39152 if p == nil { 39153 return "<nil>" 39154 } 39155 return fmt.Sprintf("ApplyDbIdx64FindPrimaryArgs(%+v)", *p) 39156 } 39157 39158 // Attributes: 39159 // - Success 39160 type ApplyDbIdx64FindPrimaryResult struct { 39161 Success *FindPrimaryReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 39162 } 39163 39164 func NewApplyDbIdx64FindPrimaryResult() *ApplyDbIdx64FindPrimaryResult { 39165 return &ApplyDbIdx64FindPrimaryResult{} 39166 } 39167 39168 var ApplyDbIdx64FindPrimaryResult_Success_DEFAULT *FindPrimaryReturn 39169 func (p *ApplyDbIdx64FindPrimaryResult) GetSuccess() *FindPrimaryReturn { 39170 if !p.IsSetSuccess() { 39171 return ApplyDbIdx64FindPrimaryResult_Success_DEFAULT 39172 } 39173 return p.Success 39174 } 39175 func (p *ApplyDbIdx64FindPrimaryResult) IsSetSuccess() bool { 39176 return p.Success != nil 39177 } 39178 39179 func (p *ApplyDbIdx64FindPrimaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 39180 if _, err := iprot.ReadStructBegin(ctx); err != nil { 39181 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 39182 } 39183 39184 39185 for { 39186 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 39187 if err != nil { 39188 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 39189 } 39190 if fieldTypeId == thrift.STOP { break; } 39191 switch fieldId { 39192 case 0: 39193 if fieldTypeId == thrift.STRUCT { 39194 if err := p.ReadField0(ctx, iprot); err != nil { 39195 return err 39196 } 39197 } else { 39198 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39199 return err 39200 } 39201 } 39202 default: 39203 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39204 return err 39205 } 39206 } 39207 if err := iprot.ReadFieldEnd(ctx); err != nil { 39208 return err 39209 } 39210 } 39211 if err := iprot.ReadStructEnd(ctx); err != nil { 39212 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 39213 } 39214 return nil 39215 } 39216 39217 func (p *ApplyDbIdx64FindPrimaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 39218 p.Success = &FindPrimaryReturn{} 39219 if err := p.Success.Read(ctx, iprot); err != nil { 39220 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 39221 } 39222 return nil 39223 } 39224 39225 func (p *ApplyDbIdx64FindPrimaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 39226 if err := oprot.WriteStructBegin(ctx, "db_idx64_find_primary_result"); err != nil { 39227 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 39228 if p != nil { 39229 if err := p.writeField0(ctx, oprot); err != nil { return err } 39230 } 39231 if err := oprot.WriteFieldStop(ctx); err != nil { 39232 return thrift.PrependError("write field stop error: ", err) } 39233 if err := oprot.WriteStructEnd(ctx); err != nil { 39234 return thrift.PrependError("write struct stop error: ", err) } 39235 return nil 39236 } 39237 39238 func (p *ApplyDbIdx64FindPrimaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 39239 if p.IsSetSuccess() { 39240 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 39241 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 39242 if err := p.Success.Write(ctx, oprot); err != nil { 39243 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 39244 } 39245 if err := oprot.WriteFieldEnd(ctx); err != nil { 39246 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 39247 } 39248 return err 39249 } 39250 39251 func (p *ApplyDbIdx64FindPrimaryResult) String() string { 39252 if p == nil { 39253 return "<nil>" 39254 } 39255 return fmt.Sprintf("ApplyDbIdx64FindPrimaryResult(%+v)", *p) 39256 } 39257 39258 // Attributes: 39259 // - Code 39260 // - Scope 39261 // - Table 39262 // - Secondary 39263 type ApplyDbIdx64FindSecondaryArgs struct { 39264 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 39265 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 39266 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 39267 Secondary *Uint64 `thrift:"secondary,4" db:"secondary" json:"secondary"` 39268 } 39269 39270 func NewApplyDbIdx64FindSecondaryArgs() *ApplyDbIdx64FindSecondaryArgs { 39271 return &ApplyDbIdx64FindSecondaryArgs{} 39272 } 39273 39274 var ApplyDbIdx64FindSecondaryArgs_Code_DEFAULT *Uint64 39275 func (p *ApplyDbIdx64FindSecondaryArgs) GetCode() *Uint64 { 39276 if !p.IsSetCode() { 39277 return ApplyDbIdx64FindSecondaryArgs_Code_DEFAULT 39278 } 39279 return p.Code 39280 } 39281 var ApplyDbIdx64FindSecondaryArgs_Scope_DEFAULT *Uint64 39282 func (p *ApplyDbIdx64FindSecondaryArgs) GetScope() *Uint64 { 39283 if !p.IsSetScope() { 39284 return ApplyDbIdx64FindSecondaryArgs_Scope_DEFAULT 39285 } 39286 return p.Scope 39287 } 39288 var ApplyDbIdx64FindSecondaryArgs_Table_DEFAULT *Uint64 39289 func (p *ApplyDbIdx64FindSecondaryArgs) GetTable() *Uint64 { 39290 if !p.IsSetTable() { 39291 return ApplyDbIdx64FindSecondaryArgs_Table_DEFAULT 39292 } 39293 return p.Table 39294 } 39295 var ApplyDbIdx64FindSecondaryArgs_Secondary_DEFAULT *Uint64 39296 func (p *ApplyDbIdx64FindSecondaryArgs) GetSecondary() *Uint64 { 39297 if !p.IsSetSecondary() { 39298 return ApplyDbIdx64FindSecondaryArgs_Secondary_DEFAULT 39299 } 39300 return p.Secondary 39301 } 39302 func (p *ApplyDbIdx64FindSecondaryArgs) IsSetCode() bool { 39303 return p.Code != nil 39304 } 39305 39306 func (p *ApplyDbIdx64FindSecondaryArgs) IsSetScope() bool { 39307 return p.Scope != nil 39308 } 39309 39310 func (p *ApplyDbIdx64FindSecondaryArgs) IsSetTable() bool { 39311 return p.Table != nil 39312 } 39313 39314 func (p *ApplyDbIdx64FindSecondaryArgs) IsSetSecondary() bool { 39315 return p.Secondary != nil 39316 } 39317 39318 func (p *ApplyDbIdx64FindSecondaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 39319 if _, err := iprot.ReadStructBegin(ctx); err != nil { 39320 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 39321 } 39322 39323 39324 for { 39325 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 39326 if err != nil { 39327 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 39328 } 39329 if fieldTypeId == thrift.STOP { break; } 39330 switch fieldId { 39331 case 1: 39332 if fieldTypeId == thrift.STRUCT { 39333 if err := p.ReadField1(ctx, iprot); err != nil { 39334 return err 39335 } 39336 } else { 39337 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39338 return err 39339 } 39340 } 39341 case 2: 39342 if fieldTypeId == thrift.STRUCT { 39343 if err := p.ReadField2(ctx, iprot); err != nil { 39344 return err 39345 } 39346 } else { 39347 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39348 return err 39349 } 39350 } 39351 case 3: 39352 if fieldTypeId == thrift.STRUCT { 39353 if err := p.ReadField3(ctx, iprot); err != nil { 39354 return err 39355 } 39356 } else { 39357 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39358 return err 39359 } 39360 } 39361 case 4: 39362 if fieldTypeId == thrift.STRUCT { 39363 if err := p.ReadField4(ctx, iprot); err != nil { 39364 return err 39365 } 39366 } else { 39367 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39368 return err 39369 } 39370 } 39371 default: 39372 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39373 return err 39374 } 39375 } 39376 if err := iprot.ReadFieldEnd(ctx); err != nil { 39377 return err 39378 } 39379 } 39380 if err := iprot.ReadStructEnd(ctx); err != nil { 39381 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 39382 } 39383 return nil 39384 } 39385 39386 func (p *ApplyDbIdx64FindSecondaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 39387 p.Code = &Uint64{} 39388 if err := p.Code.Read(ctx, iprot); err != nil { 39389 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 39390 } 39391 return nil 39392 } 39393 39394 func (p *ApplyDbIdx64FindSecondaryArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 39395 p.Scope = &Uint64{} 39396 if err := p.Scope.Read(ctx, iprot); err != nil { 39397 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 39398 } 39399 return nil 39400 } 39401 39402 func (p *ApplyDbIdx64FindSecondaryArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 39403 p.Table = &Uint64{} 39404 if err := p.Table.Read(ctx, iprot); err != nil { 39405 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 39406 } 39407 return nil 39408 } 39409 39410 func (p *ApplyDbIdx64FindSecondaryArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 39411 p.Secondary = &Uint64{} 39412 if err := p.Secondary.Read(ctx, iprot); err != nil { 39413 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Secondary), err) 39414 } 39415 return nil 39416 } 39417 39418 func (p *ApplyDbIdx64FindSecondaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 39419 if err := oprot.WriteStructBegin(ctx, "db_idx64_find_secondary_args"); err != nil { 39420 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 39421 if p != nil { 39422 if err := p.writeField1(ctx, oprot); err != nil { return err } 39423 if err := p.writeField2(ctx, oprot); err != nil { return err } 39424 if err := p.writeField3(ctx, oprot); err != nil { return err } 39425 if err := p.writeField4(ctx, oprot); err != nil { return err } 39426 } 39427 if err := oprot.WriteFieldStop(ctx); err != nil { 39428 return thrift.PrependError("write field stop error: ", err) } 39429 if err := oprot.WriteStructEnd(ctx); err != nil { 39430 return thrift.PrependError("write struct stop error: ", err) } 39431 return nil 39432 } 39433 39434 func (p *ApplyDbIdx64FindSecondaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 39435 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 39436 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 39437 if err := p.Code.Write(ctx, oprot); err != nil { 39438 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 39439 } 39440 if err := oprot.WriteFieldEnd(ctx); err != nil { 39441 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 39442 return err 39443 } 39444 39445 func (p *ApplyDbIdx64FindSecondaryArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 39446 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 39447 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 39448 if err := p.Scope.Write(ctx, oprot); err != nil { 39449 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 39450 } 39451 if err := oprot.WriteFieldEnd(ctx); err != nil { 39452 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 39453 return err 39454 } 39455 39456 func (p *ApplyDbIdx64FindSecondaryArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 39457 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 39458 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 39459 if err := p.Table.Write(ctx, oprot); err != nil { 39460 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 39461 } 39462 if err := oprot.WriteFieldEnd(ctx); err != nil { 39463 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 39464 return err 39465 } 39466 39467 func (p *ApplyDbIdx64FindSecondaryArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 39468 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRUCT, 4); err != nil { 39469 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondary: ", p), err) } 39470 if err := p.Secondary.Write(ctx, oprot); err != nil { 39471 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Secondary), err) 39472 } 39473 if err := oprot.WriteFieldEnd(ctx); err != nil { 39474 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondary: ", p), err) } 39475 return err 39476 } 39477 39478 func (p *ApplyDbIdx64FindSecondaryArgs) String() string { 39479 if p == nil { 39480 return "<nil>" 39481 } 39482 return fmt.Sprintf("ApplyDbIdx64FindSecondaryArgs(%+v)", *p) 39483 } 39484 39485 // Attributes: 39486 // - Success 39487 type ApplyDbIdx64FindSecondaryResult struct { 39488 Success *FindSecondaryReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 39489 } 39490 39491 func NewApplyDbIdx64FindSecondaryResult() *ApplyDbIdx64FindSecondaryResult { 39492 return &ApplyDbIdx64FindSecondaryResult{} 39493 } 39494 39495 var ApplyDbIdx64FindSecondaryResult_Success_DEFAULT *FindSecondaryReturn 39496 func (p *ApplyDbIdx64FindSecondaryResult) GetSuccess() *FindSecondaryReturn { 39497 if !p.IsSetSuccess() { 39498 return ApplyDbIdx64FindSecondaryResult_Success_DEFAULT 39499 } 39500 return p.Success 39501 } 39502 func (p *ApplyDbIdx64FindSecondaryResult) IsSetSuccess() bool { 39503 return p.Success != nil 39504 } 39505 39506 func (p *ApplyDbIdx64FindSecondaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 39507 if _, err := iprot.ReadStructBegin(ctx); err != nil { 39508 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 39509 } 39510 39511 39512 for { 39513 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 39514 if err != nil { 39515 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 39516 } 39517 if fieldTypeId == thrift.STOP { break; } 39518 switch fieldId { 39519 case 0: 39520 if fieldTypeId == thrift.STRUCT { 39521 if err := p.ReadField0(ctx, iprot); err != nil { 39522 return err 39523 } 39524 } else { 39525 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39526 return err 39527 } 39528 } 39529 default: 39530 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39531 return err 39532 } 39533 } 39534 if err := iprot.ReadFieldEnd(ctx); err != nil { 39535 return err 39536 } 39537 } 39538 if err := iprot.ReadStructEnd(ctx); err != nil { 39539 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 39540 } 39541 return nil 39542 } 39543 39544 func (p *ApplyDbIdx64FindSecondaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 39545 p.Success = &FindSecondaryReturn{} 39546 if err := p.Success.Read(ctx, iprot); err != nil { 39547 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 39548 } 39549 return nil 39550 } 39551 39552 func (p *ApplyDbIdx64FindSecondaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 39553 if err := oprot.WriteStructBegin(ctx, "db_idx64_find_secondary_result"); err != nil { 39554 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 39555 if p != nil { 39556 if err := p.writeField0(ctx, oprot); err != nil { return err } 39557 } 39558 if err := oprot.WriteFieldStop(ctx); err != nil { 39559 return thrift.PrependError("write field stop error: ", err) } 39560 if err := oprot.WriteStructEnd(ctx); err != nil { 39561 return thrift.PrependError("write struct stop error: ", err) } 39562 return nil 39563 } 39564 39565 func (p *ApplyDbIdx64FindSecondaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 39566 if p.IsSetSuccess() { 39567 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 39568 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 39569 if err := p.Success.Write(ctx, oprot); err != nil { 39570 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 39571 } 39572 if err := oprot.WriteFieldEnd(ctx); err != nil { 39573 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 39574 } 39575 return err 39576 } 39577 39578 func (p *ApplyDbIdx64FindSecondaryResult) String() string { 39579 if p == nil { 39580 return "<nil>" 39581 } 39582 return fmt.Sprintf("ApplyDbIdx64FindSecondaryResult(%+v)", *p) 39583 } 39584 39585 // Attributes: 39586 // - Code 39587 // - Scope 39588 // - Table 39589 // - Secondary 39590 // - Primary 39591 type ApplyDbIdx64LowerboundArgs struct { 39592 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 39593 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 39594 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 39595 Secondary *Uint64 `thrift:"secondary,4" db:"secondary" json:"secondary"` 39596 Primary *Uint64 `thrift:"primary,5" db:"primary" json:"primary"` 39597 } 39598 39599 func NewApplyDbIdx64LowerboundArgs() *ApplyDbIdx64LowerboundArgs { 39600 return &ApplyDbIdx64LowerboundArgs{} 39601 } 39602 39603 var ApplyDbIdx64LowerboundArgs_Code_DEFAULT *Uint64 39604 func (p *ApplyDbIdx64LowerboundArgs) GetCode() *Uint64 { 39605 if !p.IsSetCode() { 39606 return ApplyDbIdx64LowerboundArgs_Code_DEFAULT 39607 } 39608 return p.Code 39609 } 39610 var ApplyDbIdx64LowerboundArgs_Scope_DEFAULT *Uint64 39611 func (p *ApplyDbIdx64LowerboundArgs) GetScope() *Uint64 { 39612 if !p.IsSetScope() { 39613 return ApplyDbIdx64LowerboundArgs_Scope_DEFAULT 39614 } 39615 return p.Scope 39616 } 39617 var ApplyDbIdx64LowerboundArgs_Table_DEFAULT *Uint64 39618 func (p *ApplyDbIdx64LowerboundArgs) GetTable() *Uint64 { 39619 if !p.IsSetTable() { 39620 return ApplyDbIdx64LowerboundArgs_Table_DEFAULT 39621 } 39622 return p.Table 39623 } 39624 var ApplyDbIdx64LowerboundArgs_Secondary_DEFAULT *Uint64 39625 func (p *ApplyDbIdx64LowerboundArgs) GetSecondary() *Uint64 { 39626 if !p.IsSetSecondary() { 39627 return ApplyDbIdx64LowerboundArgs_Secondary_DEFAULT 39628 } 39629 return p.Secondary 39630 } 39631 var ApplyDbIdx64LowerboundArgs_Primary_DEFAULT *Uint64 39632 func (p *ApplyDbIdx64LowerboundArgs) GetPrimary() *Uint64 { 39633 if !p.IsSetPrimary() { 39634 return ApplyDbIdx64LowerboundArgs_Primary_DEFAULT 39635 } 39636 return p.Primary 39637 } 39638 func (p *ApplyDbIdx64LowerboundArgs) IsSetCode() bool { 39639 return p.Code != nil 39640 } 39641 39642 func (p *ApplyDbIdx64LowerboundArgs) IsSetScope() bool { 39643 return p.Scope != nil 39644 } 39645 39646 func (p *ApplyDbIdx64LowerboundArgs) IsSetTable() bool { 39647 return p.Table != nil 39648 } 39649 39650 func (p *ApplyDbIdx64LowerboundArgs) IsSetSecondary() bool { 39651 return p.Secondary != nil 39652 } 39653 39654 func (p *ApplyDbIdx64LowerboundArgs) IsSetPrimary() bool { 39655 return p.Primary != nil 39656 } 39657 39658 func (p *ApplyDbIdx64LowerboundArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 39659 if _, err := iprot.ReadStructBegin(ctx); err != nil { 39660 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 39661 } 39662 39663 39664 for { 39665 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 39666 if err != nil { 39667 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 39668 } 39669 if fieldTypeId == thrift.STOP { break; } 39670 switch fieldId { 39671 case 1: 39672 if fieldTypeId == thrift.STRUCT { 39673 if err := p.ReadField1(ctx, iprot); err != nil { 39674 return err 39675 } 39676 } else { 39677 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39678 return err 39679 } 39680 } 39681 case 2: 39682 if fieldTypeId == thrift.STRUCT { 39683 if err := p.ReadField2(ctx, iprot); err != nil { 39684 return err 39685 } 39686 } else { 39687 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39688 return err 39689 } 39690 } 39691 case 3: 39692 if fieldTypeId == thrift.STRUCT { 39693 if err := p.ReadField3(ctx, iprot); err != nil { 39694 return err 39695 } 39696 } else { 39697 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39698 return err 39699 } 39700 } 39701 case 4: 39702 if fieldTypeId == thrift.STRUCT { 39703 if err := p.ReadField4(ctx, iprot); err != nil { 39704 return err 39705 } 39706 } else { 39707 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39708 return err 39709 } 39710 } 39711 case 5: 39712 if fieldTypeId == thrift.STRUCT { 39713 if err := p.ReadField5(ctx, iprot); err != nil { 39714 return err 39715 } 39716 } else { 39717 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39718 return err 39719 } 39720 } 39721 default: 39722 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39723 return err 39724 } 39725 } 39726 if err := iprot.ReadFieldEnd(ctx); err != nil { 39727 return err 39728 } 39729 } 39730 if err := iprot.ReadStructEnd(ctx); err != nil { 39731 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 39732 } 39733 return nil 39734 } 39735 39736 func (p *ApplyDbIdx64LowerboundArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 39737 p.Code = &Uint64{} 39738 if err := p.Code.Read(ctx, iprot); err != nil { 39739 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 39740 } 39741 return nil 39742 } 39743 39744 func (p *ApplyDbIdx64LowerboundArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 39745 p.Scope = &Uint64{} 39746 if err := p.Scope.Read(ctx, iprot); err != nil { 39747 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 39748 } 39749 return nil 39750 } 39751 39752 func (p *ApplyDbIdx64LowerboundArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 39753 p.Table = &Uint64{} 39754 if err := p.Table.Read(ctx, iprot); err != nil { 39755 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 39756 } 39757 return nil 39758 } 39759 39760 func (p *ApplyDbIdx64LowerboundArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 39761 p.Secondary = &Uint64{} 39762 if err := p.Secondary.Read(ctx, iprot); err != nil { 39763 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Secondary), err) 39764 } 39765 return nil 39766 } 39767 39768 func (p *ApplyDbIdx64LowerboundArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 39769 p.Primary = &Uint64{} 39770 if err := p.Primary.Read(ctx, iprot); err != nil { 39771 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 39772 } 39773 return nil 39774 } 39775 39776 func (p *ApplyDbIdx64LowerboundArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 39777 if err := oprot.WriteStructBegin(ctx, "db_idx64_lowerbound_args"); err != nil { 39778 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 39779 if p != nil { 39780 if err := p.writeField1(ctx, oprot); err != nil { return err } 39781 if err := p.writeField2(ctx, oprot); err != nil { return err } 39782 if err := p.writeField3(ctx, oprot); err != nil { return err } 39783 if err := p.writeField4(ctx, oprot); err != nil { return err } 39784 if err := p.writeField5(ctx, oprot); err != nil { return err } 39785 } 39786 if err := oprot.WriteFieldStop(ctx); err != nil { 39787 return thrift.PrependError("write field stop error: ", err) } 39788 if err := oprot.WriteStructEnd(ctx); err != nil { 39789 return thrift.PrependError("write struct stop error: ", err) } 39790 return nil 39791 } 39792 39793 func (p *ApplyDbIdx64LowerboundArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 39794 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 39795 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 39796 if err := p.Code.Write(ctx, oprot); err != nil { 39797 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 39798 } 39799 if err := oprot.WriteFieldEnd(ctx); err != nil { 39800 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 39801 return err 39802 } 39803 39804 func (p *ApplyDbIdx64LowerboundArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 39805 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 39806 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 39807 if err := p.Scope.Write(ctx, oprot); err != nil { 39808 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 39809 } 39810 if err := oprot.WriteFieldEnd(ctx); err != nil { 39811 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 39812 return err 39813 } 39814 39815 func (p *ApplyDbIdx64LowerboundArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 39816 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 39817 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 39818 if err := p.Table.Write(ctx, oprot); err != nil { 39819 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 39820 } 39821 if err := oprot.WriteFieldEnd(ctx); err != nil { 39822 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 39823 return err 39824 } 39825 39826 func (p *ApplyDbIdx64LowerboundArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 39827 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRUCT, 4); err != nil { 39828 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondary: ", p), err) } 39829 if err := p.Secondary.Write(ctx, oprot); err != nil { 39830 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Secondary), err) 39831 } 39832 if err := oprot.WriteFieldEnd(ctx); err != nil { 39833 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondary: ", p), err) } 39834 return err 39835 } 39836 39837 func (p *ApplyDbIdx64LowerboundArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 39838 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 5); err != nil { 39839 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:primary: ", p), err) } 39840 if err := p.Primary.Write(ctx, oprot); err != nil { 39841 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 39842 } 39843 if err := oprot.WriteFieldEnd(ctx); err != nil { 39844 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:primary: ", p), err) } 39845 return err 39846 } 39847 39848 func (p *ApplyDbIdx64LowerboundArgs) String() string { 39849 if p == nil { 39850 return "<nil>" 39851 } 39852 return fmt.Sprintf("ApplyDbIdx64LowerboundArgs(%+v)", *p) 39853 } 39854 39855 // Attributes: 39856 // - Success 39857 type ApplyDbIdx64LowerboundResult struct { 39858 Success *LowerBoundUpperBoundReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 39859 } 39860 39861 func NewApplyDbIdx64LowerboundResult() *ApplyDbIdx64LowerboundResult { 39862 return &ApplyDbIdx64LowerboundResult{} 39863 } 39864 39865 var ApplyDbIdx64LowerboundResult_Success_DEFAULT *LowerBoundUpperBoundReturn 39866 func (p *ApplyDbIdx64LowerboundResult) GetSuccess() *LowerBoundUpperBoundReturn { 39867 if !p.IsSetSuccess() { 39868 return ApplyDbIdx64LowerboundResult_Success_DEFAULT 39869 } 39870 return p.Success 39871 } 39872 func (p *ApplyDbIdx64LowerboundResult) IsSetSuccess() bool { 39873 return p.Success != nil 39874 } 39875 39876 func (p *ApplyDbIdx64LowerboundResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 39877 if _, err := iprot.ReadStructBegin(ctx); err != nil { 39878 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 39879 } 39880 39881 39882 for { 39883 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 39884 if err != nil { 39885 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 39886 } 39887 if fieldTypeId == thrift.STOP { break; } 39888 switch fieldId { 39889 case 0: 39890 if fieldTypeId == thrift.STRUCT { 39891 if err := p.ReadField0(ctx, iprot); err != nil { 39892 return err 39893 } 39894 } else { 39895 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39896 return err 39897 } 39898 } 39899 default: 39900 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 39901 return err 39902 } 39903 } 39904 if err := iprot.ReadFieldEnd(ctx); err != nil { 39905 return err 39906 } 39907 } 39908 if err := iprot.ReadStructEnd(ctx); err != nil { 39909 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 39910 } 39911 return nil 39912 } 39913 39914 func (p *ApplyDbIdx64LowerboundResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 39915 p.Success = &LowerBoundUpperBoundReturn{} 39916 if err := p.Success.Read(ctx, iprot); err != nil { 39917 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 39918 } 39919 return nil 39920 } 39921 39922 func (p *ApplyDbIdx64LowerboundResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 39923 if err := oprot.WriteStructBegin(ctx, "db_idx64_lowerbound_result"); err != nil { 39924 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 39925 if p != nil { 39926 if err := p.writeField0(ctx, oprot); err != nil { return err } 39927 } 39928 if err := oprot.WriteFieldStop(ctx); err != nil { 39929 return thrift.PrependError("write field stop error: ", err) } 39930 if err := oprot.WriteStructEnd(ctx); err != nil { 39931 return thrift.PrependError("write struct stop error: ", err) } 39932 return nil 39933 } 39934 39935 func (p *ApplyDbIdx64LowerboundResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 39936 if p.IsSetSuccess() { 39937 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 39938 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 39939 if err := p.Success.Write(ctx, oprot); err != nil { 39940 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 39941 } 39942 if err := oprot.WriteFieldEnd(ctx); err != nil { 39943 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 39944 } 39945 return err 39946 } 39947 39948 func (p *ApplyDbIdx64LowerboundResult) String() string { 39949 if p == nil { 39950 return "<nil>" 39951 } 39952 return fmt.Sprintf("ApplyDbIdx64LowerboundResult(%+v)", *p) 39953 } 39954 39955 // Attributes: 39956 // - Code 39957 // - Scope 39958 // - Table 39959 // - Secondary 39960 // - Primary 39961 type ApplyDbIdx64UpperboundArgs struct { 39962 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 39963 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 39964 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 39965 Secondary *Uint64 `thrift:"secondary,4" db:"secondary" json:"secondary"` 39966 Primary *Uint64 `thrift:"primary,5" db:"primary" json:"primary"` 39967 } 39968 39969 func NewApplyDbIdx64UpperboundArgs() *ApplyDbIdx64UpperboundArgs { 39970 return &ApplyDbIdx64UpperboundArgs{} 39971 } 39972 39973 var ApplyDbIdx64UpperboundArgs_Code_DEFAULT *Uint64 39974 func (p *ApplyDbIdx64UpperboundArgs) GetCode() *Uint64 { 39975 if !p.IsSetCode() { 39976 return ApplyDbIdx64UpperboundArgs_Code_DEFAULT 39977 } 39978 return p.Code 39979 } 39980 var ApplyDbIdx64UpperboundArgs_Scope_DEFAULT *Uint64 39981 func (p *ApplyDbIdx64UpperboundArgs) GetScope() *Uint64 { 39982 if !p.IsSetScope() { 39983 return ApplyDbIdx64UpperboundArgs_Scope_DEFAULT 39984 } 39985 return p.Scope 39986 } 39987 var ApplyDbIdx64UpperboundArgs_Table_DEFAULT *Uint64 39988 func (p *ApplyDbIdx64UpperboundArgs) GetTable() *Uint64 { 39989 if !p.IsSetTable() { 39990 return ApplyDbIdx64UpperboundArgs_Table_DEFAULT 39991 } 39992 return p.Table 39993 } 39994 var ApplyDbIdx64UpperboundArgs_Secondary_DEFAULT *Uint64 39995 func (p *ApplyDbIdx64UpperboundArgs) GetSecondary() *Uint64 { 39996 if !p.IsSetSecondary() { 39997 return ApplyDbIdx64UpperboundArgs_Secondary_DEFAULT 39998 } 39999 return p.Secondary 40000 } 40001 var ApplyDbIdx64UpperboundArgs_Primary_DEFAULT *Uint64 40002 func (p *ApplyDbIdx64UpperboundArgs) GetPrimary() *Uint64 { 40003 if !p.IsSetPrimary() { 40004 return ApplyDbIdx64UpperboundArgs_Primary_DEFAULT 40005 } 40006 return p.Primary 40007 } 40008 func (p *ApplyDbIdx64UpperboundArgs) IsSetCode() bool { 40009 return p.Code != nil 40010 } 40011 40012 func (p *ApplyDbIdx64UpperboundArgs) IsSetScope() bool { 40013 return p.Scope != nil 40014 } 40015 40016 func (p *ApplyDbIdx64UpperboundArgs) IsSetTable() bool { 40017 return p.Table != nil 40018 } 40019 40020 func (p *ApplyDbIdx64UpperboundArgs) IsSetSecondary() bool { 40021 return p.Secondary != nil 40022 } 40023 40024 func (p *ApplyDbIdx64UpperboundArgs) IsSetPrimary() bool { 40025 return p.Primary != nil 40026 } 40027 40028 func (p *ApplyDbIdx64UpperboundArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 40029 if _, err := iprot.ReadStructBegin(ctx); err != nil { 40030 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 40031 } 40032 40033 40034 for { 40035 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 40036 if err != nil { 40037 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 40038 } 40039 if fieldTypeId == thrift.STOP { break; } 40040 switch fieldId { 40041 case 1: 40042 if fieldTypeId == thrift.STRUCT { 40043 if err := p.ReadField1(ctx, iprot); err != nil { 40044 return err 40045 } 40046 } else { 40047 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40048 return err 40049 } 40050 } 40051 case 2: 40052 if fieldTypeId == thrift.STRUCT { 40053 if err := p.ReadField2(ctx, iprot); err != nil { 40054 return err 40055 } 40056 } else { 40057 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40058 return err 40059 } 40060 } 40061 case 3: 40062 if fieldTypeId == thrift.STRUCT { 40063 if err := p.ReadField3(ctx, iprot); err != nil { 40064 return err 40065 } 40066 } else { 40067 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40068 return err 40069 } 40070 } 40071 case 4: 40072 if fieldTypeId == thrift.STRUCT { 40073 if err := p.ReadField4(ctx, iprot); err != nil { 40074 return err 40075 } 40076 } else { 40077 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40078 return err 40079 } 40080 } 40081 case 5: 40082 if fieldTypeId == thrift.STRUCT { 40083 if err := p.ReadField5(ctx, iprot); err != nil { 40084 return err 40085 } 40086 } else { 40087 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40088 return err 40089 } 40090 } 40091 default: 40092 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40093 return err 40094 } 40095 } 40096 if err := iprot.ReadFieldEnd(ctx); err != nil { 40097 return err 40098 } 40099 } 40100 if err := iprot.ReadStructEnd(ctx); err != nil { 40101 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 40102 } 40103 return nil 40104 } 40105 40106 func (p *ApplyDbIdx64UpperboundArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 40107 p.Code = &Uint64{} 40108 if err := p.Code.Read(ctx, iprot); err != nil { 40109 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 40110 } 40111 return nil 40112 } 40113 40114 func (p *ApplyDbIdx64UpperboundArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 40115 p.Scope = &Uint64{} 40116 if err := p.Scope.Read(ctx, iprot); err != nil { 40117 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 40118 } 40119 return nil 40120 } 40121 40122 func (p *ApplyDbIdx64UpperboundArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 40123 p.Table = &Uint64{} 40124 if err := p.Table.Read(ctx, iprot); err != nil { 40125 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 40126 } 40127 return nil 40128 } 40129 40130 func (p *ApplyDbIdx64UpperboundArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 40131 p.Secondary = &Uint64{} 40132 if err := p.Secondary.Read(ctx, iprot); err != nil { 40133 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Secondary), err) 40134 } 40135 return nil 40136 } 40137 40138 func (p *ApplyDbIdx64UpperboundArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 40139 p.Primary = &Uint64{} 40140 if err := p.Primary.Read(ctx, iprot); err != nil { 40141 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 40142 } 40143 return nil 40144 } 40145 40146 func (p *ApplyDbIdx64UpperboundArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 40147 if err := oprot.WriteStructBegin(ctx, "db_idx64_upperbound_args"); err != nil { 40148 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 40149 if p != nil { 40150 if err := p.writeField1(ctx, oprot); err != nil { return err } 40151 if err := p.writeField2(ctx, oprot); err != nil { return err } 40152 if err := p.writeField3(ctx, oprot); err != nil { return err } 40153 if err := p.writeField4(ctx, oprot); err != nil { return err } 40154 if err := p.writeField5(ctx, oprot); err != nil { return err } 40155 } 40156 if err := oprot.WriteFieldStop(ctx); err != nil { 40157 return thrift.PrependError("write field stop error: ", err) } 40158 if err := oprot.WriteStructEnd(ctx); err != nil { 40159 return thrift.PrependError("write struct stop error: ", err) } 40160 return nil 40161 } 40162 40163 func (p *ApplyDbIdx64UpperboundArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 40164 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 40165 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 40166 if err := p.Code.Write(ctx, oprot); err != nil { 40167 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 40168 } 40169 if err := oprot.WriteFieldEnd(ctx); err != nil { 40170 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 40171 return err 40172 } 40173 40174 func (p *ApplyDbIdx64UpperboundArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 40175 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 40176 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 40177 if err := p.Scope.Write(ctx, oprot); err != nil { 40178 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 40179 } 40180 if err := oprot.WriteFieldEnd(ctx); err != nil { 40181 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 40182 return err 40183 } 40184 40185 func (p *ApplyDbIdx64UpperboundArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 40186 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 40187 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 40188 if err := p.Table.Write(ctx, oprot); err != nil { 40189 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 40190 } 40191 if err := oprot.WriteFieldEnd(ctx); err != nil { 40192 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 40193 return err 40194 } 40195 40196 func (p *ApplyDbIdx64UpperboundArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 40197 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRUCT, 4); err != nil { 40198 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondary: ", p), err) } 40199 if err := p.Secondary.Write(ctx, oprot); err != nil { 40200 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Secondary), err) 40201 } 40202 if err := oprot.WriteFieldEnd(ctx); err != nil { 40203 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondary: ", p), err) } 40204 return err 40205 } 40206 40207 func (p *ApplyDbIdx64UpperboundArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 40208 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 5); err != nil { 40209 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:primary: ", p), err) } 40210 if err := p.Primary.Write(ctx, oprot); err != nil { 40211 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 40212 } 40213 if err := oprot.WriteFieldEnd(ctx); err != nil { 40214 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:primary: ", p), err) } 40215 return err 40216 } 40217 40218 func (p *ApplyDbIdx64UpperboundArgs) String() string { 40219 if p == nil { 40220 return "<nil>" 40221 } 40222 return fmt.Sprintf("ApplyDbIdx64UpperboundArgs(%+v)", *p) 40223 } 40224 40225 // Attributes: 40226 // - Success 40227 type ApplyDbIdx64UpperboundResult struct { 40228 Success *LowerBoundUpperBoundReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 40229 } 40230 40231 func NewApplyDbIdx64UpperboundResult() *ApplyDbIdx64UpperboundResult { 40232 return &ApplyDbIdx64UpperboundResult{} 40233 } 40234 40235 var ApplyDbIdx64UpperboundResult_Success_DEFAULT *LowerBoundUpperBoundReturn 40236 func (p *ApplyDbIdx64UpperboundResult) GetSuccess() *LowerBoundUpperBoundReturn { 40237 if !p.IsSetSuccess() { 40238 return ApplyDbIdx64UpperboundResult_Success_DEFAULT 40239 } 40240 return p.Success 40241 } 40242 func (p *ApplyDbIdx64UpperboundResult) IsSetSuccess() bool { 40243 return p.Success != nil 40244 } 40245 40246 func (p *ApplyDbIdx64UpperboundResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 40247 if _, err := iprot.ReadStructBegin(ctx); err != nil { 40248 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 40249 } 40250 40251 40252 for { 40253 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 40254 if err != nil { 40255 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 40256 } 40257 if fieldTypeId == thrift.STOP { break; } 40258 switch fieldId { 40259 case 0: 40260 if fieldTypeId == thrift.STRUCT { 40261 if err := p.ReadField0(ctx, iprot); err != nil { 40262 return err 40263 } 40264 } else { 40265 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40266 return err 40267 } 40268 } 40269 default: 40270 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40271 return err 40272 } 40273 } 40274 if err := iprot.ReadFieldEnd(ctx); err != nil { 40275 return err 40276 } 40277 } 40278 if err := iprot.ReadStructEnd(ctx); err != nil { 40279 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 40280 } 40281 return nil 40282 } 40283 40284 func (p *ApplyDbIdx64UpperboundResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 40285 p.Success = &LowerBoundUpperBoundReturn{} 40286 if err := p.Success.Read(ctx, iprot); err != nil { 40287 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 40288 } 40289 return nil 40290 } 40291 40292 func (p *ApplyDbIdx64UpperboundResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 40293 if err := oprot.WriteStructBegin(ctx, "db_idx64_upperbound_result"); err != nil { 40294 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 40295 if p != nil { 40296 if err := p.writeField0(ctx, oprot); err != nil { return err } 40297 } 40298 if err := oprot.WriteFieldStop(ctx); err != nil { 40299 return thrift.PrependError("write field stop error: ", err) } 40300 if err := oprot.WriteStructEnd(ctx); err != nil { 40301 return thrift.PrependError("write struct stop error: ", err) } 40302 return nil 40303 } 40304 40305 func (p *ApplyDbIdx64UpperboundResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 40306 if p.IsSetSuccess() { 40307 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 40308 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 40309 if err := p.Success.Write(ctx, oprot); err != nil { 40310 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 40311 } 40312 if err := oprot.WriteFieldEnd(ctx); err != nil { 40313 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 40314 } 40315 return err 40316 } 40317 40318 func (p *ApplyDbIdx64UpperboundResult) String() string { 40319 if p == nil { 40320 return "<nil>" 40321 } 40322 return fmt.Sprintf("ApplyDbIdx64UpperboundResult(%+v)", *p) 40323 } 40324 40325 // Attributes: 40326 // - Code 40327 // - Scope 40328 // - Table 40329 type ApplyDbIdx64EndArgs struct { 40330 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 40331 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 40332 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 40333 } 40334 40335 func NewApplyDbIdx64EndArgs() *ApplyDbIdx64EndArgs { 40336 return &ApplyDbIdx64EndArgs{} 40337 } 40338 40339 var ApplyDbIdx64EndArgs_Code_DEFAULT *Uint64 40340 func (p *ApplyDbIdx64EndArgs) GetCode() *Uint64 { 40341 if !p.IsSetCode() { 40342 return ApplyDbIdx64EndArgs_Code_DEFAULT 40343 } 40344 return p.Code 40345 } 40346 var ApplyDbIdx64EndArgs_Scope_DEFAULT *Uint64 40347 func (p *ApplyDbIdx64EndArgs) GetScope() *Uint64 { 40348 if !p.IsSetScope() { 40349 return ApplyDbIdx64EndArgs_Scope_DEFAULT 40350 } 40351 return p.Scope 40352 } 40353 var ApplyDbIdx64EndArgs_Table_DEFAULT *Uint64 40354 func (p *ApplyDbIdx64EndArgs) GetTable() *Uint64 { 40355 if !p.IsSetTable() { 40356 return ApplyDbIdx64EndArgs_Table_DEFAULT 40357 } 40358 return p.Table 40359 } 40360 func (p *ApplyDbIdx64EndArgs) IsSetCode() bool { 40361 return p.Code != nil 40362 } 40363 40364 func (p *ApplyDbIdx64EndArgs) IsSetScope() bool { 40365 return p.Scope != nil 40366 } 40367 40368 func (p *ApplyDbIdx64EndArgs) IsSetTable() bool { 40369 return p.Table != nil 40370 } 40371 40372 func (p *ApplyDbIdx64EndArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 40373 if _, err := iprot.ReadStructBegin(ctx); err != nil { 40374 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 40375 } 40376 40377 40378 for { 40379 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 40380 if err != nil { 40381 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 40382 } 40383 if fieldTypeId == thrift.STOP { break; } 40384 switch fieldId { 40385 case 1: 40386 if fieldTypeId == thrift.STRUCT { 40387 if err := p.ReadField1(ctx, iprot); err != nil { 40388 return err 40389 } 40390 } else { 40391 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40392 return err 40393 } 40394 } 40395 case 2: 40396 if fieldTypeId == thrift.STRUCT { 40397 if err := p.ReadField2(ctx, iprot); err != nil { 40398 return err 40399 } 40400 } else { 40401 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40402 return err 40403 } 40404 } 40405 case 3: 40406 if fieldTypeId == thrift.STRUCT { 40407 if err := p.ReadField3(ctx, iprot); err != nil { 40408 return err 40409 } 40410 } else { 40411 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40412 return err 40413 } 40414 } 40415 default: 40416 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40417 return err 40418 } 40419 } 40420 if err := iprot.ReadFieldEnd(ctx); err != nil { 40421 return err 40422 } 40423 } 40424 if err := iprot.ReadStructEnd(ctx); err != nil { 40425 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 40426 } 40427 return nil 40428 } 40429 40430 func (p *ApplyDbIdx64EndArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 40431 p.Code = &Uint64{} 40432 if err := p.Code.Read(ctx, iprot); err != nil { 40433 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 40434 } 40435 return nil 40436 } 40437 40438 func (p *ApplyDbIdx64EndArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 40439 p.Scope = &Uint64{} 40440 if err := p.Scope.Read(ctx, iprot); err != nil { 40441 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 40442 } 40443 return nil 40444 } 40445 40446 func (p *ApplyDbIdx64EndArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 40447 p.Table = &Uint64{} 40448 if err := p.Table.Read(ctx, iprot); err != nil { 40449 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 40450 } 40451 return nil 40452 } 40453 40454 func (p *ApplyDbIdx64EndArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 40455 if err := oprot.WriteStructBegin(ctx, "db_idx64_end_args"); err != nil { 40456 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 40457 if p != nil { 40458 if err := p.writeField1(ctx, oprot); err != nil { return err } 40459 if err := p.writeField2(ctx, oprot); err != nil { return err } 40460 if err := p.writeField3(ctx, oprot); err != nil { return err } 40461 } 40462 if err := oprot.WriteFieldStop(ctx); err != nil { 40463 return thrift.PrependError("write field stop error: ", err) } 40464 if err := oprot.WriteStructEnd(ctx); err != nil { 40465 return thrift.PrependError("write struct stop error: ", err) } 40466 return nil 40467 } 40468 40469 func (p *ApplyDbIdx64EndArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 40470 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 40471 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 40472 if err := p.Code.Write(ctx, oprot); err != nil { 40473 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 40474 } 40475 if err := oprot.WriteFieldEnd(ctx); err != nil { 40476 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 40477 return err 40478 } 40479 40480 func (p *ApplyDbIdx64EndArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 40481 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 40482 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 40483 if err := p.Scope.Write(ctx, oprot); err != nil { 40484 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 40485 } 40486 if err := oprot.WriteFieldEnd(ctx); err != nil { 40487 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 40488 return err 40489 } 40490 40491 func (p *ApplyDbIdx64EndArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 40492 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 40493 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 40494 if err := p.Table.Write(ctx, oprot); err != nil { 40495 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 40496 } 40497 if err := oprot.WriteFieldEnd(ctx); err != nil { 40498 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 40499 return err 40500 } 40501 40502 func (p *ApplyDbIdx64EndArgs) String() string { 40503 if p == nil { 40504 return "<nil>" 40505 } 40506 return fmt.Sprintf("ApplyDbIdx64EndArgs(%+v)", *p) 40507 } 40508 40509 // Attributes: 40510 // - Success 40511 type ApplyDbIdx64EndResult struct { 40512 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 40513 } 40514 40515 func NewApplyDbIdx64EndResult() *ApplyDbIdx64EndResult { 40516 return &ApplyDbIdx64EndResult{} 40517 } 40518 40519 var ApplyDbIdx64EndResult_Success_DEFAULT int32 40520 func (p *ApplyDbIdx64EndResult) GetSuccess() int32 { 40521 if !p.IsSetSuccess() { 40522 return ApplyDbIdx64EndResult_Success_DEFAULT 40523 } 40524 return *p.Success 40525 } 40526 func (p *ApplyDbIdx64EndResult) IsSetSuccess() bool { 40527 return p.Success != nil 40528 } 40529 40530 func (p *ApplyDbIdx64EndResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 40531 if _, err := iprot.ReadStructBegin(ctx); err != nil { 40532 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 40533 } 40534 40535 40536 for { 40537 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 40538 if err != nil { 40539 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 40540 } 40541 if fieldTypeId == thrift.STOP { break; } 40542 switch fieldId { 40543 case 0: 40544 if fieldTypeId == thrift.I32 { 40545 if err := p.ReadField0(ctx, iprot); err != nil { 40546 return err 40547 } 40548 } else { 40549 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40550 return err 40551 } 40552 } 40553 default: 40554 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40555 return err 40556 } 40557 } 40558 if err := iprot.ReadFieldEnd(ctx); err != nil { 40559 return err 40560 } 40561 } 40562 if err := iprot.ReadStructEnd(ctx); err != nil { 40563 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 40564 } 40565 return nil 40566 } 40567 40568 func (p *ApplyDbIdx64EndResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 40569 if v, err := iprot.ReadI32(ctx); err != nil { 40570 return thrift.PrependError("error reading field 0: ", err) 40571 } else { 40572 p.Success = &v 40573 } 40574 return nil 40575 } 40576 40577 func (p *ApplyDbIdx64EndResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 40578 if err := oprot.WriteStructBegin(ctx, "db_idx64_end_result"); err != nil { 40579 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 40580 if p != nil { 40581 if err := p.writeField0(ctx, oprot); err != nil { return err } 40582 } 40583 if err := oprot.WriteFieldStop(ctx); err != nil { 40584 return thrift.PrependError("write field stop error: ", err) } 40585 if err := oprot.WriteStructEnd(ctx); err != nil { 40586 return thrift.PrependError("write struct stop error: ", err) } 40587 return nil 40588 } 40589 40590 func (p *ApplyDbIdx64EndResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 40591 if p.IsSetSuccess() { 40592 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 40593 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 40594 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 40595 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 40596 if err := oprot.WriteFieldEnd(ctx); err != nil { 40597 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 40598 } 40599 return err 40600 } 40601 40602 func (p *ApplyDbIdx64EndResult) String() string { 40603 if p == nil { 40604 return "<nil>" 40605 } 40606 return fmt.Sprintf("ApplyDbIdx64EndResult(%+v)", *p) 40607 } 40608 40609 // Attributes: 40610 // - Scope 40611 // - Table 40612 // - Payer 40613 // - ID 40614 // - Secondary 40615 type ApplyDbIdx128StoreArgs struct { 40616 Scope *Uint64 `thrift:"scope,1" db:"scope" json:"scope"` 40617 Table *Uint64 `thrift:"table,2" db:"table" json:"table"` 40618 Payer *Uint64 `thrift:"payer,3" db:"payer" json:"payer"` 40619 ID *Uint64 `thrift:"id,4" db:"id" json:"id"` 40620 Secondary []byte `thrift:"secondary,5" db:"secondary" json:"secondary"` 40621 } 40622 40623 func NewApplyDbIdx128StoreArgs() *ApplyDbIdx128StoreArgs { 40624 return &ApplyDbIdx128StoreArgs{} 40625 } 40626 40627 var ApplyDbIdx128StoreArgs_Scope_DEFAULT *Uint64 40628 func (p *ApplyDbIdx128StoreArgs) GetScope() *Uint64 { 40629 if !p.IsSetScope() { 40630 return ApplyDbIdx128StoreArgs_Scope_DEFAULT 40631 } 40632 return p.Scope 40633 } 40634 var ApplyDbIdx128StoreArgs_Table_DEFAULT *Uint64 40635 func (p *ApplyDbIdx128StoreArgs) GetTable() *Uint64 { 40636 if !p.IsSetTable() { 40637 return ApplyDbIdx128StoreArgs_Table_DEFAULT 40638 } 40639 return p.Table 40640 } 40641 var ApplyDbIdx128StoreArgs_Payer_DEFAULT *Uint64 40642 func (p *ApplyDbIdx128StoreArgs) GetPayer() *Uint64 { 40643 if !p.IsSetPayer() { 40644 return ApplyDbIdx128StoreArgs_Payer_DEFAULT 40645 } 40646 return p.Payer 40647 } 40648 var ApplyDbIdx128StoreArgs_ID_DEFAULT *Uint64 40649 func (p *ApplyDbIdx128StoreArgs) GetID() *Uint64 { 40650 if !p.IsSetID() { 40651 return ApplyDbIdx128StoreArgs_ID_DEFAULT 40652 } 40653 return p.ID 40654 } 40655 40656 func (p *ApplyDbIdx128StoreArgs) GetSecondary() []byte { 40657 return p.Secondary 40658 } 40659 func (p *ApplyDbIdx128StoreArgs) IsSetScope() bool { 40660 return p.Scope != nil 40661 } 40662 40663 func (p *ApplyDbIdx128StoreArgs) IsSetTable() bool { 40664 return p.Table != nil 40665 } 40666 40667 func (p *ApplyDbIdx128StoreArgs) IsSetPayer() bool { 40668 return p.Payer != nil 40669 } 40670 40671 func (p *ApplyDbIdx128StoreArgs) IsSetID() bool { 40672 return p.ID != nil 40673 } 40674 40675 func (p *ApplyDbIdx128StoreArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 40676 if _, err := iprot.ReadStructBegin(ctx); err != nil { 40677 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 40678 } 40679 40680 40681 for { 40682 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 40683 if err != nil { 40684 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 40685 } 40686 if fieldTypeId == thrift.STOP { break; } 40687 switch fieldId { 40688 case 1: 40689 if fieldTypeId == thrift.STRUCT { 40690 if err := p.ReadField1(ctx, iprot); err != nil { 40691 return err 40692 } 40693 } else { 40694 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40695 return err 40696 } 40697 } 40698 case 2: 40699 if fieldTypeId == thrift.STRUCT { 40700 if err := p.ReadField2(ctx, iprot); err != nil { 40701 return err 40702 } 40703 } else { 40704 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40705 return err 40706 } 40707 } 40708 case 3: 40709 if fieldTypeId == thrift.STRUCT { 40710 if err := p.ReadField3(ctx, iprot); err != nil { 40711 return err 40712 } 40713 } else { 40714 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40715 return err 40716 } 40717 } 40718 case 4: 40719 if fieldTypeId == thrift.STRUCT { 40720 if err := p.ReadField4(ctx, iprot); err != nil { 40721 return err 40722 } 40723 } else { 40724 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40725 return err 40726 } 40727 } 40728 case 5: 40729 if fieldTypeId == thrift.STRING { 40730 if err := p.ReadField5(ctx, iprot); err != nil { 40731 return err 40732 } 40733 } else { 40734 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40735 return err 40736 } 40737 } 40738 default: 40739 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40740 return err 40741 } 40742 } 40743 if err := iprot.ReadFieldEnd(ctx); err != nil { 40744 return err 40745 } 40746 } 40747 if err := iprot.ReadStructEnd(ctx); err != nil { 40748 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 40749 } 40750 return nil 40751 } 40752 40753 func (p *ApplyDbIdx128StoreArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 40754 p.Scope = &Uint64{} 40755 if err := p.Scope.Read(ctx, iprot); err != nil { 40756 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 40757 } 40758 return nil 40759 } 40760 40761 func (p *ApplyDbIdx128StoreArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 40762 p.Table = &Uint64{} 40763 if err := p.Table.Read(ctx, iprot); err != nil { 40764 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 40765 } 40766 return nil 40767 } 40768 40769 func (p *ApplyDbIdx128StoreArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 40770 p.Payer = &Uint64{} 40771 if err := p.Payer.Read(ctx, iprot); err != nil { 40772 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 40773 } 40774 return nil 40775 } 40776 40777 func (p *ApplyDbIdx128StoreArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 40778 p.ID = &Uint64{} 40779 if err := p.ID.Read(ctx, iprot); err != nil { 40780 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ID), err) 40781 } 40782 return nil 40783 } 40784 40785 func (p *ApplyDbIdx128StoreArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 40786 if v, err := iprot.ReadBinary(ctx); err != nil { 40787 return thrift.PrependError("error reading field 5: ", err) 40788 } else { 40789 p.Secondary = v 40790 } 40791 return nil 40792 } 40793 40794 func (p *ApplyDbIdx128StoreArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 40795 if err := oprot.WriteStructBegin(ctx, "db_idx128_store_args"); err != nil { 40796 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 40797 if p != nil { 40798 if err := p.writeField1(ctx, oprot); err != nil { return err } 40799 if err := p.writeField2(ctx, oprot); err != nil { return err } 40800 if err := p.writeField3(ctx, oprot); err != nil { return err } 40801 if err := p.writeField4(ctx, oprot); err != nil { return err } 40802 if err := p.writeField5(ctx, oprot); err != nil { return err } 40803 } 40804 if err := oprot.WriteFieldStop(ctx); err != nil { 40805 return thrift.PrependError("write field stop error: ", err) } 40806 if err := oprot.WriteStructEnd(ctx); err != nil { 40807 return thrift.PrependError("write struct stop error: ", err) } 40808 return nil 40809 } 40810 40811 func (p *ApplyDbIdx128StoreArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 40812 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 1); err != nil { 40813 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:scope: ", p), err) } 40814 if err := p.Scope.Write(ctx, oprot); err != nil { 40815 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 40816 } 40817 if err := oprot.WriteFieldEnd(ctx); err != nil { 40818 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:scope: ", p), err) } 40819 return err 40820 } 40821 40822 func (p *ApplyDbIdx128StoreArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 40823 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 2); err != nil { 40824 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:table: ", p), err) } 40825 if err := p.Table.Write(ctx, oprot); err != nil { 40826 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 40827 } 40828 if err := oprot.WriteFieldEnd(ctx); err != nil { 40829 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:table: ", p), err) } 40830 return err 40831 } 40832 40833 func (p *ApplyDbIdx128StoreArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 40834 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 3); err != nil { 40835 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:payer: ", p), err) } 40836 if err := p.Payer.Write(ctx, oprot); err != nil { 40837 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 40838 } 40839 if err := oprot.WriteFieldEnd(ctx); err != nil { 40840 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:payer: ", p), err) } 40841 return err 40842 } 40843 40844 func (p *ApplyDbIdx128StoreArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 40845 if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRUCT, 4); err != nil { 40846 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err) } 40847 if err := p.ID.Write(ctx, oprot); err != nil { 40848 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ID), err) 40849 } 40850 if err := oprot.WriteFieldEnd(ctx); err != nil { 40851 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err) } 40852 return err 40853 } 40854 40855 func (p *ApplyDbIdx128StoreArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 40856 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 5); err != nil { 40857 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:secondary: ", p), err) } 40858 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 40859 return thrift.PrependError(fmt.Sprintf("%T.secondary (5) field write error: ", p), err) } 40860 if err := oprot.WriteFieldEnd(ctx); err != nil { 40861 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:secondary: ", p), err) } 40862 return err 40863 } 40864 40865 func (p *ApplyDbIdx128StoreArgs) String() string { 40866 if p == nil { 40867 return "<nil>" 40868 } 40869 return fmt.Sprintf("ApplyDbIdx128StoreArgs(%+v)", *p) 40870 } 40871 40872 // Attributes: 40873 // - Success 40874 type ApplyDbIdx128StoreResult struct { 40875 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 40876 } 40877 40878 func NewApplyDbIdx128StoreResult() *ApplyDbIdx128StoreResult { 40879 return &ApplyDbIdx128StoreResult{} 40880 } 40881 40882 var ApplyDbIdx128StoreResult_Success_DEFAULT int32 40883 func (p *ApplyDbIdx128StoreResult) GetSuccess() int32 { 40884 if !p.IsSetSuccess() { 40885 return ApplyDbIdx128StoreResult_Success_DEFAULT 40886 } 40887 return *p.Success 40888 } 40889 func (p *ApplyDbIdx128StoreResult) IsSetSuccess() bool { 40890 return p.Success != nil 40891 } 40892 40893 func (p *ApplyDbIdx128StoreResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 40894 if _, err := iprot.ReadStructBegin(ctx); err != nil { 40895 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 40896 } 40897 40898 40899 for { 40900 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 40901 if err != nil { 40902 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 40903 } 40904 if fieldTypeId == thrift.STOP { break; } 40905 switch fieldId { 40906 case 0: 40907 if fieldTypeId == thrift.I32 { 40908 if err := p.ReadField0(ctx, iprot); err != nil { 40909 return err 40910 } 40911 } else { 40912 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40913 return err 40914 } 40915 } 40916 default: 40917 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 40918 return err 40919 } 40920 } 40921 if err := iprot.ReadFieldEnd(ctx); err != nil { 40922 return err 40923 } 40924 } 40925 if err := iprot.ReadStructEnd(ctx); err != nil { 40926 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 40927 } 40928 return nil 40929 } 40930 40931 func (p *ApplyDbIdx128StoreResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 40932 if v, err := iprot.ReadI32(ctx); err != nil { 40933 return thrift.PrependError("error reading field 0: ", err) 40934 } else { 40935 p.Success = &v 40936 } 40937 return nil 40938 } 40939 40940 func (p *ApplyDbIdx128StoreResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 40941 if err := oprot.WriteStructBegin(ctx, "db_idx128_store_result"); err != nil { 40942 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 40943 if p != nil { 40944 if err := p.writeField0(ctx, oprot); err != nil { return err } 40945 } 40946 if err := oprot.WriteFieldStop(ctx); err != nil { 40947 return thrift.PrependError("write field stop error: ", err) } 40948 if err := oprot.WriteStructEnd(ctx); err != nil { 40949 return thrift.PrependError("write struct stop error: ", err) } 40950 return nil 40951 } 40952 40953 func (p *ApplyDbIdx128StoreResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 40954 if p.IsSetSuccess() { 40955 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 40956 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 40957 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 40958 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 40959 if err := oprot.WriteFieldEnd(ctx); err != nil { 40960 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 40961 } 40962 return err 40963 } 40964 40965 func (p *ApplyDbIdx128StoreResult) String() string { 40966 if p == nil { 40967 return "<nil>" 40968 } 40969 return fmt.Sprintf("ApplyDbIdx128StoreResult(%+v)", *p) 40970 } 40971 40972 // Attributes: 40973 // - Iterator 40974 // - Payer 40975 // - Secondary 40976 type ApplyDbIdx128UpdateArgs struct { 40977 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 40978 Payer *Uint64 `thrift:"payer,2" db:"payer" json:"payer"` 40979 Secondary []byte `thrift:"secondary,3" db:"secondary" json:"secondary"` 40980 } 40981 40982 func NewApplyDbIdx128UpdateArgs() *ApplyDbIdx128UpdateArgs { 40983 return &ApplyDbIdx128UpdateArgs{} 40984 } 40985 40986 40987 func (p *ApplyDbIdx128UpdateArgs) GetIterator() int32 { 40988 return p.Iterator 40989 } 40990 var ApplyDbIdx128UpdateArgs_Payer_DEFAULT *Uint64 40991 func (p *ApplyDbIdx128UpdateArgs) GetPayer() *Uint64 { 40992 if !p.IsSetPayer() { 40993 return ApplyDbIdx128UpdateArgs_Payer_DEFAULT 40994 } 40995 return p.Payer 40996 } 40997 40998 func (p *ApplyDbIdx128UpdateArgs) GetSecondary() []byte { 40999 return p.Secondary 41000 } 41001 func (p *ApplyDbIdx128UpdateArgs) IsSetPayer() bool { 41002 return p.Payer != nil 41003 } 41004 41005 func (p *ApplyDbIdx128UpdateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 41006 if _, err := iprot.ReadStructBegin(ctx); err != nil { 41007 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 41008 } 41009 41010 41011 for { 41012 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 41013 if err != nil { 41014 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 41015 } 41016 if fieldTypeId == thrift.STOP { break; } 41017 switch fieldId { 41018 case 1: 41019 if fieldTypeId == thrift.I32 { 41020 if err := p.ReadField1(ctx, iprot); err != nil { 41021 return err 41022 } 41023 } else { 41024 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41025 return err 41026 } 41027 } 41028 case 2: 41029 if fieldTypeId == thrift.STRUCT { 41030 if err := p.ReadField2(ctx, iprot); err != nil { 41031 return err 41032 } 41033 } else { 41034 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41035 return err 41036 } 41037 } 41038 case 3: 41039 if fieldTypeId == thrift.STRING { 41040 if err := p.ReadField3(ctx, iprot); err != nil { 41041 return err 41042 } 41043 } else { 41044 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41045 return err 41046 } 41047 } 41048 default: 41049 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41050 return err 41051 } 41052 } 41053 if err := iprot.ReadFieldEnd(ctx); err != nil { 41054 return err 41055 } 41056 } 41057 if err := iprot.ReadStructEnd(ctx); err != nil { 41058 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 41059 } 41060 return nil 41061 } 41062 41063 func (p *ApplyDbIdx128UpdateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 41064 if v, err := iprot.ReadI32(ctx); err != nil { 41065 return thrift.PrependError("error reading field 1: ", err) 41066 } else { 41067 p.Iterator = v 41068 } 41069 return nil 41070 } 41071 41072 func (p *ApplyDbIdx128UpdateArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 41073 p.Payer = &Uint64{} 41074 if err := p.Payer.Read(ctx, iprot); err != nil { 41075 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 41076 } 41077 return nil 41078 } 41079 41080 func (p *ApplyDbIdx128UpdateArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 41081 if v, err := iprot.ReadBinary(ctx); err != nil { 41082 return thrift.PrependError("error reading field 3: ", err) 41083 } else { 41084 p.Secondary = v 41085 } 41086 return nil 41087 } 41088 41089 func (p *ApplyDbIdx128UpdateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 41090 if err := oprot.WriteStructBegin(ctx, "db_idx128_update_args"); err != nil { 41091 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 41092 if p != nil { 41093 if err := p.writeField1(ctx, oprot); err != nil { return err } 41094 if err := p.writeField2(ctx, oprot); err != nil { return err } 41095 if err := p.writeField3(ctx, oprot); err != nil { return err } 41096 } 41097 if err := oprot.WriteFieldStop(ctx); err != nil { 41098 return thrift.PrependError("write field stop error: ", err) } 41099 if err := oprot.WriteStructEnd(ctx); err != nil { 41100 return thrift.PrependError("write struct stop error: ", err) } 41101 return nil 41102 } 41103 41104 func (p *ApplyDbIdx128UpdateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 41105 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 41106 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 41107 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 41108 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 41109 if err := oprot.WriteFieldEnd(ctx); err != nil { 41110 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 41111 return err 41112 } 41113 41114 func (p *ApplyDbIdx128UpdateArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 41115 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 2); err != nil { 41116 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:payer: ", p), err) } 41117 if err := p.Payer.Write(ctx, oprot); err != nil { 41118 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 41119 } 41120 if err := oprot.WriteFieldEnd(ctx); err != nil { 41121 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:payer: ", p), err) } 41122 return err 41123 } 41124 41125 func (p *ApplyDbIdx128UpdateArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 41126 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 3); err != nil { 41127 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:secondary: ", p), err) } 41128 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 41129 return thrift.PrependError(fmt.Sprintf("%T.secondary (3) field write error: ", p), err) } 41130 if err := oprot.WriteFieldEnd(ctx); err != nil { 41131 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:secondary: ", p), err) } 41132 return err 41133 } 41134 41135 func (p *ApplyDbIdx128UpdateArgs) String() string { 41136 if p == nil { 41137 return "<nil>" 41138 } 41139 return fmt.Sprintf("ApplyDbIdx128UpdateArgs(%+v)", *p) 41140 } 41141 41142 type ApplyDbIdx128UpdateResult struct { 41143 } 41144 41145 func NewApplyDbIdx128UpdateResult() *ApplyDbIdx128UpdateResult { 41146 return &ApplyDbIdx128UpdateResult{} 41147 } 41148 41149 func (p *ApplyDbIdx128UpdateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 41150 if _, err := iprot.ReadStructBegin(ctx); err != nil { 41151 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 41152 } 41153 41154 41155 for { 41156 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 41157 if err != nil { 41158 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 41159 } 41160 if fieldTypeId == thrift.STOP { break; } 41161 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41162 return err 41163 } 41164 if err := iprot.ReadFieldEnd(ctx); err != nil { 41165 return err 41166 } 41167 } 41168 if err := iprot.ReadStructEnd(ctx); err != nil { 41169 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 41170 } 41171 return nil 41172 } 41173 41174 func (p *ApplyDbIdx128UpdateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 41175 if err := oprot.WriteStructBegin(ctx, "db_idx128_update_result"); err != nil { 41176 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 41177 if p != nil { 41178 } 41179 if err := oprot.WriteFieldStop(ctx); err != nil { 41180 return thrift.PrependError("write field stop error: ", err) } 41181 if err := oprot.WriteStructEnd(ctx); err != nil { 41182 return thrift.PrependError("write struct stop error: ", err) } 41183 return nil 41184 } 41185 41186 func (p *ApplyDbIdx128UpdateResult) String() string { 41187 if p == nil { 41188 return "<nil>" 41189 } 41190 return fmt.Sprintf("ApplyDbIdx128UpdateResult(%+v)", *p) 41191 } 41192 41193 // Attributes: 41194 // - Iterator 41195 type ApplyDbIdx128RemoveArgs struct { 41196 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 41197 } 41198 41199 func NewApplyDbIdx128RemoveArgs() *ApplyDbIdx128RemoveArgs { 41200 return &ApplyDbIdx128RemoveArgs{} 41201 } 41202 41203 41204 func (p *ApplyDbIdx128RemoveArgs) GetIterator() int32 { 41205 return p.Iterator 41206 } 41207 func (p *ApplyDbIdx128RemoveArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 41208 if _, err := iprot.ReadStructBegin(ctx); err != nil { 41209 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 41210 } 41211 41212 41213 for { 41214 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 41215 if err != nil { 41216 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 41217 } 41218 if fieldTypeId == thrift.STOP { break; } 41219 switch fieldId { 41220 case 1: 41221 if fieldTypeId == thrift.I32 { 41222 if err := p.ReadField1(ctx, iprot); err != nil { 41223 return err 41224 } 41225 } else { 41226 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41227 return err 41228 } 41229 } 41230 default: 41231 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41232 return err 41233 } 41234 } 41235 if err := iprot.ReadFieldEnd(ctx); err != nil { 41236 return err 41237 } 41238 } 41239 if err := iprot.ReadStructEnd(ctx); err != nil { 41240 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 41241 } 41242 return nil 41243 } 41244 41245 func (p *ApplyDbIdx128RemoveArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 41246 if v, err := iprot.ReadI32(ctx); err != nil { 41247 return thrift.PrependError("error reading field 1: ", err) 41248 } else { 41249 p.Iterator = v 41250 } 41251 return nil 41252 } 41253 41254 func (p *ApplyDbIdx128RemoveArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 41255 if err := oprot.WriteStructBegin(ctx, "db_idx128_remove_args"); err != nil { 41256 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 41257 if p != nil { 41258 if err := p.writeField1(ctx, oprot); err != nil { return err } 41259 } 41260 if err := oprot.WriteFieldStop(ctx); err != nil { 41261 return thrift.PrependError("write field stop error: ", err) } 41262 if err := oprot.WriteStructEnd(ctx); err != nil { 41263 return thrift.PrependError("write struct stop error: ", err) } 41264 return nil 41265 } 41266 41267 func (p *ApplyDbIdx128RemoveArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 41268 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 41269 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 41270 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 41271 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 41272 if err := oprot.WriteFieldEnd(ctx); err != nil { 41273 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 41274 return err 41275 } 41276 41277 func (p *ApplyDbIdx128RemoveArgs) String() string { 41278 if p == nil { 41279 return "<nil>" 41280 } 41281 return fmt.Sprintf("ApplyDbIdx128RemoveArgs(%+v)", *p) 41282 } 41283 41284 type ApplyDbIdx128RemoveResult struct { 41285 } 41286 41287 func NewApplyDbIdx128RemoveResult() *ApplyDbIdx128RemoveResult { 41288 return &ApplyDbIdx128RemoveResult{} 41289 } 41290 41291 func (p *ApplyDbIdx128RemoveResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 41292 if _, err := iprot.ReadStructBegin(ctx); err != nil { 41293 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 41294 } 41295 41296 41297 for { 41298 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 41299 if err != nil { 41300 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 41301 } 41302 if fieldTypeId == thrift.STOP { break; } 41303 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41304 return err 41305 } 41306 if err := iprot.ReadFieldEnd(ctx); err != nil { 41307 return err 41308 } 41309 } 41310 if err := iprot.ReadStructEnd(ctx); err != nil { 41311 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 41312 } 41313 return nil 41314 } 41315 41316 func (p *ApplyDbIdx128RemoveResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 41317 if err := oprot.WriteStructBegin(ctx, "db_idx128_remove_result"); err != nil { 41318 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 41319 if p != nil { 41320 } 41321 if err := oprot.WriteFieldStop(ctx); err != nil { 41322 return thrift.PrependError("write field stop error: ", err) } 41323 if err := oprot.WriteStructEnd(ctx); err != nil { 41324 return thrift.PrependError("write struct stop error: ", err) } 41325 return nil 41326 } 41327 41328 func (p *ApplyDbIdx128RemoveResult) String() string { 41329 if p == nil { 41330 return "<nil>" 41331 } 41332 return fmt.Sprintf("ApplyDbIdx128RemoveResult(%+v)", *p) 41333 } 41334 41335 // Attributes: 41336 // - Iterator 41337 type ApplyDbIdx128NextArgs struct { 41338 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 41339 } 41340 41341 func NewApplyDbIdx128NextArgs() *ApplyDbIdx128NextArgs { 41342 return &ApplyDbIdx128NextArgs{} 41343 } 41344 41345 41346 func (p *ApplyDbIdx128NextArgs) GetIterator() int32 { 41347 return p.Iterator 41348 } 41349 func (p *ApplyDbIdx128NextArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 41350 if _, err := iprot.ReadStructBegin(ctx); err != nil { 41351 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 41352 } 41353 41354 41355 for { 41356 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 41357 if err != nil { 41358 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 41359 } 41360 if fieldTypeId == thrift.STOP { break; } 41361 switch fieldId { 41362 case 1: 41363 if fieldTypeId == thrift.I32 { 41364 if err := p.ReadField1(ctx, iprot); err != nil { 41365 return err 41366 } 41367 } else { 41368 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41369 return err 41370 } 41371 } 41372 default: 41373 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41374 return err 41375 } 41376 } 41377 if err := iprot.ReadFieldEnd(ctx); err != nil { 41378 return err 41379 } 41380 } 41381 if err := iprot.ReadStructEnd(ctx); err != nil { 41382 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 41383 } 41384 return nil 41385 } 41386 41387 func (p *ApplyDbIdx128NextArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 41388 if v, err := iprot.ReadI32(ctx); err != nil { 41389 return thrift.PrependError("error reading field 1: ", err) 41390 } else { 41391 p.Iterator = v 41392 } 41393 return nil 41394 } 41395 41396 func (p *ApplyDbIdx128NextArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 41397 if err := oprot.WriteStructBegin(ctx, "db_idx128_next_args"); err != nil { 41398 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 41399 if p != nil { 41400 if err := p.writeField1(ctx, oprot); err != nil { return err } 41401 } 41402 if err := oprot.WriteFieldStop(ctx); err != nil { 41403 return thrift.PrependError("write field stop error: ", err) } 41404 if err := oprot.WriteStructEnd(ctx); err != nil { 41405 return thrift.PrependError("write struct stop error: ", err) } 41406 return nil 41407 } 41408 41409 func (p *ApplyDbIdx128NextArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 41410 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 41411 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 41412 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 41413 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 41414 if err := oprot.WriteFieldEnd(ctx); err != nil { 41415 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 41416 return err 41417 } 41418 41419 func (p *ApplyDbIdx128NextArgs) String() string { 41420 if p == nil { 41421 return "<nil>" 41422 } 41423 return fmt.Sprintf("ApplyDbIdx128NextArgs(%+v)", *p) 41424 } 41425 41426 // Attributes: 41427 // - Success 41428 type ApplyDbIdx128NextResult struct { 41429 Success *NextPreviousReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 41430 } 41431 41432 func NewApplyDbIdx128NextResult() *ApplyDbIdx128NextResult { 41433 return &ApplyDbIdx128NextResult{} 41434 } 41435 41436 var ApplyDbIdx128NextResult_Success_DEFAULT *NextPreviousReturn 41437 func (p *ApplyDbIdx128NextResult) GetSuccess() *NextPreviousReturn { 41438 if !p.IsSetSuccess() { 41439 return ApplyDbIdx128NextResult_Success_DEFAULT 41440 } 41441 return p.Success 41442 } 41443 func (p *ApplyDbIdx128NextResult) IsSetSuccess() bool { 41444 return p.Success != nil 41445 } 41446 41447 func (p *ApplyDbIdx128NextResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 41448 if _, err := iprot.ReadStructBegin(ctx); err != nil { 41449 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 41450 } 41451 41452 41453 for { 41454 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 41455 if err != nil { 41456 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 41457 } 41458 if fieldTypeId == thrift.STOP { break; } 41459 switch fieldId { 41460 case 0: 41461 if fieldTypeId == thrift.STRUCT { 41462 if err := p.ReadField0(ctx, iprot); err != nil { 41463 return err 41464 } 41465 } else { 41466 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41467 return err 41468 } 41469 } 41470 default: 41471 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41472 return err 41473 } 41474 } 41475 if err := iprot.ReadFieldEnd(ctx); err != nil { 41476 return err 41477 } 41478 } 41479 if err := iprot.ReadStructEnd(ctx); err != nil { 41480 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 41481 } 41482 return nil 41483 } 41484 41485 func (p *ApplyDbIdx128NextResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 41486 p.Success = &NextPreviousReturn{} 41487 if err := p.Success.Read(ctx, iprot); err != nil { 41488 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 41489 } 41490 return nil 41491 } 41492 41493 func (p *ApplyDbIdx128NextResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 41494 if err := oprot.WriteStructBegin(ctx, "db_idx128_next_result"); err != nil { 41495 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 41496 if p != nil { 41497 if err := p.writeField0(ctx, oprot); err != nil { return err } 41498 } 41499 if err := oprot.WriteFieldStop(ctx); err != nil { 41500 return thrift.PrependError("write field stop error: ", err) } 41501 if err := oprot.WriteStructEnd(ctx); err != nil { 41502 return thrift.PrependError("write struct stop error: ", err) } 41503 return nil 41504 } 41505 41506 func (p *ApplyDbIdx128NextResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 41507 if p.IsSetSuccess() { 41508 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 41509 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 41510 if err := p.Success.Write(ctx, oprot); err != nil { 41511 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 41512 } 41513 if err := oprot.WriteFieldEnd(ctx); err != nil { 41514 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 41515 } 41516 return err 41517 } 41518 41519 func (p *ApplyDbIdx128NextResult) String() string { 41520 if p == nil { 41521 return "<nil>" 41522 } 41523 return fmt.Sprintf("ApplyDbIdx128NextResult(%+v)", *p) 41524 } 41525 41526 // Attributes: 41527 // - Iterator 41528 type ApplyDbIdx128PreviousArgs struct { 41529 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 41530 } 41531 41532 func NewApplyDbIdx128PreviousArgs() *ApplyDbIdx128PreviousArgs { 41533 return &ApplyDbIdx128PreviousArgs{} 41534 } 41535 41536 41537 func (p *ApplyDbIdx128PreviousArgs) GetIterator() int32 { 41538 return p.Iterator 41539 } 41540 func (p *ApplyDbIdx128PreviousArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 41541 if _, err := iprot.ReadStructBegin(ctx); err != nil { 41542 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 41543 } 41544 41545 41546 for { 41547 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 41548 if err != nil { 41549 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 41550 } 41551 if fieldTypeId == thrift.STOP { break; } 41552 switch fieldId { 41553 case 1: 41554 if fieldTypeId == thrift.I32 { 41555 if err := p.ReadField1(ctx, iprot); err != nil { 41556 return err 41557 } 41558 } else { 41559 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41560 return err 41561 } 41562 } 41563 default: 41564 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41565 return err 41566 } 41567 } 41568 if err := iprot.ReadFieldEnd(ctx); err != nil { 41569 return err 41570 } 41571 } 41572 if err := iprot.ReadStructEnd(ctx); err != nil { 41573 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 41574 } 41575 return nil 41576 } 41577 41578 func (p *ApplyDbIdx128PreviousArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 41579 if v, err := iprot.ReadI32(ctx); err != nil { 41580 return thrift.PrependError("error reading field 1: ", err) 41581 } else { 41582 p.Iterator = v 41583 } 41584 return nil 41585 } 41586 41587 func (p *ApplyDbIdx128PreviousArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 41588 if err := oprot.WriteStructBegin(ctx, "db_idx128_previous_args"); err != nil { 41589 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 41590 if p != nil { 41591 if err := p.writeField1(ctx, oprot); err != nil { return err } 41592 } 41593 if err := oprot.WriteFieldStop(ctx); err != nil { 41594 return thrift.PrependError("write field stop error: ", err) } 41595 if err := oprot.WriteStructEnd(ctx); err != nil { 41596 return thrift.PrependError("write struct stop error: ", err) } 41597 return nil 41598 } 41599 41600 func (p *ApplyDbIdx128PreviousArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 41601 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 41602 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 41603 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 41604 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 41605 if err := oprot.WriteFieldEnd(ctx); err != nil { 41606 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 41607 return err 41608 } 41609 41610 func (p *ApplyDbIdx128PreviousArgs) String() string { 41611 if p == nil { 41612 return "<nil>" 41613 } 41614 return fmt.Sprintf("ApplyDbIdx128PreviousArgs(%+v)", *p) 41615 } 41616 41617 // Attributes: 41618 // - Success 41619 type ApplyDbIdx128PreviousResult struct { 41620 Success *NextPreviousReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 41621 } 41622 41623 func NewApplyDbIdx128PreviousResult() *ApplyDbIdx128PreviousResult { 41624 return &ApplyDbIdx128PreviousResult{} 41625 } 41626 41627 var ApplyDbIdx128PreviousResult_Success_DEFAULT *NextPreviousReturn 41628 func (p *ApplyDbIdx128PreviousResult) GetSuccess() *NextPreviousReturn { 41629 if !p.IsSetSuccess() { 41630 return ApplyDbIdx128PreviousResult_Success_DEFAULT 41631 } 41632 return p.Success 41633 } 41634 func (p *ApplyDbIdx128PreviousResult) IsSetSuccess() bool { 41635 return p.Success != nil 41636 } 41637 41638 func (p *ApplyDbIdx128PreviousResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 41639 if _, err := iprot.ReadStructBegin(ctx); err != nil { 41640 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 41641 } 41642 41643 41644 for { 41645 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 41646 if err != nil { 41647 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 41648 } 41649 if fieldTypeId == thrift.STOP { break; } 41650 switch fieldId { 41651 case 0: 41652 if fieldTypeId == thrift.STRUCT { 41653 if err := p.ReadField0(ctx, iprot); err != nil { 41654 return err 41655 } 41656 } else { 41657 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41658 return err 41659 } 41660 } 41661 default: 41662 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41663 return err 41664 } 41665 } 41666 if err := iprot.ReadFieldEnd(ctx); err != nil { 41667 return err 41668 } 41669 } 41670 if err := iprot.ReadStructEnd(ctx); err != nil { 41671 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 41672 } 41673 return nil 41674 } 41675 41676 func (p *ApplyDbIdx128PreviousResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 41677 p.Success = &NextPreviousReturn{} 41678 if err := p.Success.Read(ctx, iprot); err != nil { 41679 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 41680 } 41681 return nil 41682 } 41683 41684 func (p *ApplyDbIdx128PreviousResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 41685 if err := oprot.WriteStructBegin(ctx, "db_idx128_previous_result"); err != nil { 41686 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 41687 if p != nil { 41688 if err := p.writeField0(ctx, oprot); err != nil { return err } 41689 } 41690 if err := oprot.WriteFieldStop(ctx); err != nil { 41691 return thrift.PrependError("write field stop error: ", err) } 41692 if err := oprot.WriteStructEnd(ctx); err != nil { 41693 return thrift.PrependError("write struct stop error: ", err) } 41694 return nil 41695 } 41696 41697 func (p *ApplyDbIdx128PreviousResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 41698 if p.IsSetSuccess() { 41699 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 41700 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 41701 if err := p.Success.Write(ctx, oprot); err != nil { 41702 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 41703 } 41704 if err := oprot.WriteFieldEnd(ctx); err != nil { 41705 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 41706 } 41707 return err 41708 } 41709 41710 func (p *ApplyDbIdx128PreviousResult) String() string { 41711 if p == nil { 41712 return "<nil>" 41713 } 41714 return fmt.Sprintf("ApplyDbIdx128PreviousResult(%+v)", *p) 41715 } 41716 41717 // Attributes: 41718 // - Code 41719 // - Scope 41720 // - Table 41721 // - Primary 41722 type ApplyDbIdx128FindPrimaryArgs struct { 41723 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 41724 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 41725 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 41726 Primary *Uint64 `thrift:"primary,4" db:"primary" json:"primary"` 41727 } 41728 41729 func NewApplyDbIdx128FindPrimaryArgs() *ApplyDbIdx128FindPrimaryArgs { 41730 return &ApplyDbIdx128FindPrimaryArgs{} 41731 } 41732 41733 var ApplyDbIdx128FindPrimaryArgs_Code_DEFAULT *Uint64 41734 func (p *ApplyDbIdx128FindPrimaryArgs) GetCode() *Uint64 { 41735 if !p.IsSetCode() { 41736 return ApplyDbIdx128FindPrimaryArgs_Code_DEFAULT 41737 } 41738 return p.Code 41739 } 41740 var ApplyDbIdx128FindPrimaryArgs_Scope_DEFAULT *Uint64 41741 func (p *ApplyDbIdx128FindPrimaryArgs) GetScope() *Uint64 { 41742 if !p.IsSetScope() { 41743 return ApplyDbIdx128FindPrimaryArgs_Scope_DEFAULT 41744 } 41745 return p.Scope 41746 } 41747 var ApplyDbIdx128FindPrimaryArgs_Table_DEFAULT *Uint64 41748 func (p *ApplyDbIdx128FindPrimaryArgs) GetTable() *Uint64 { 41749 if !p.IsSetTable() { 41750 return ApplyDbIdx128FindPrimaryArgs_Table_DEFAULT 41751 } 41752 return p.Table 41753 } 41754 var ApplyDbIdx128FindPrimaryArgs_Primary_DEFAULT *Uint64 41755 func (p *ApplyDbIdx128FindPrimaryArgs) GetPrimary() *Uint64 { 41756 if !p.IsSetPrimary() { 41757 return ApplyDbIdx128FindPrimaryArgs_Primary_DEFAULT 41758 } 41759 return p.Primary 41760 } 41761 func (p *ApplyDbIdx128FindPrimaryArgs) IsSetCode() bool { 41762 return p.Code != nil 41763 } 41764 41765 func (p *ApplyDbIdx128FindPrimaryArgs) IsSetScope() bool { 41766 return p.Scope != nil 41767 } 41768 41769 func (p *ApplyDbIdx128FindPrimaryArgs) IsSetTable() bool { 41770 return p.Table != nil 41771 } 41772 41773 func (p *ApplyDbIdx128FindPrimaryArgs) IsSetPrimary() bool { 41774 return p.Primary != nil 41775 } 41776 41777 func (p *ApplyDbIdx128FindPrimaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 41778 if _, err := iprot.ReadStructBegin(ctx); err != nil { 41779 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 41780 } 41781 41782 41783 for { 41784 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 41785 if err != nil { 41786 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 41787 } 41788 if fieldTypeId == thrift.STOP { break; } 41789 switch fieldId { 41790 case 1: 41791 if fieldTypeId == thrift.STRUCT { 41792 if err := p.ReadField1(ctx, iprot); err != nil { 41793 return err 41794 } 41795 } else { 41796 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41797 return err 41798 } 41799 } 41800 case 2: 41801 if fieldTypeId == thrift.STRUCT { 41802 if err := p.ReadField2(ctx, iprot); err != nil { 41803 return err 41804 } 41805 } else { 41806 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41807 return err 41808 } 41809 } 41810 case 3: 41811 if fieldTypeId == thrift.STRUCT { 41812 if err := p.ReadField3(ctx, iprot); err != nil { 41813 return err 41814 } 41815 } else { 41816 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41817 return err 41818 } 41819 } 41820 case 4: 41821 if fieldTypeId == thrift.STRUCT { 41822 if err := p.ReadField4(ctx, iprot); err != nil { 41823 return err 41824 } 41825 } else { 41826 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41827 return err 41828 } 41829 } 41830 default: 41831 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41832 return err 41833 } 41834 } 41835 if err := iprot.ReadFieldEnd(ctx); err != nil { 41836 return err 41837 } 41838 } 41839 if err := iprot.ReadStructEnd(ctx); err != nil { 41840 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 41841 } 41842 return nil 41843 } 41844 41845 func (p *ApplyDbIdx128FindPrimaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 41846 p.Code = &Uint64{} 41847 if err := p.Code.Read(ctx, iprot); err != nil { 41848 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 41849 } 41850 return nil 41851 } 41852 41853 func (p *ApplyDbIdx128FindPrimaryArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 41854 p.Scope = &Uint64{} 41855 if err := p.Scope.Read(ctx, iprot); err != nil { 41856 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 41857 } 41858 return nil 41859 } 41860 41861 func (p *ApplyDbIdx128FindPrimaryArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 41862 p.Table = &Uint64{} 41863 if err := p.Table.Read(ctx, iprot); err != nil { 41864 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 41865 } 41866 return nil 41867 } 41868 41869 func (p *ApplyDbIdx128FindPrimaryArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 41870 p.Primary = &Uint64{} 41871 if err := p.Primary.Read(ctx, iprot); err != nil { 41872 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 41873 } 41874 return nil 41875 } 41876 41877 func (p *ApplyDbIdx128FindPrimaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 41878 if err := oprot.WriteStructBegin(ctx, "db_idx128_find_primary_args"); err != nil { 41879 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 41880 if p != nil { 41881 if err := p.writeField1(ctx, oprot); err != nil { return err } 41882 if err := p.writeField2(ctx, oprot); err != nil { return err } 41883 if err := p.writeField3(ctx, oprot); err != nil { return err } 41884 if err := p.writeField4(ctx, oprot); err != nil { return err } 41885 } 41886 if err := oprot.WriteFieldStop(ctx); err != nil { 41887 return thrift.PrependError("write field stop error: ", err) } 41888 if err := oprot.WriteStructEnd(ctx); err != nil { 41889 return thrift.PrependError("write struct stop error: ", err) } 41890 return nil 41891 } 41892 41893 func (p *ApplyDbIdx128FindPrimaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 41894 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 41895 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 41896 if err := p.Code.Write(ctx, oprot); err != nil { 41897 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 41898 } 41899 if err := oprot.WriteFieldEnd(ctx); err != nil { 41900 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 41901 return err 41902 } 41903 41904 func (p *ApplyDbIdx128FindPrimaryArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 41905 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 41906 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 41907 if err := p.Scope.Write(ctx, oprot); err != nil { 41908 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 41909 } 41910 if err := oprot.WriteFieldEnd(ctx); err != nil { 41911 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 41912 return err 41913 } 41914 41915 func (p *ApplyDbIdx128FindPrimaryArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 41916 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 41917 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 41918 if err := p.Table.Write(ctx, oprot); err != nil { 41919 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 41920 } 41921 if err := oprot.WriteFieldEnd(ctx); err != nil { 41922 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 41923 return err 41924 } 41925 41926 func (p *ApplyDbIdx128FindPrimaryArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 41927 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 4); err != nil { 41928 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:primary: ", p), err) } 41929 if err := p.Primary.Write(ctx, oprot); err != nil { 41930 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 41931 } 41932 if err := oprot.WriteFieldEnd(ctx); err != nil { 41933 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:primary: ", p), err) } 41934 return err 41935 } 41936 41937 func (p *ApplyDbIdx128FindPrimaryArgs) String() string { 41938 if p == nil { 41939 return "<nil>" 41940 } 41941 return fmt.Sprintf("ApplyDbIdx128FindPrimaryArgs(%+v)", *p) 41942 } 41943 41944 // Attributes: 41945 // - Success 41946 type ApplyDbIdx128FindPrimaryResult struct { 41947 Success *FindPrimaryReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 41948 } 41949 41950 func NewApplyDbIdx128FindPrimaryResult() *ApplyDbIdx128FindPrimaryResult { 41951 return &ApplyDbIdx128FindPrimaryResult{} 41952 } 41953 41954 var ApplyDbIdx128FindPrimaryResult_Success_DEFAULT *FindPrimaryReturn 41955 func (p *ApplyDbIdx128FindPrimaryResult) GetSuccess() *FindPrimaryReturn { 41956 if !p.IsSetSuccess() { 41957 return ApplyDbIdx128FindPrimaryResult_Success_DEFAULT 41958 } 41959 return p.Success 41960 } 41961 func (p *ApplyDbIdx128FindPrimaryResult) IsSetSuccess() bool { 41962 return p.Success != nil 41963 } 41964 41965 func (p *ApplyDbIdx128FindPrimaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 41966 if _, err := iprot.ReadStructBegin(ctx); err != nil { 41967 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 41968 } 41969 41970 41971 for { 41972 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 41973 if err != nil { 41974 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 41975 } 41976 if fieldTypeId == thrift.STOP { break; } 41977 switch fieldId { 41978 case 0: 41979 if fieldTypeId == thrift.STRUCT { 41980 if err := p.ReadField0(ctx, iprot); err != nil { 41981 return err 41982 } 41983 } else { 41984 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41985 return err 41986 } 41987 } 41988 default: 41989 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 41990 return err 41991 } 41992 } 41993 if err := iprot.ReadFieldEnd(ctx); err != nil { 41994 return err 41995 } 41996 } 41997 if err := iprot.ReadStructEnd(ctx); err != nil { 41998 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 41999 } 42000 return nil 42001 } 42002 42003 func (p *ApplyDbIdx128FindPrimaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 42004 p.Success = &FindPrimaryReturn{} 42005 if err := p.Success.Read(ctx, iprot); err != nil { 42006 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 42007 } 42008 return nil 42009 } 42010 42011 func (p *ApplyDbIdx128FindPrimaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 42012 if err := oprot.WriteStructBegin(ctx, "db_idx128_find_primary_result"); err != nil { 42013 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 42014 if p != nil { 42015 if err := p.writeField0(ctx, oprot); err != nil { return err } 42016 } 42017 if err := oprot.WriteFieldStop(ctx); err != nil { 42018 return thrift.PrependError("write field stop error: ", err) } 42019 if err := oprot.WriteStructEnd(ctx); err != nil { 42020 return thrift.PrependError("write struct stop error: ", err) } 42021 return nil 42022 } 42023 42024 func (p *ApplyDbIdx128FindPrimaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 42025 if p.IsSetSuccess() { 42026 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 42027 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 42028 if err := p.Success.Write(ctx, oprot); err != nil { 42029 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 42030 } 42031 if err := oprot.WriteFieldEnd(ctx); err != nil { 42032 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 42033 } 42034 return err 42035 } 42036 42037 func (p *ApplyDbIdx128FindPrimaryResult) String() string { 42038 if p == nil { 42039 return "<nil>" 42040 } 42041 return fmt.Sprintf("ApplyDbIdx128FindPrimaryResult(%+v)", *p) 42042 } 42043 42044 // Attributes: 42045 // - Code 42046 // - Scope 42047 // - Table 42048 // - Secondary 42049 type ApplyDbIdx128FindSecondaryArgs struct { 42050 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 42051 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 42052 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 42053 Secondary []byte `thrift:"secondary,4" db:"secondary" json:"secondary"` 42054 } 42055 42056 func NewApplyDbIdx128FindSecondaryArgs() *ApplyDbIdx128FindSecondaryArgs { 42057 return &ApplyDbIdx128FindSecondaryArgs{} 42058 } 42059 42060 var ApplyDbIdx128FindSecondaryArgs_Code_DEFAULT *Uint64 42061 func (p *ApplyDbIdx128FindSecondaryArgs) GetCode() *Uint64 { 42062 if !p.IsSetCode() { 42063 return ApplyDbIdx128FindSecondaryArgs_Code_DEFAULT 42064 } 42065 return p.Code 42066 } 42067 var ApplyDbIdx128FindSecondaryArgs_Scope_DEFAULT *Uint64 42068 func (p *ApplyDbIdx128FindSecondaryArgs) GetScope() *Uint64 { 42069 if !p.IsSetScope() { 42070 return ApplyDbIdx128FindSecondaryArgs_Scope_DEFAULT 42071 } 42072 return p.Scope 42073 } 42074 var ApplyDbIdx128FindSecondaryArgs_Table_DEFAULT *Uint64 42075 func (p *ApplyDbIdx128FindSecondaryArgs) GetTable() *Uint64 { 42076 if !p.IsSetTable() { 42077 return ApplyDbIdx128FindSecondaryArgs_Table_DEFAULT 42078 } 42079 return p.Table 42080 } 42081 42082 func (p *ApplyDbIdx128FindSecondaryArgs) GetSecondary() []byte { 42083 return p.Secondary 42084 } 42085 func (p *ApplyDbIdx128FindSecondaryArgs) IsSetCode() bool { 42086 return p.Code != nil 42087 } 42088 42089 func (p *ApplyDbIdx128FindSecondaryArgs) IsSetScope() bool { 42090 return p.Scope != nil 42091 } 42092 42093 func (p *ApplyDbIdx128FindSecondaryArgs) IsSetTable() bool { 42094 return p.Table != nil 42095 } 42096 42097 func (p *ApplyDbIdx128FindSecondaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 42098 if _, err := iprot.ReadStructBegin(ctx); err != nil { 42099 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 42100 } 42101 42102 42103 for { 42104 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 42105 if err != nil { 42106 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 42107 } 42108 if fieldTypeId == thrift.STOP { break; } 42109 switch fieldId { 42110 case 1: 42111 if fieldTypeId == thrift.STRUCT { 42112 if err := p.ReadField1(ctx, iprot); err != nil { 42113 return err 42114 } 42115 } else { 42116 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42117 return err 42118 } 42119 } 42120 case 2: 42121 if fieldTypeId == thrift.STRUCT { 42122 if err := p.ReadField2(ctx, iprot); err != nil { 42123 return err 42124 } 42125 } else { 42126 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42127 return err 42128 } 42129 } 42130 case 3: 42131 if fieldTypeId == thrift.STRUCT { 42132 if err := p.ReadField3(ctx, iprot); err != nil { 42133 return err 42134 } 42135 } else { 42136 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42137 return err 42138 } 42139 } 42140 case 4: 42141 if fieldTypeId == thrift.STRING { 42142 if err := p.ReadField4(ctx, iprot); err != nil { 42143 return err 42144 } 42145 } else { 42146 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42147 return err 42148 } 42149 } 42150 default: 42151 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42152 return err 42153 } 42154 } 42155 if err := iprot.ReadFieldEnd(ctx); err != nil { 42156 return err 42157 } 42158 } 42159 if err := iprot.ReadStructEnd(ctx); err != nil { 42160 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 42161 } 42162 return nil 42163 } 42164 42165 func (p *ApplyDbIdx128FindSecondaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 42166 p.Code = &Uint64{} 42167 if err := p.Code.Read(ctx, iprot); err != nil { 42168 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 42169 } 42170 return nil 42171 } 42172 42173 func (p *ApplyDbIdx128FindSecondaryArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 42174 p.Scope = &Uint64{} 42175 if err := p.Scope.Read(ctx, iprot); err != nil { 42176 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 42177 } 42178 return nil 42179 } 42180 42181 func (p *ApplyDbIdx128FindSecondaryArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 42182 p.Table = &Uint64{} 42183 if err := p.Table.Read(ctx, iprot); err != nil { 42184 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 42185 } 42186 return nil 42187 } 42188 42189 func (p *ApplyDbIdx128FindSecondaryArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 42190 if v, err := iprot.ReadBinary(ctx); err != nil { 42191 return thrift.PrependError("error reading field 4: ", err) 42192 } else { 42193 p.Secondary = v 42194 } 42195 return nil 42196 } 42197 42198 func (p *ApplyDbIdx128FindSecondaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 42199 if err := oprot.WriteStructBegin(ctx, "db_idx128_find_secondary_args"); err != nil { 42200 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 42201 if p != nil { 42202 if err := p.writeField1(ctx, oprot); err != nil { return err } 42203 if err := p.writeField2(ctx, oprot); err != nil { return err } 42204 if err := p.writeField3(ctx, oprot); err != nil { return err } 42205 if err := p.writeField4(ctx, oprot); err != nil { return err } 42206 } 42207 if err := oprot.WriteFieldStop(ctx); err != nil { 42208 return thrift.PrependError("write field stop error: ", err) } 42209 if err := oprot.WriteStructEnd(ctx); err != nil { 42210 return thrift.PrependError("write struct stop error: ", err) } 42211 return nil 42212 } 42213 42214 func (p *ApplyDbIdx128FindSecondaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 42215 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 42216 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 42217 if err := p.Code.Write(ctx, oprot); err != nil { 42218 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 42219 } 42220 if err := oprot.WriteFieldEnd(ctx); err != nil { 42221 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 42222 return err 42223 } 42224 42225 func (p *ApplyDbIdx128FindSecondaryArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 42226 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 42227 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 42228 if err := p.Scope.Write(ctx, oprot); err != nil { 42229 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 42230 } 42231 if err := oprot.WriteFieldEnd(ctx); err != nil { 42232 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 42233 return err 42234 } 42235 42236 func (p *ApplyDbIdx128FindSecondaryArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 42237 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 42238 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 42239 if err := p.Table.Write(ctx, oprot); err != nil { 42240 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 42241 } 42242 if err := oprot.WriteFieldEnd(ctx); err != nil { 42243 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 42244 return err 42245 } 42246 42247 func (p *ApplyDbIdx128FindSecondaryArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 42248 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 4); err != nil { 42249 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondary: ", p), err) } 42250 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 42251 return thrift.PrependError(fmt.Sprintf("%T.secondary (4) field write error: ", p), err) } 42252 if err := oprot.WriteFieldEnd(ctx); err != nil { 42253 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondary: ", p), err) } 42254 return err 42255 } 42256 42257 func (p *ApplyDbIdx128FindSecondaryArgs) String() string { 42258 if p == nil { 42259 return "<nil>" 42260 } 42261 return fmt.Sprintf("ApplyDbIdx128FindSecondaryArgs(%+v)", *p) 42262 } 42263 42264 // Attributes: 42265 // - Success 42266 type ApplyDbIdx128FindSecondaryResult struct { 42267 Success *FindSecondaryReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 42268 } 42269 42270 func NewApplyDbIdx128FindSecondaryResult() *ApplyDbIdx128FindSecondaryResult { 42271 return &ApplyDbIdx128FindSecondaryResult{} 42272 } 42273 42274 var ApplyDbIdx128FindSecondaryResult_Success_DEFAULT *FindSecondaryReturn 42275 func (p *ApplyDbIdx128FindSecondaryResult) GetSuccess() *FindSecondaryReturn { 42276 if !p.IsSetSuccess() { 42277 return ApplyDbIdx128FindSecondaryResult_Success_DEFAULT 42278 } 42279 return p.Success 42280 } 42281 func (p *ApplyDbIdx128FindSecondaryResult) IsSetSuccess() bool { 42282 return p.Success != nil 42283 } 42284 42285 func (p *ApplyDbIdx128FindSecondaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 42286 if _, err := iprot.ReadStructBegin(ctx); err != nil { 42287 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 42288 } 42289 42290 42291 for { 42292 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 42293 if err != nil { 42294 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 42295 } 42296 if fieldTypeId == thrift.STOP { break; } 42297 switch fieldId { 42298 case 0: 42299 if fieldTypeId == thrift.STRUCT { 42300 if err := p.ReadField0(ctx, iprot); err != nil { 42301 return err 42302 } 42303 } else { 42304 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42305 return err 42306 } 42307 } 42308 default: 42309 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42310 return err 42311 } 42312 } 42313 if err := iprot.ReadFieldEnd(ctx); err != nil { 42314 return err 42315 } 42316 } 42317 if err := iprot.ReadStructEnd(ctx); err != nil { 42318 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 42319 } 42320 return nil 42321 } 42322 42323 func (p *ApplyDbIdx128FindSecondaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 42324 p.Success = &FindSecondaryReturn{} 42325 if err := p.Success.Read(ctx, iprot); err != nil { 42326 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 42327 } 42328 return nil 42329 } 42330 42331 func (p *ApplyDbIdx128FindSecondaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 42332 if err := oprot.WriteStructBegin(ctx, "db_idx128_find_secondary_result"); err != nil { 42333 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 42334 if p != nil { 42335 if err := p.writeField0(ctx, oprot); err != nil { return err } 42336 } 42337 if err := oprot.WriteFieldStop(ctx); err != nil { 42338 return thrift.PrependError("write field stop error: ", err) } 42339 if err := oprot.WriteStructEnd(ctx); err != nil { 42340 return thrift.PrependError("write struct stop error: ", err) } 42341 return nil 42342 } 42343 42344 func (p *ApplyDbIdx128FindSecondaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 42345 if p.IsSetSuccess() { 42346 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 42347 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 42348 if err := p.Success.Write(ctx, oprot); err != nil { 42349 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 42350 } 42351 if err := oprot.WriteFieldEnd(ctx); err != nil { 42352 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 42353 } 42354 return err 42355 } 42356 42357 func (p *ApplyDbIdx128FindSecondaryResult) String() string { 42358 if p == nil { 42359 return "<nil>" 42360 } 42361 return fmt.Sprintf("ApplyDbIdx128FindSecondaryResult(%+v)", *p) 42362 } 42363 42364 // Attributes: 42365 // - Code 42366 // - Scope 42367 // - Table 42368 // - Secondary 42369 // - Primary 42370 type ApplyDbIdx128LowerboundArgs struct { 42371 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 42372 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 42373 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 42374 Secondary []byte `thrift:"secondary,4" db:"secondary" json:"secondary"` 42375 Primary *Uint64 `thrift:"primary,5" db:"primary" json:"primary"` 42376 } 42377 42378 func NewApplyDbIdx128LowerboundArgs() *ApplyDbIdx128LowerboundArgs { 42379 return &ApplyDbIdx128LowerboundArgs{} 42380 } 42381 42382 var ApplyDbIdx128LowerboundArgs_Code_DEFAULT *Uint64 42383 func (p *ApplyDbIdx128LowerboundArgs) GetCode() *Uint64 { 42384 if !p.IsSetCode() { 42385 return ApplyDbIdx128LowerboundArgs_Code_DEFAULT 42386 } 42387 return p.Code 42388 } 42389 var ApplyDbIdx128LowerboundArgs_Scope_DEFAULT *Uint64 42390 func (p *ApplyDbIdx128LowerboundArgs) GetScope() *Uint64 { 42391 if !p.IsSetScope() { 42392 return ApplyDbIdx128LowerboundArgs_Scope_DEFAULT 42393 } 42394 return p.Scope 42395 } 42396 var ApplyDbIdx128LowerboundArgs_Table_DEFAULT *Uint64 42397 func (p *ApplyDbIdx128LowerboundArgs) GetTable() *Uint64 { 42398 if !p.IsSetTable() { 42399 return ApplyDbIdx128LowerboundArgs_Table_DEFAULT 42400 } 42401 return p.Table 42402 } 42403 42404 func (p *ApplyDbIdx128LowerboundArgs) GetSecondary() []byte { 42405 return p.Secondary 42406 } 42407 var ApplyDbIdx128LowerboundArgs_Primary_DEFAULT *Uint64 42408 func (p *ApplyDbIdx128LowerboundArgs) GetPrimary() *Uint64 { 42409 if !p.IsSetPrimary() { 42410 return ApplyDbIdx128LowerboundArgs_Primary_DEFAULT 42411 } 42412 return p.Primary 42413 } 42414 func (p *ApplyDbIdx128LowerboundArgs) IsSetCode() bool { 42415 return p.Code != nil 42416 } 42417 42418 func (p *ApplyDbIdx128LowerboundArgs) IsSetScope() bool { 42419 return p.Scope != nil 42420 } 42421 42422 func (p *ApplyDbIdx128LowerboundArgs) IsSetTable() bool { 42423 return p.Table != nil 42424 } 42425 42426 func (p *ApplyDbIdx128LowerboundArgs) IsSetPrimary() bool { 42427 return p.Primary != nil 42428 } 42429 42430 func (p *ApplyDbIdx128LowerboundArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 42431 if _, err := iprot.ReadStructBegin(ctx); err != nil { 42432 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 42433 } 42434 42435 42436 for { 42437 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 42438 if err != nil { 42439 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 42440 } 42441 if fieldTypeId == thrift.STOP { break; } 42442 switch fieldId { 42443 case 1: 42444 if fieldTypeId == thrift.STRUCT { 42445 if err := p.ReadField1(ctx, iprot); err != nil { 42446 return err 42447 } 42448 } else { 42449 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42450 return err 42451 } 42452 } 42453 case 2: 42454 if fieldTypeId == thrift.STRUCT { 42455 if err := p.ReadField2(ctx, iprot); err != nil { 42456 return err 42457 } 42458 } else { 42459 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42460 return err 42461 } 42462 } 42463 case 3: 42464 if fieldTypeId == thrift.STRUCT { 42465 if err := p.ReadField3(ctx, iprot); err != nil { 42466 return err 42467 } 42468 } else { 42469 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42470 return err 42471 } 42472 } 42473 case 4: 42474 if fieldTypeId == thrift.STRING { 42475 if err := p.ReadField4(ctx, iprot); err != nil { 42476 return err 42477 } 42478 } else { 42479 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42480 return err 42481 } 42482 } 42483 case 5: 42484 if fieldTypeId == thrift.STRUCT { 42485 if err := p.ReadField5(ctx, iprot); err != nil { 42486 return err 42487 } 42488 } else { 42489 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42490 return err 42491 } 42492 } 42493 default: 42494 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42495 return err 42496 } 42497 } 42498 if err := iprot.ReadFieldEnd(ctx); err != nil { 42499 return err 42500 } 42501 } 42502 if err := iprot.ReadStructEnd(ctx); err != nil { 42503 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 42504 } 42505 return nil 42506 } 42507 42508 func (p *ApplyDbIdx128LowerboundArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 42509 p.Code = &Uint64{} 42510 if err := p.Code.Read(ctx, iprot); err != nil { 42511 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 42512 } 42513 return nil 42514 } 42515 42516 func (p *ApplyDbIdx128LowerboundArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 42517 p.Scope = &Uint64{} 42518 if err := p.Scope.Read(ctx, iprot); err != nil { 42519 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 42520 } 42521 return nil 42522 } 42523 42524 func (p *ApplyDbIdx128LowerboundArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 42525 p.Table = &Uint64{} 42526 if err := p.Table.Read(ctx, iprot); err != nil { 42527 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 42528 } 42529 return nil 42530 } 42531 42532 func (p *ApplyDbIdx128LowerboundArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 42533 if v, err := iprot.ReadBinary(ctx); err != nil { 42534 return thrift.PrependError("error reading field 4: ", err) 42535 } else { 42536 p.Secondary = v 42537 } 42538 return nil 42539 } 42540 42541 func (p *ApplyDbIdx128LowerboundArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 42542 p.Primary = &Uint64{} 42543 if err := p.Primary.Read(ctx, iprot); err != nil { 42544 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 42545 } 42546 return nil 42547 } 42548 42549 func (p *ApplyDbIdx128LowerboundArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 42550 if err := oprot.WriteStructBegin(ctx, "db_idx128_lowerbound_args"); err != nil { 42551 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 42552 if p != nil { 42553 if err := p.writeField1(ctx, oprot); err != nil { return err } 42554 if err := p.writeField2(ctx, oprot); err != nil { return err } 42555 if err := p.writeField3(ctx, oprot); err != nil { return err } 42556 if err := p.writeField4(ctx, oprot); err != nil { return err } 42557 if err := p.writeField5(ctx, oprot); err != nil { return err } 42558 } 42559 if err := oprot.WriteFieldStop(ctx); err != nil { 42560 return thrift.PrependError("write field stop error: ", err) } 42561 if err := oprot.WriteStructEnd(ctx); err != nil { 42562 return thrift.PrependError("write struct stop error: ", err) } 42563 return nil 42564 } 42565 42566 func (p *ApplyDbIdx128LowerboundArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 42567 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 42568 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 42569 if err := p.Code.Write(ctx, oprot); err != nil { 42570 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 42571 } 42572 if err := oprot.WriteFieldEnd(ctx); err != nil { 42573 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 42574 return err 42575 } 42576 42577 func (p *ApplyDbIdx128LowerboundArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 42578 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 42579 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 42580 if err := p.Scope.Write(ctx, oprot); err != nil { 42581 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 42582 } 42583 if err := oprot.WriteFieldEnd(ctx); err != nil { 42584 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 42585 return err 42586 } 42587 42588 func (p *ApplyDbIdx128LowerboundArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 42589 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 42590 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 42591 if err := p.Table.Write(ctx, oprot); err != nil { 42592 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 42593 } 42594 if err := oprot.WriteFieldEnd(ctx); err != nil { 42595 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 42596 return err 42597 } 42598 42599 func (p *ApplyDbIdx128LowerboundArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 42600 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 4); err != nil { 42601 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondary: ", p), err) } 42602 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 42603 return thrift.PrependError(fmt.Sprintf("%T.secondary (4) field write error: ", p), err) } 42604 if err := oprot.WriteFieldEnd(ctx); err != nil { 42605 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondary: ", p), err) } 42606 return err 42607 } 42608 42609 func (p *ApplyDbIdx128LowerboundArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 42610 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 5); err != nil { 42611 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:primary: ", p), err) } 42612 if err := p.Primary.Write(ctx, oprot); err != nil { 42613 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 42614 } 42615 if err := oprot.WriteFieldEnd(ctx); err != nil { 42616 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:primary: ", p), err) } 42617 return err 42618 } 42619 42620 func (p *ApplyDbIdx128LowerboundArgs) String() string { 42621 if p == nil { 42622 return "<nil>" 42623 } 42624 return fmt.Sprintf("ApplyDbIdx128LowerboundArgs(%+v)", *p) 42625 } 42626 42627 // Attributes: 42628 // - Success 42629 type ApplyDbIdx128LowerboundResult struct { 42630 Success *LowerBoundUpperBoundReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 42631 } 42632 42633 func NewApplyDbIdx128LowerboundResult() *ApplyDbIdx128LowerboundResult { 42634 return &ApplyDbIdx128LowerboundResult{} 42635 } 42636 42637 var ApplyDbIdx128LowerboundResult_Success_DEFAULT *LowerBoundUpperBoundReturn 42638 func (p *ApplyDbIdx128LowerboundResult) GetSuccess() *LowerBoundUpperBoundReturn { 42639 if !p.IsSetSuccess() { 42640 return ApplyDbIdx128LowerboundResult_Success_DEFAULT 42641 } 42642 return p.Success 42643 } 42644 func (p *ApplyDbIdx128LowerboundResult) IsSetSuccess() bool { 42645 return p.Success != nil 42646 } 42647 42648 func (p *ApplyDbIdx128LowerboundResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 42649 if _, err := iprot.ReadStructBegin(ctx); err != nil { 42650 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 42651 } 42652 42653 42654 for { 42655 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 42656 if err != nil { 42657 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 42658 } 42659 if fieldTypeId == thrift.STOP { break; } 42660 switch fieldId { 42661 case 0: 42662 if fieldTypeId == thrift.STRUCT { 42663 if err := p.ReadField0(ctx, iprot); err != nil { 42664 return err 42665 } 42666 } else { 42667 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42668 return err 42669 } 42670 } 42671 default: 42672 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42673 return err 42674 } 42675 } 42676 if err := iprot.ReadFieldEnd(ctx); err != nil { 42677 return err 42678 } 42679 } 42680 if err := iprot.ReadStructEnd(ctx); err != nil { 42681 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 42682 } 42683 return nil 42684 } 42685 42686 func (p *ApplyDbIdx128LowerboundResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 42687 p.Success = &LowerBoundUpperBoundReturn{} 42688 if err := p.Success.Read(ctx, iprot); err != nil { 42689 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 42690 } 42691 return nil 42692 } 42693 42694 func (p *ApplyDbIdx128LowerboundResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 42695 if err := oprot.WriteStructBegin(ctx, "db_idx128_lowerbound_result"); err != nil { 42696 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 42697 if p != nil { 42698 if err := p.writeField0(ctx, oprot); err != nil { return err } 42699 } 42700 if err := oprot.WriteFieldStop(ctx); err != nil { 42701 return thrift.PrependError("write field stop error: ", err) } 42702 if err := oprot.WriteStructEnd(ctx); err != nil { 42703 return thrift.PrependError("write struct stop error: ", err) } 42704 return nil 42705 } 42706 42707 func (p *ApplyDbIdx128LowerboundResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 42708 if p.IsSetSuccess() { 42709 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 42710 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 42711 if err := p.Success.Write(ctx, oprot); err != nil { 42712 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 42713 } 42714 if err := oprot.WriteFieldEnd(ctx); err != nil { 42715 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 42716 } 42717 return err 42718 } 42719 42720 func (p *ApplyDbIdx128LowerboundResult) String() string { 42721 if p == nil { 42722 return "<nil>" 42723 } 42724 return fmt.Sprintf("ApplyDbIdx128LowerboundResult(%+v)", *p) 42725 } 42726 42727 // Attributes: 42728 // - Code 42729 // - Scope 42730 // - Table 42731 // - Secondary 42732 // - Primary 42733 type ApplyDbIdx128UpperboundArgs struct { 42734 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 42735 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 42736 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 42737 Secondary []byte `thrift:"secondary,4" db:"secondary" json:"secondary"` 42738 Primary *Uint64 `thrift:"primary,5" db:"primary" json:"primary"` 42739 } 42740 42741 func NewApplyDbIdx128UpperboundArgs() *ApplyDbIdx128UpperboundArgs { 42742 return &ApplyDbIdx128UpperboundArgs{} 42743 } 42744 42745 var ApplyDbIdx128UpperboundArgs_Code_DEFAULT *Uint64 42746 func (p *ApplyDbIdx128UpperboundArgs) GetCode() *Uint64 { 42747 if !p.IsSetCode() { 42748 return ApplyDbIdx128UpperboundArgs_Code_DEFAULT 42749 } 42750 return p.Code 42751 } 42752 var ApplyDbIdx128UpperboundArgs_Scope_DEFAULT *Uint64 42753 func (p *ApplyDbIdx128UpperboundArgs) GetScope() *Uint64 { 42754 if !p.IsSetScope() { 42755 return ApplyDbIdx128UpperboundArgs_Scope_DEFAULT 42756 } 42757 return p.Scope 42758 } 42759 var ApplyDbIdx128UpperboundArgs_Table_DEFAULT *Uint64 42760 func (p *ApplyDbIdx128UpperboundArgs) GetTable() *Uint64 { 42761 if !p.IsSetTable() { 42762 return ApplyDbIdx128UpperboundArgs_Table_DEFAULT 42763 } 42764 return p.Table 42765 } 42766 42767 func (p *ApplyDbIdx128UpperboundArgs) GetSecondary() []byte { 42768 return p.Secondary 42769 } 42770 var ApplyDbIdx128UpperboundArgs_Primary_DEFAULT *Uint64 42771 func (p *ApplyDbIdx128UpperboundArgs) GetPrimary() *Uint64 { 42772 if !p.IsSetPrimary() { 42773 return ApplyDbIdx128UpperboundArgs_Primary_DEFAULT 42774 } 42775 return p.Primary 42776 } 42777 func (p *ApplyDbIdx128UpperboundArgs) IsSetCode() bool { 42778 return p.Code != nil 42779 } 42780 42781 func (p *ApplyDbIdx128UpperboundArgs) IsSetScope() bool { 42782 return p.Scope != nil 42783 } 42784 42785 func (p *ApplyDbIdx128UpperboundArgs) IsSetTable() bool { 42786 return p.Table != nil 42787 } 42788 42789 func (p *ApplyDbIdx128UpperboundArgs) IsSetPrimary() bool { 42790 return p.Primary != nil 42791 } 42792 42793 func (p *ApplyDbIdx128UpperboundArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 42794 if _, err := iprot.ReadStructBegin(ctx); err != nil { 42795 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 42796 } 42797 42798 42799 for { 42800 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 42801 if err != nil { 42802 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 42803 } 42804 if fieldTypeId == thrift.STOP { break; } 42805 switch fieldId { 42806 case 1: 42807 if fieldTypeId == thrift.STRUCT { 42808 if err := p.ReadField1(ctx, iprot); err != nil { 42809 return err 42810 } 42811 } else { 42812 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42813 return err 42814 } 42815 } 42816 case 2: 42817 if fieldTypeId == thrift.STRUCT { 42818 if err := p.ReadField2(ctx, iprot); err != nil { 42819 return err 42820 } 42821 } else { 42822 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42823 return err 42824 } 42825 } 42826 case 3: 42827 if fieldTypeId == thrift.STRUCT { 42828 if err := p.ReadField3(ctx, iprot); err != nil { 42829 return err 42830 } 42831 } else { 42832 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42833 return err 42834 } 42835 } 42836 case 4: 42837 if fieldTypeId == thrift.STRING { 42838 if err := p.ReadField4(ctx, iprot); err != nil { 42839 return err 42840 } 42841 } else { 42842 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42843 return err 42844 } 42845 } 42846 case 5: 42847 if fieldTypeId == thrift.STRUCT { 42848 if err := p.ReadField5(ctx, iprot); err != nil { 42849 return err 42850 } 42851 } else { 42852 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42853 return err 42854 } 42855 } 42856 default: 42857 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 42858 return err 42859 } 42860 } 42861 if err := iprot.ReadFieldEnd(ctx); err != nil { 42862 return err 42863 } 42864 } 42865 if err := iprot.ReadStructEnd(ctx); err != nil { 42866 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 42867 } 42868 return nil 42869 } 42870 42871 func (p *ApplyDbIdx128UpperboundArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 42872 p.Code = &Uint64{} 42873 if err := p.Code.Read(ctx, iprot); err != nil { 42874 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 42875 } 42876 return nil 42877 } 42878 42879 func (p *ApplyDbIdx128UpperboundArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 42880 p.Scope = &Uint64{} 42881 if err := p.Scope.Read(ctx, iprot); err != nil { 42882 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 42883 } 42884 return nil 42885 } 42886 42887 func (p *ApplyDbIdx128UpperboundArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 42888 p.Table = &Uint64{} 42889 if err := p.Table.Read(ctx, iprot); err != nil { 42890 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 42891 } 42892 return nil 42893 } 42894 42895 func (p *ApplyDbIdx128UpperboundArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 42896 if v, err := iprot.ReadBinary(ctx); err != nil { 42897 return thrift.PrependError("error reading field 4: ", err) 42898 } else { 42899 p.Secondary = v 42900 } 42901 return nil 42902 } 42903 42904 func (p *ApplyDbIdx128UpperboundArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 42905 p.Primary = &Uint64{} 42906 if err := p.Primary.Read(ctx, iprot); err != nil { 42907 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 42908 } 42909 return nil 42910 } 42911 42912 func (p *ApplyDbIdx128UpperboundArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 42913 if err := oprot.WriteStructBegin(ctx, "db_idx128_upperbound_args"); err != nil { 42914 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 42915 if p != nil { 42916 if err := p.writeField1(ctx, oprot); err != nil { return err } 42917 if err := p.writeField2(ctx, oprot); err != nil { return err } 42918 if err := p.writeField3(ctx, oprot); err != nil { return err } 42919 if err := p.writeField4(ctx, oprot); err != nil { return err } 42920 if err := p.writeField5(ctx, oprot); err != nil { return err } 42921 } 42922 if err := oprot.WriteFieldStop(ctx); err != nil { 42923 return thrift.PrependError("write field stop error: ", err) } 42924 if err := oprot.WriteStructEnd(ctx); err != nil { 42925 return thrift.PrependError("write struct stop error: ", err) } 42926 return nil 42927 } 42928 42929 func (p *ApplyDbIdx128UpperboundArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 42930 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 42931 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 42932 if err := p.Code.Write(ctx, oprot); err != nil { 42933 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 42934 } 42935 if err := oprot.WriteFieldEnd(ctx); err != nil { 42936 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 42937 return err 42938 } 42939 42940 func (p *ApplyDbIdx128UpperboundArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 42941 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 42942 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 42943 if err := p.Scope.Write(ctx, oprot); err != nil { 42944 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 42945 } 42946 if err := oprot.WriteFieldEnd(ctx); err != nil { 42947 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 42948 return err 42949 } 42950 42951 func (p *ApplyDbIdx128UpperboundArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 42952 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 42953 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 42954 if err := p.Table.Write(ctx, oprot); err != nil { 42955 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 42956 } 42957 if err := oprot.WriteFieldEnd(ctx); err != nil { 42958 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 42959 return err 42960 } 42961 42962 func (p *ApplyDbIdx128UpperboundArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 42963 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 4); err != nil { 42964 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondary: ", p), err) } 42965 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 42966 return thrift.PrependError(fmt.Sprintf("%T.secondary (4) field write error: ", p), err) } 42967 if err := oprot.WriteFieldEnd(ctx); err != nil { 42968 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondary: ", p), err) } 42969 return err 42970 } 42971 42972 func (p *ApplyDbIdx128UpperboundArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 42973 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 5); err != nil { 42974 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:primary: ", p), err) } 42975 if err := p.Primary.Write(ctx, oprot); err != nil { 42976 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 42977 } 42978 if err := oprot.WriteFieldEnd(ctx); err != nil { 42979 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:primary: ", p), err) } 42980 return err 42981 } 42982 42983 func (p *ApplyDbIdx128UpperboundArgs) String() string { 42984 if p == nil { 42985 return "<nil>" 42986 } 42987 return fmt.Sprintf("ApplyDbIdx128UpperboundArgs(%+v)", *p) 42988 } 42989 42990 // Attributes: 42991 // - Success 42992 type ApplyDbIdx128UpperboundResult struct { 42993 Success *LowerBoundUpperBoundReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 42994 } 42995 42996 func NewApplyDbIdx128UpperboundResult() *ApplyDbIdx128UpperboundResult { 42997 return &ApplyDbIdx128UpperboundResult{} 42998 } 42999 43000 var ApplyDbIdx128UpperboundResult_Success_DEFAULT *LowerBoundUpperBoundReturn 43001 func (p *ApplyDbIdx128UpperboundResult) GetSuccess() *LowerBoundUpperBoundReturn { 43002 if !p.IsSetSuccess() { 43003 return ApplyDbIdx128UpperboundResult_Success_DEFAULT 43004 } 43005 return p.Success 43006 } 43007 func (p *ApplyDbIdx128UpperboundResult) IsSetSuccess() bool { 43008 return p.Success != nil 43009 } 43010 43011 func (p *ApplyDbIdx128UpperboundResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 43012 if _, err := iprot.ReadStructBegin(ctx); err != nil { 43013 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 43014 } 43015 43016 43017 for { 43018 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 43019 if err != nil { 43020 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 43021 } 43022 if fieldTypeId == thrift.STOP { break; } 43023 switch fieldId { 43024 case 0: 43025 if fieldTypeId == thrift.STRUCT { 43026 if err := p.ReadField0(ctx, iprot); err != nil { 43027 return err 43028 } 43029 } else { 43030 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43031 return err 43032 } 43033 } 43034 default: 43035 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43036 return err 43037 } 43038 } 43039 if err := iprot.ReadFieldEnd(ctx); err != nil { 43040 return err 43041 } 43042 } 43043 if err := iprot.ReadStructEnd(ctx); err != nil { 43044 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 43045 } 43046 return nil 43047 } 43048 43049 func (p *ApplyDbIdx128UpperboundResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 43050 p.Success = &LowerBoundUpperBoundReturn{} 43051 if err := p.Success.Read(ctx, iprot); err != nil { 43052 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 43053 } 43054 return nil 43055 } 43056 43057 func (p *ApplyDbIdx128UpperboundResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 43058 if err := oprot.WriteStructBegin(ctx, "db_idx128_upperbound_result"); err != nil { 43059 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 43060 if p != nil { 43061 if err := p.writeField0(ctx, oprot); err != nil { return err } 43062 } 43063 if err := oprot.WriteFieldStop(ctx); err != nil { 43064 return thrift.PrependError("write field stop error: ", err) } 43065 if err := oprot.WriteStructEnd(ctx); err != nil { 43066 return thrift.PrependError("write struct stop error: ", err) } 43067 return nil 43068 } 43069 43070 func (p *ApplyDbIdx128UpperboundResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 43071 if p.IsSetSuccess() { 43072 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 43073 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 43074 if err := p.Success.Write(ctx, oprot); err != nil { 43075 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 43076 } 43077 if err := oprot.WriteFieldEnd(ctx); err != nil { 43078 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 43079 } 43080 return err 43081 } 43082 43083 func (p *ApplyDbIdx128UpperboundResult) String() string { 43084 if p == nil { 43085 return "<nil>" 43086 } 43087 return fmt.Sprintf("ApplyDbIdx128UpperboundResult(%+v)", *p) 43088 } 43089 43090 // Attributes: 43091 // - Code 43092 // - Scope 43093 // - Table 43094 type ApplyDbIdx128EndArgs struct { 43095 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 43096 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 43097 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 43098 } 43099 43100 func NewApplyDbIdx128EndArgs() *ApplyDbIdx128EndArgs { 43101 return &ApplyDbIdx128EndArgs{} 43102 } 43103 43104 var ApplyDbIdx128EndArgs_Code_DEFAULT *Uint64 43105 func (p *ApplyDbIdx128EndArgs) GetCode() *Uint64 { 43106 if !p.IsSetCode() { 43107 return ApplyDbIdx128EndArgs_Code_DEFAULT 43108 } 43109 return p.Code 43110 } 43111 var ApplyDbIdx128EndArgs_Scope_DEFAULT *Uint64 43112 func (p *ApplyDbIdx128EndArgs) GetScope() *Uint64 { 43113 if !p.IsSetScope() { 43114 return ApplyDbIdx128EndArgs_Scope_DEFAULT 43115 } 43116 return p.Scope 43117 } 43118 var ApplyDbIdx128EndArgs_Table_DEFAULT *Uint64 43119 func (p *ApplyDbIdx128EndArgs) GetTable() *Uint64 { 43120 if !p.IsSetTable() { 43121 return ApplyDbIdx128EndArgs_Table_DEFAULT 43122 } 43123 return p.Table 43124 } 43125 func (p *ApplyDbIdx128EndArgs) IsSetCode() bool { 43126 return p.Code != nil 43127 } 43128 43129 func (p *ApplyDbIdx128EndArgs) IsSetScope() bool { 43130 return p.Scope != nil 43131 } 43132 43133 func (p *ApplyDbIdx128EndArgs) IsSetTable() bool { 43134 return p.Table != nil 43135 } 43136 43137 func (p *ApplyDbIdx128EndArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 43138 if _, err := iprot.ReadStructBegin(ctx); err != nil { 43139 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 43140 } 43141 43142 43143 for { 43144 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 43145 if err != nil { 43146 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 43147 } 43148 if fieldTypeId == thrift.STOP { break; } 43149 switch fieldId { 43150 case 1: 43151 if fieldTypeId == thrift.STRUCT { 43152 if err := p.ReadField1(ctx, iprot); err != nil { 43153 return err 43154 } 43155 } else { 43156 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43157 return err 43158 } 43159 } 43160 case 2: 43161 if fieldTypeId == thrift.STRUCT { 43162 if err := p.ReadField2(ctx, iprot); err != nil { 43163 return err 43164 } 43165 } else { 43166 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43167 return err 43168 } 43169 } 43170 case 3: 43171 if fieldTypeId == thrift.STRUCT { 43172 if err := p.ReadField3(ctx, iprot); err != nil { 43173 return err 43174 } 43175 } else { 43176 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43177 return err 43178 } 43179 } 43180 default: 43181 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43182 return err 43183 } 43184 } 43185 if err := iprot.ReadFieldEnd(ctx); err != nil { 43186 return err 43187 } 43188 } 43189 if err := iprot.ReadStructEnd(ctx); err != nil { 43190 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 43191 } 43192 return nil 43193 } 43194 43195 func (p *ApplyDbIdx128EndArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 43196 p.Code = &Uint64{} 43197 if err := p.Code.Read(ctx, iprot); err != nil { 43198 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 43199 } 43200 return nil 43201 } 43202 43203 func (p *ApplyDbIdx128EndArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 43204 p.Scope = &Uint64{} 43205 if err := p.Scope.Read(ctx, iprot); err != nil { 43206 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 43207 } 43208 return nil 43209 } 43210 43211 func (p *ApplyDbIdx128EndArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 43212 p.Table = &Uint64{} 43213 if err := p.Table.Read(ctx, iprot); err != nil { 43214 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 43215 } 43216 return nil 43217 } 43218 43219 func (p *ApplyDbIdx128EndArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 43220 if err := oprot.WriteStructBegin(ctx, "db_idx128_end_args"); err != nil { 43221 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 43222 if p != nil { 43223 if err := p.writeField1(ctx, oprot); err != nil { return err } 43224 if err := p.writeField2(ctx, oprot); err != nil { return err } 43225 if err := p.writeField3(ctx, oprot); err != nil { return err } 43226 } 43227 if err := oprot.WriteFieldStop(ctx); err != nil { 43228 return thrift.PrependError("write field stop error: ", err) } 43229 if err := oprot.WriteStructEnd(ctx); err != nil { 43230 return thrift.PrependError("write struct stop error: ", err) } 43231 return nil 43232 } 43233 43234 func (p *ApplyDbIdx128EndArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 43235 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 43236 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 43237 if err := p.Code.Write(ctx, oprot); err != nil { 43238 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 43239 } 43240 if err := oprot.WriteFieldEnd(ctx); err != nil { 43241 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 43242 return err 43243 } 43244 43245 func (p *ApplyDbIdx128EndArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 43246 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 43247 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 43248 if err := p.Scope.Write(ctx, oprot); err != nil { 43249 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 43250 } 43251 if err := oprot.WriteFieldEnd(ctx); err != nil { 43252 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 43253 return err 43254 } 43255 43256 func (p *ApplyDbIdx128EndArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 43257 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 43258 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 43259 if err := p.Table.Write(ctx, oprot); err != nil { 43260 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 43261 } 43262 if err := oprot.WriteFieldEnd(ctx); err != nil { 43263 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 43264 return err 43265 } 43266 43267 func (p *ApplyDbIdx128EndArgs) String() string { 43268 if p == nil { 43269 return "<nil>" 43270 } 43271 return fmt.Sprintf("ApplyDbIdx128EndArgs(%+v)", *p) 43272 } 43273 43274 // Attributes: 43275 // - Success 43276 type ApplyDbIdx128EndResult struct { 43277 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 43278 } 43279 43280 func NewApplyDbIdx128EndResult() *ApplyDbIdx128EndResult { 43281 return &ApplyDbIdx128EndResult{} 43282 } 43283 43284 var ApplyDbIdx128EndResult_Success_DEFAULT int32 43285 func (p *ApplyDbIdx128EndResult) GetSuccess() int32 { 43286 if !p.IsSetSuccess() { 43287 return ApplyDbIdx128EndResult_Success_DEFAULT 43288 } 43289 return *p.Success 43290 } 43291 func (p *ApplyDbIdx128EndResult) IsSetSuccess() bool { 43292 return p.Success != nil 43293 } 43294 43295 func (p *ApplyDbIdx128EndResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 43296 if _, err := iprot.ReadStructBegin(ctx); err != nil { 43297 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 43298 } 43299 43300 43301 for { 43302 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 43303 if err != nil { 43304 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 43305 } 43306 if fieldTypeId == thrift.STOP { break; } 43307 switch fieldId { 43308 case 0: 43309 if fieldTypeId == thrift.I32 { 43310 if err := p.ReadField0(ctx, iprot); err != nil { 43311 return err 43312 } 43313 } else { 43314 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43315 return err 43316 } 43317 } 43318 default: 43319 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43320 return err 43321 } 43322 } 43323 if err := iprot.ReadFieldEnd(ctx); err != nil { 43324 return err 43325 } 43326 } 43327 if err := iprot.ReadStructEnd(ctx); err != nil { 43328 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 43329 } 43330 return nil 43331 } 43332 43333 func (p *ApplyDbIdx128EndResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 43334 if v, err := iprot.ReadI32(ctx); err != nil { 43335 return thrift.PrependError("error reading field 0: ", err) 43336 } else { 43337 p.Success = &v 43338 } 43339 return nil 43340 } 43341 43342 func (p *ApplyDbIdx128EndResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 43343 if err := oprot.WriteStructBegin(ctx, "db_idx128_end_result"); err != nil { 43344 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 43345 if p != nil { 43346 if err := p.writeField0(ctx, oprot); err != nil { return err } 43347 } 43348 if err := oprot.WriteFieldStop(ctx); err != nil { 43349 return thrift.PrependError("write field stop error: ", err) } 43350 if err := oprot.WriteStructEnd(ctx); err != nil { 43351 return thrift.PrependError("write struct stop error: ", err) } 43352 return nil 43353 } 43354 43355 func (p *ApplyDbIdx128EndResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 43356 if p.IsSetSuccess() { 43357 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 43358 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 43359 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 43360 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 43361 if err := oprot.WriteFieldEnd(ctx); err != nil { 43362 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 43363 } 43364 return err 43365 } 43366 43367 func (p *ApplyDbIdx128EndResult) String() string { 43368 if p == nil { 43369 return "<nil>" 43370 } 43371 return fmt.Sprintf("ApplyDbIdx128EndResult(%+v)", *p) 43372 } 43373 43374 // Attributes: 43375 // - Scope 43376 // - Table 43377 // - Payer 43378 // - ID 43379 // - Data 43380 type ApplyDbIdx256StoreArgs struct { 43381 Scope *Uint64 `thrift:"scope,1" db:"scope" json:"scope"` 43382 Table *Uint64 `thrift:"table,2" db:"table" json:"table"` 43383 Payer *Uint64 `thrift:"payer,3" db:"payer" json:"payer"` 43384 ID *Uint64 `thrift:"id,4" db:"id" json:"id"` 43385 Data []byte `thrift:"data,5" db:"data" json:"data"` 43386 } 43387 43388 func NewApplyDbIdx256StoreArgs() *ApplyDbIdx256StoreArgs { 43389 return &ApplyDbIdx256StoreArgs{} 43390 } 43391 43392 var ApplyDbIdx256StoreArgs_Scope_DEFAULT *Uint64 43393 func (p *ApplyDbIdx256StoreArgs) GetScope() *Uint64 { 43394 if !p.IsSetScope() { 43395 return ApplyDbIdx256StoreArgs_Scope_DEFAULT 43396 } 43397 return p.Scope 43398 } 43399 var ApplyDbIdx256StoreArgs_Table_DEFAULT *Uint64 43400 func (p *ApplyDbIdx256StoreArgs) GetTable() *Uint64 { 43401 if !p.IsSetTable() { 43402 return ApplyDbIdx256StoreArgs_Table_DEFAULT 43403 } 43404 return p.Table 43405 } 43406 var ApplyDbIdx256StoreArgs_Payer_DEFAULT *Uint64 43407 func (p *ApplyDbIdx256StoreArgs) GetPayer() *Uint64 { 43408 if !p.IsSetPayer() { 43409 return ApplyDbIdx256StoreArgs_Payer_DEFAULT 43410 } 43411 return p.Payer 43412 } 43413 var ApplyDbIdx256StoreArgs_ID_DEFAULT *Uint64 43414 func (p *ApplyDbIdx256StoreArgs) GetID() *Uint64 { 43415 if !p.IsSetID() { 43416 return ApplyDbIdx256StoreArgs_ID_DEFAULT 43417 } 43418 return p.ID 43419 } 43420 43421 func (p *ApplyDbIdx256StoreArgs) GetData() []byte { 43422 return p.Data 43423 } 43424 func (p *ApplyDbIdx256StoreArgs) IsSetScope() bool { 43425 return p.Scope != nil 43426 } 43427 43428 func (p *ApplyDbIdx256StoreArgs) IsSetTable() bool { 43429 return p.Table != nil 43430 } 43431 43432 func (p *ApplyDbIdx256StoreArgs) IsSetPayer() bool { 43433 return p.Payer != nil 43434 } 43435 43436 func (p *ApplyDbIdx256StoreArgs) IsSetID() bool { 43437 return p.ID != nil 43438 } 43439 43440 func (p *ApplyDbIdx256StoreArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 43441 if _, err := iprot.ReadStructBegin(ctx); err != nil { 43442 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 43443 } 43444 43445 43446 for { 43447 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 43448 if err != nil { 43449 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 43450 } 43451 if fieldTypeId == thrift.STOP { break; } 43452 switch fieldId { 43453 case 1: 43454 if fieldTypeId == thrift.STRUCT { 43455 if err := p.ReadField1(ctx, iprot); err != nil { 43456 return err 43457 } 43458 } else { 43459 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43460 return err 43461 } 43462 } 43463 case 2: 43464 if fieldTypeId == thrift.STRUCT { 43465 if err := p.ReadField2(ctx, iprot); err != nil { 43466 return err 43467 } 43468 } else { 43469 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43470 return err 43471 } 43472 } 43473 case 3: 43474 if fieldTypeId == thrift.STRUCT { 43475 if err := p.ReadField3(ctx, iprot); err != nil { 43476 return err 43477 } 43478 } else { 43479 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43480 return err 43481 } 43482 } 43483 case 4: 43484 if fieldTypeId == thrift.STRUCT { 43485 if err := p.ReadField4(ctx, iprot); err != nil { 43486 return err 43487 } 43488 } else { 43489 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43490 return err 43491 } 43492 } 43493 case 5: 43494 if fieldTypeId == thrift.STRING { 43495 if err := p.ReadField5(ctx, iprot); err != nil { 43496 return err 43497 } 43498 } else { 43499 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43500 return err 43501 } 43502 } 43503 default: 43504 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43505 return err 43506 } 43507 } 43508 if err := iprot.ReadFieldEnd(ctx); err != nil { 43509 return err 43510 } 43511 } 43512 if err := iprot.ReadStructEnd(ctx); err != nil { 43513 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 43514 } 43515 return nil 43516 } 43517 43518 func (p *ApplyDbIdx256StoreArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 43519 p.Scope = &Uint64{} 43520 if err := p.Scope.Read(ctx, iprot); err != nil { 43521 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 43522 } 43523 return nil 43524 } 43525 43526 func (p *ApplyDbIdx256StoreArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 43527 p.Table = &Uint64{} 43528 if err := p.Table.Read(ctx, iprot); err != nil { 43529 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 43530 } 43531 return nil 43532 } 43533 43534 func (p *ApplyDbIdx256StoreArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 43535 p.Payer = &Uint64{} 43536 if err := p.Payer.Read(ctx, iprot); err != nil { 43537 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 43538 } 43539 return nil 43540 } 43541 43542 func (p *ApplyDbIdx256StoreArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 43543 p.ID = &Uint64{} 43544 if err := p.ID.Read(ctx, iprot); err != nil { 43545 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ID), err) 43546 } 43547 return nil 43548 } 43549 43550 func (p *ApplyDbIdx256StoreArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 43551 if v, err := iprot.ReadBinary(ctx); err != nil { 43552 return thrift.PrependError("error reading field 5: ", err) 43553 } else { 43554 p.Data = v 43555 } 43556 return nil 43557 } 43558 43559 func (p *ApplyDbIdx256StoreArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 43560 if err := oprot.WriteStructBegin(ctx, "db_idx256_store_args"); err != nil { 43561 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 43562 if p != nil { 43563 if err := p.writeField1(ctx, oprot); err != nil { return err } 43564 if err := p.writeField2(ctx, oprot); err != nil { return err } 43565 if err := p.writeField3(ctx, oprot); err != nil { return err } 43566 if err := p.writeField4(ctx, oprot); err != nil { return err } 43567 if err := p.writeField5(ctx, oprot); err != nil { return err } 43568 } 43569 if err := oprot.WriteFieldStop(ctx); err != nil { 43570 return thrift.PrependError("write field stop error: ", err) } 43571 if err := oprot.WriteStructEnd(ctx); err != nil { 43572 return thrift.PrependError("write struct stop error: ", err) } 43573 return nil 43574 } 43575 43576 func (p *ApplyDbIdx256StoreArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 43577 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 1); err != nil { 43578 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:scope: ", p), err) } 43579 if err := p.Scope.Write(ctx, oprot); err != nil { 43580 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 43581 } 43582 if err := oprot.WriteFieldEnd(ctx); err != nil { 43583 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:scope: ", p), err) } 43584 return err 43585 } 43586 43587 func (p *ApplyDbIdx256StoreArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 43588 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 2); err != nil { 43589 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:table: ", p), err) } 43590 if err := p.Table.Write(ctx, oprot); err != nil { 43591 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 43592 } 43593 if err := oprot.WriteFieldEnd(ctx); err != nil { 43594 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:table: ", p), err) } 43595 return err 43596 } 43597 43598 func (p *ApplyDbIdx256StoreArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 43599 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 3); err != nil { 43600 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:payer: ", p), err) } 43601 if err := p.Payer.Write(ctx, oprot); err != nil { 43602 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 43603 } 43604 if err := oprot.WriteFieldEnd(ctx); err != nil { 43605 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:payer: ", p), err) } 43606 return err 43607 } 43608 43609 func (p *ApplyDbIdx256StoreArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 43610 if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRUCT, 4); err != nil { 43611 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err) } 43612 if err := p.ID.Write(ctx, oprot); err != nil { 43613 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ID), err) 43614 } 43615 if err := oprot.WriteFieldEnd(ctx); err != nil { 43616 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err) } 43617 return err 43618 } 43619 43620 func (p *ApplyDbIdx256StoreArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 43621 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 5); err != nil { 43622 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:data: ", p), err) } 43623 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 43624 return thrift.PrependError(fmt.Sprintf("%T.data (5) field write error: ", p), err) } 43625 if err := oprot.WriteFieldEnd(ctx); err != nil { 43626 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:data: ", p), err) } 43627 return err 43628 } 43629 43630 func (p *ApplyDbIdx256StoreArgs) String() string { 43631 if p == nil { 43632 return "<nil>" 43633 } 43634 return fmt.Sprintf("ApplyDbIdx256StoreArgs(%+v)", *p) 43635 } 43636 43637 // Attributes: 43638 // - Success 43639 type ApplyDbIdx256StoreResult struct { 43640 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 43641 } 43642 43643 func NewApplyDbIdx256StoreResult() *ApplyDbIdx256StoreResult { 43644 return &ApplyDbIdx256StoreResult{} 43645 } 43646 43647 var ApplyDbIdx256StoreResult_Success_DEFAULT int32 43648 func (p *ApplyDbIdx256StoreResult) GetSuccess() int32 { 43649 if !p.IsSetSuccess() { 43650 return ApplyDbIdx256StoreResult_Success_DEFAULT 43651 } 43652 return *p.Success 43653 } 43654 func (p *ApplyDbIdx256StoreResult) IsSetSuccess() bool { 43655 return p.Success != nil 43656 } 43657 43658 func (p *ApplyDbIdx256StoreResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 43659 if _, err := iprot.ReadStructBegin(ctx); err != nil { 43660 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 43661 } 43662 43663 43664 for { 43665 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 43666 if err != nil { 43667 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 43668 } 43669 if fieldTypeId == thrift.STOP { break; } 43670 switch fieldId { 43671 case 0: 43672 if fieldTypeId == thrift.I32 { 43673 if err := p.ReadField0(ctx, iprot); err != nil { 43674 return err 43675 } 43676 } else { 43677 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43678 return err 43679 } 43680 } 43681 default: 43682 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43683 return err 43684 } 43685 } 43686 if err := iprot.ReadFieldEnd(ctx); err != nil { 43687 return err 43688 } 43689 } 43690 if err := iprot.ReadStructEnd(ctx); err != nil { 43691 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 43692 } 43693 return nil 43694 } 43695 43696 func (p *ApplyDbIdx256StoreResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 43697 if v, err := iprot.ReadI32(ctx); err != nil { 43698 return thrift.PrependError("error reading field 0: ", err) 43699 } else { 43700 p.Success = &v 43701 } 43702 return nil 43703 } 43704 43705 func (p *ApplyDbIdx256StoreResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 43706 if err := oprot.WriteStructBegin(ctx, "db_idx256_store_result"); err != nil { 43707 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 43708 if p != nil { 43709 if err := p.writeField0(ctx, oprot); err != nil { return err } 43710 } 43711 if err := oprot.WriteFieldStop(ctx); err != nil { 43712 return thrift.PrependError("write field stop error: ", err) } 43713 if err := oprot.WriteStructEnd(ctx); err != nil { 43714 return thrift.PrependError("write struct stop error: ", err) } 43715 return nil 43716 } 43717 43718 func (p *ApplyDbIdx256StoreResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 43719 if p.IsSetSuccess() { 43720 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 43721 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 43722 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 43723 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 43724 if err := oprot.WriteFieldEnd(ctx); err != nil { 43725 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 43726 } 43727 return err 43728 } 43729 43730 func (p *ApplyDbIdx256StoreResult) String() string { 43731 if p == nil { 43732 return "<nil>" 43733 } 43734 return fmt.Sprintf("ApplyDbIdx256StoreResult(%+v)", *p) 43735 } 43736 43737 // Attributes: 43738 // - Iterator 43739 // - Payer 43740 // - Data 43741 type ApplyDbIdx256UpdateArgs struct { 43742 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 43743 Payer *Uint64 `thrift:"payer,2" db:"payer" json:"payer"` 43744 Data []byte `thrift:"data,3" db:"data" json:"data"` 43745 } 43746 43747 func NewApplyDbIdx256UpdateArgs() *ApplyDbIdx256UpdateArgs { 43748 return &ApplyDbIdx256UpdateArgs{} 43749 } 43750 43751 43752 func (p *ApplyDbIdx256UpdateArgs) GetIterator() int32 { 43753 return p.Iterator 43754 } 43755 var ApplyDbIdx256UpdateArgs_Payer_DEFAULT *Uint64 43756 func (p *ApplyDbIdx256UpdateArgs) GetPayer() *Uint64 { 43757 if !p.IsSetPayer() { 43758 return ApplyDbIdx256UpdateArgs_Payer_DEFAULT 43759 } 43760 return p.Payer 43761 } 43762 43763 func (p *ApplyDbIdx256UpdateArgs) GetData() []byte { 43764 return p.Data 43765 } 43766 func (p *ApplyDbIdx256UpdateArgs) IsSetPayer() bool { 43767 return p.Payer != nil 43768 } 43769 43770 func (p *ApplyDbIdx256UpdateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 43771 if _, err := iprot.ReadStructBegin(ctx); err != nil { 43772 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 43773 } 43774 43775 43776 for { 43777 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 43778 if err != nil { 43779 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 43780 } 43781 if fieldTypeId == thrift.STOP { break; } 43782 switch fieldId { 43783 case 1: 43784 if fieldTypeId == thrift.I32 { 43785 if err := p.ReadField1(ctx, iprot); err != nil { 43786 return err 43787 } 43788 } else { 43789 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43790 return err 43791 } 43792 } 43793 case 2: 43794 if fieldTypeId == thrift.STRUCT { 43795 if err := p.ReadField2(ctx, iprot); err != nil { 43796 return err 43797 } 43798 } else { 43799 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43800 return err 43801 } 43802 } 43803 case 3: 43804 if fieldTypeId == thrift.STRING { 43805 if err := p.ReadField3(ctx, iprot); err != nil { 43806 return err 43807 } 43808 } else { 43809 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43810 return err 43811 } 43812 } 43813 default: 43814 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43815 return err 43816 } 43817 } 43818 if err := iprot.ReadFieldEnd(ctx); err != nil { 43819 return err 43820 } 43821 } 43822 if err := iprot.ReadStructEnd(ctx); err != nil { 43823 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 43824 } 43825 return nil 43826 } 43827 43828 func (p *ApplyDbIdx256UpdateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 43829 if v, err := iprot.ReadI32(ctx); err != nil { 43830 return thrift.PrependError("error reading field 1: ", err) 43831 } else { 43832 p.Iterator = v 43833 } 43834 return nil 43835 } 43836 43837 func (p *ApplyDbIdx256UpdateArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 43838 p.Payer = &Uint64{} 43839 if err := p.Payer.Read(ctx, iprot); err != nil { 43840 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 43841 } 43842 return nil 43843 } 43844 43845 func (p *ApplyDbIdx256UpdateArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 43846 if v, err := iprot.ReadBinary(ctx); err != nil { 43847 return thrift.PrependError("error reading field 3: ", err) 43848 } else { 43849 p.Data = v 43850 } 43851 return nil 43852 } 43853 43854 func (p *ApplyDbIdx256UpdateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 43855 if err := oprot.WriteStructBegin(ctx, "db_idx256_update_args"); err != nil { 43856 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 43857 if p != nil { 43858 if err := p.writeField1(ctx, oprot); err != nil { return err } 43859 if err := p.writeField2(ctx, oprot); err != nil { return err } 43860 if err := p.writeField3(ctx, oprot); err != nil { return err } 43861 } 43862 if err := oprot.WriteFieldStop(ctx); err != nil { 43863 return thrift.PrependError("write field stop error: ", err) } 43864 if err := oprot.WriteStructEnd(ctx); err != nil { 43865 return thrift.PrependError("write struct stop error: ", err) } 43866 return nil 43867 } 43868 43869 func (p *ApplyDbIdx256UpdateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 43870 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 43871 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 43872 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 43873 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 43874 if err := oprot.WriteFieldEnd(ctx); err != nil { 43875 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 43876 return err 43877 } 43878 43879 func (p *ApplyDbIdx256UpdateArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 43880 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 2); err != nil { 43881 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:payer: ", p), err) } 43882 if err := p.Payer.Write(ctx, oprot); err != nil { 43883 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 43884 } 43885 if err := oprot.WriteFieldEnd(ctx); err != nil { 43886 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:payer: ", p), err) } 43887 return err 43888 } 43889 43890 func (p *ApplyDbIdx256UpdateArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 43891 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 3); err != nil { 43892 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:data: ", p), err) } 43893 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 43894 return thrift.PrependError(fmt.Sprintf("%T.data (3) field write error: ", p), err) } 43895 if err := oprot.WriteFieldEnd(ctx); err != nil { 43896 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:data: ", p), err) } 43897 return err 43898 } 43899 43900 func (p *ApplyDbIdx256UpdateArgs) String() string { 43901 if p == nil { 43902 return "<nil>" 43903 } 43904 return fmt.Sprintf("ApplyDbIdx256UpdateArgs(%+v)", *p) 43905 } 43906 43907 type ApplyDbIdx256UpdateResult struct { 43908 } 43909 43910 func NewApplyDbIdx256UpdateResult() *ApplyDbIdx256UpdateResult { 43911 return &ApplyDbIdx256UpdateResult{} 43912 } 43913 43914 func (p *ApplyDbIdx256UpdateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 43915 if _, err := iprot.ReadStructBegin(ctx); err != nil { 43916 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 43917 } 43918 43919 43920 for { 43921 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 43922 if err != nil { 43923 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 43924 } 43925 if fieldTypeId == thrift.STOP { break; } 43926 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43927 return err 43928 } 43929 if err := iprot.ReadFieldEnd(ctx); err != nil { 43930 return err 43931 } 43932 } 43933 if err := iprot.ReadStructEnd(ctx); err != nil { 43934 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 43935 } 43936 return nil 43937 } 43938 43939 func (p *ApplyDbIdx256UpdateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 43940 if err := oprot.WriteStructBegin(ctx, "db_idx256_update_result"); err != nil { 43941 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 43942 if p != nil { 43943 } 43944 if err := oprot.WriteFieldStop(ctx); err != nil { 43945 return thrift.PrependError("write field stop error: ", err) } 43946 if err := oprot.WriteStructEnd(ctx); err != nil { 43947 return thrift.PrependError("write struct stop error: ", err) } 43948 return nil 43949 } 43950 43951 func (p *ApplyDbIdx256UpdateResult) String() string { 43952 if p == nil { 43953 return "<nil>" 43954 } 43955 return fmt.Sprintf("ApplyDbIdx256UpdateResult(%+v)", *p) 43956 } 43957 43958 // Attributes: 43959 // - Iterator 43960 type ApplyDbIdx256RemoveArgs struct { 43961 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 43962 } 43963 43964 func NewApplyDbIdx256RemoveArgs() *ApplyDbIdx256RemoveArgs { 43965 return &ApplyDbIdx256RemoveArgs{} 43966 } 43967 43968 43969 func (p *ApplyDbIdx256RemoveArgs) GetIterator() int32 { 43970 return p.Iterator 43971 } 43972 func (p *ApplyDbIdx256RemoveArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 43973 if _, err := iprot.ReadStructBegin(ctx); err != nil { 43974 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 43975 } 43976 43977 43978 for { 43979 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 43980 if err != nil { 43981 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 43982 } 43983 if fieldTypeId == thrift.STOP { break; } 43984 switch fieldId { 43985 case 1: 43986 if fieldTypeId == thrift.I32 { 43987 if err := p.ReadField1(ctx, iprot); err != nil { 43988 return err 43989 } 43990 } else { 43991 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43992 return err 43993 } 43994 } 43995 default: 43996 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 43997 return err 43998 } 43999 } 44000 if err := iprot.ReadFieldEnd(ctx); err != nil { 44001 return err 44002 } 44003 } 44004 if err := iprot.ReadStructEnd(ctx); err != nil { 44005 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 44006 } 44007 return nil 44008 } 44009 44010 func (p *ApplyDbIdx256RemoveArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 44011 if v, err := iprot.ReadI32(ctx); err != nil { 44012 return thrift.PrependError("error reading field 1: ", err) 44013 } else { 44014 p.Iterator = v 44015 } 44016 return nil 44017 } 44018 44019 func (p *ApplyDbIdx256RemoveArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 44020 if err := oprot.WriteStructBegin(ctx, "db_idx256_remove_args"); err != nil { 44021 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 44022 if p != nil { 44023 if err := p.writeField1(ctx, oprot); err != nil { return err } 44024 } 44025 if err := oprot.WriteFieldStop(ctx); err != nil { 44026 return thrift.PrependError("write field stop error: ", err) } 44027 if err := oprot.WriteStructEnd(ctx); err != nil { 44028 return thrift.PrependError("write struct stop error: ", err) } 44029 return nil 44030 } 44031 44032 func (p *ApplyDbIdx256RemoveArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 44033 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 44034 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 44035 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 44036 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 44037 if err := oprot.WriteFieldEnd(ctx); err != nil { 44038 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 44039 return err 44040 } 44041 44042 func (p *ApplyDbIdx256RemoveArgs) String() string { 44043 if p == nil { 44044 return "<nil>" 44045 } 44046 return fmt.Sprintf("ApplyDbIdx256RemoveArgs(%+v)", *p) 44047 } 44048 44049 type ApplyDbIdx256RemoveResult struct { 44050 } 44051 44052 func NewApplyDbIdx256RemoveResult() *ApplyDbIdx256RemoveResult { 44053 return &ApplyDbIdx256RemoveResult{} 44054 } 44055 44056 func (p *ApplyDbIdx256RemoveResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 44057 if _, err := iprot.ReadStructBegin(ctx); err != nil { 44058 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 44059 } 44060 44061 44062 for { 44063 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 44064 if err != nil { 44065 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 44066 } 44067 if fieldTypeId == thrift.STOP { break; } 44068 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44069 return err 44070 } 44071 if err := iprot.ReadFieldEnd(ctx); err != nil { 44072 return err 44073 } 44074 } 44075 if err := iprot.ReadStructEnd(ctx); err != nil { 44076 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 44077 } 44078 return nil 44079 } 44080 44081 func (p *ApplyDbIdx256RemoveResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 44082 if err := oprot.WriteStructBegin(ctx, "db_idx256_remove_result"); err != nil { 44083 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 44084 if p != nil { 44085 } 44086 if err := oprot.WriteFieldStop(ctx); err != nil { 44087 return thrift.PrependError("write field stop error: ", err) } 44088 if err := oprot.WriteStructEnd(ctx); err != nil { 44089 return thrift.PrependError("write struct stop error: ", err) } 44090 return nil 44091 } 44092 44093 func (p *ApplyDbIdx256RemoveResult) String() string { 44094 if p == nil { 44095 return "<nil>" 44096 } 44097 return fmt.Sprintf("ApplyDbIdx256RemoveResult(%+v)", *p) 44098 } 44099 44100 // Attributes: 44101 // - Iterator 44102 type ApplyDbIdx256NextArgs struct { 44103 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 44104 } 44105 44106 func NewApplyDbIdx256NextArgs() *ApplyDbIdx256NextArgs { 44107 return &ApplyDbIdx256NextArgs{} 44108 } 44109 44110 44111 func (p *ApplyDbIdx256NextArgs) GetIterator() int32 { 44112 return p.Iterator 44113 } 44114 func (p *ApplyDbIdx256NextArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 44115 if _, err := iprot.ReadStructBegin(ctx); err != nil { 44116 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 44117 } 44118 44119 44120 for { 44121 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 44122 if err != nil { 44123 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 44124 } 44125 if fieldTypeId == thrift.STOP { break; } 44126 switch fieldId { 44127 case 1: 44128 if fieldTypeId == thrift.I32 { 44129 if err := p.ReadField1(ctx, iprot); err != nil { 44130 return err 44131 } 44132 } else { 44133 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44134 return err 44135 } 44136 } 44137 default: 44138 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44139 return err 44140 } 44141 } 44142 if err := iprot.ReadFieldEnd(ctx); err != nil { 44143 return err 44144 } 44145 } 44146 if err := iprot.ReadStructEnd(ctx); err != nil { 44147 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 44148 } 44149 return nil 44150 } 44151 44152 func (p *ApplyDbIdx256NextArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 44153 if v, err := iprot.ReadI32(ctx); err != nil { 44154 return thrift.PrependError("error reading field 1: ", err) 44155 } else { 44156 p.Iterator = v 44157 } 44158 return nil 44159 } 44160 44161 func (p *ApplyDbIdx256NextArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 44162 if err := oprot.WriteStructBegin(ctx, "db_idx256_next_args"); err != nil { 44163 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 44164 if p != nil { 44165 if err := p.writeField1(ctx, oprot); err != nil { return err } 44166 } 44167 if err := oprot.WriteFieldStop(ctx); err != nil { 44168 return thrift.PrependError("write field stop error: ", err) } 44169 if err := oprot.WriteStructEnd(ctx); err != nil { 44170 return thrift.PrependError("write struct stop error: ", err) } 44171 return nil 44172 } 44173 44174 func (p *ApplyDbIdx256NextArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 44175 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 44176 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 44177 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 44178 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 44179 if err := oprot.WriteFieldEnd(ctx); err != nil { 44180 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 44181 return err 44182 } 44183 44184 func (p *ApplyDbIdx256NextArgs) String() string { 44185 if p == nil { 44186 return "<nil>" 44187 } 44188 return fmt.Sprintf("ApplyDbIdx256NextArgs(%+v)", *p) 44189 } 44190 44191 // Attributes: 44192 // - Success 44193 type ApplyDbIdx256NextResult struct { 44194 Success *NextPreviousReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 44195 } 44196 44197 func NewApplyDbIdx256NextResult() *ApplyDbIdx256NextResult { 44198 return &ApplyDbIdx256NextResult{} 44199 } 44200 44201 var ApplyDbIdx256NextResult_Success_DEFAULT *NextPreviousReturn 44202 func (p *ApplyDbIdx256NextResult) GetSuccess() *NextPreviousReturn { 44203 if !p.IsSetSuccess() { 44204 return ApplyDbIdx256NextResult_Success_DEFAULT 44205 } 44206 return p.Success 44207 } 44208 func (p *ApplyDbIdx256NextResult) IsSetSuccess() bool { 44209 return p.Success != nil 44210 } 44211 44212 func (p *ApplyDbIdx256NextResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 44213 if _, err := iprot.ReadStructBegin(ctx); err != nil { 44214 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 44215 } 44216 44217 44218 for { 44219 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 44220 if err != nil { 44221 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 44222 } 44223 if fieldTypeId == thrift.STOP { break; } 44224 switch fieldId { 44225 case 0: 44226 if fieldTypeId == thrift.STRUCT { 44227 if err := p.ReadField0(ctx, iprot); err != nil { 44228 return err 44229 } 44230 } else { 44231 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44232 return err 44233 } 44234 } 44235 default: 44236 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44237 return err 44238 } 44239 } 44240 if err := iprot.ReadFieldEnd(ctx); err != nil { 44241 return err 44242 } 44243 } 44244 if err := iprot.ReadStructEnd(ctx); err != nil { 44245 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 44246 } 44247 return nil 44248 } 44249 44250 func (p *ApplyDbIdx256NextResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 44251 p.Success = &NextPreviousReturn{} 44252 if err := p.Success.Read(ctx, iprot); err != nil { 44253 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 44254 } 44255 return nil 44256 } 44257 44258 func (p *ApplyDbIdx256NextResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 44259 if err := oprot.WriteStructBegin(ctx, "db_idx256_next_result"); err != nil { 44260 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 44261 if p != nil { 44262 if err := p.writeField0(ctx, oprot); err != nil { return err } 44263 } 44264 if err := oprot.WriteFieldStop(ctx); err != nil { 44265 return thrift.PrependError("write field stop error: ", err) } 44266 if err := oprot.WriteStructEnd(ctx); err != nil { 44267 return thrift.PrependError("write struct stop error: ", err) } 44268 return nil 44269 } 44270 44271 func (p *ApplyDbIdx256NextResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 44272 if p.IsSetSuccess() { 44273 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 44274 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 44275 if err := p.Success.Write(ctx, oprot); err != nil { 44276 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 44277 } 44278 if err := oprot.WriteFieldEnd(ctx); err != nil { 44279 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 44280 } 44281 return err 44282 } 44283 44284 func (p *ApplyDbIdx256NextResult) String() string { 44285 if p == nil { 44286 return "<nil>" 44287 } 44288 return fmt.Sprintf("ApplyDbIdx256NextResult(%+v)", *p) 44289 } 44290 44291 // Attributes: 44292 // - Iterator 44293 type ApplyDbIdx256PreviousArgs struct { 44294 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 44295 } 44296 44297 func NewApplyDbIdx256PreviousArgs() *ApplyDbIdx256PreviousArgs { 44298 return &ApplyDbIdx256PreviousArgs{} 44299 } 44300 44301 44302 func (p *ApplyDbIdx256PreviousArgs) GetIterator() int32 { 44303 return p.Iterator 44304 } 44305 func (p *ApplyDbIdx256PreviousArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 44306 if _, err := iprot.ReadStructBegin(ctx); err != nil { 44307 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 44308 } 44309 44310 44311 for { 44312 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 44313 if err != nil { 44314 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 44315 } 44316 if fieldTypeId == thrift.STOP { break; } 44317 switch fieldId { 44318 case 1: 44319 if fieldTypeId == thrift.I32 { 44320 if err := p.ReadField1(ctx, iprot); err != nil { 44321 return err 44322 } 44323 } else { 44324 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44325 return err 44326 } 44327 } 44328 default: 44329 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44330 return err 44331 } 44332 } 44333 if err := iprot.ReadFieldEnd(ctx); err != nil { 44334 return err 44335 } 44336 } 44337 if err := iprot.ReadStructEnd(ctx); err != nil { 44338 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 44339 } 44340 return nil 44341 } 44342 44343 func (p *ApplyDbIdx256PreviousArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 44344 if v, err := iprot.ReadI32(ctx); err != nil { 44345 return thrift.PrependError("error reading field 1: ", err) 44346 } else { 44347 p.Iterator = v 44348 } 44349 return nil 44350 } 44351 44352 func (p *ApplyDbIdx256PreviousArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 44353 if err := oprot.WriteStructBegin(ctx, "db_idx256_previous_args"); err != nil { 44354 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 44355 if p != nil { 44356 if err := p.writeField1(ctx, oprot); err != nil { return err } 44357 } 44358 if err := oprot.WriteFieldStop(ctx); err != nil { 44359 return thrift.PrependError("write field stop error: ", err) } 44360 if err := oprot.WriteStructEnd(ctx); err != nil { 44361 return thrift.PrependError("write struct stop error: ", err) } 44362 return nil 44363 } 44364 44365 func (p *ApplyDbIdx256PreviousArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 44366 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 44367 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 44368 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 44369 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 44370 if err := oprot.WriteFieldEnd(ctx); err != nil { 44371 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 44372 return err 44373 } 44374 44375 func (p *ApplyDbIdx256PreviousArgs) String() string { 44376 if p == nil { 44377 return "<nil>" 44378 } 44379 return fmt.Sprintf("ApplyDbIdx256PreviousArgs(%+v)", *p) 44380 } 44381 44382 // Attributes: 44383 // - Success 44384 type ApplyDbIdx256PreviousResult struct { 44385 Success *NextPreviousReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 44386 } 44387 44388 func NewApplyDbIdx256PreviousResult() *ApplyDbIdx256PreviousResult { 44389 return &ApplyDbIdx256PreviousResult{} 44390 } 44391 44392 var ApplyDbIdx256PreviousResult_Success_DEFAULT *NextPreviousReturn 44393 func (p *ApplyDbIdx256PreviousResult) GetSuccess() *NextPreviousReturn { 44394 if !p.IsSetSuccess() { 44395 return ApplyDbIdx256PreviousResult_Success_DEFAULT 44396 } 44397 return p.Success 44398 } 44399 func (p *ApplyDbIdx256PreviousResult) IsSetSuccess() bool { 44400 return p.Success != nil 44401 } 44402 44403 func (p *ApplyDbIdx256PreviousResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 44404 if _, err := iprot.ReadStructBegin(ctx); err != nil { 44405 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 44406 } 44407 44408 44409 for { 44410 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 44411 if err != nil { 44412 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 44413 } 44414 if fieldTypeId == thrift.STOP { break; } 44415 switch fieldId { 44416 case 0: 44417 if fieldTypeId == thrift.STRUCT { 44418 if err := p.ReadField0(ctx, iprot); err != nil { 44419 return err 44420 } 44421 } else { 44422 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44423 return err 44424 } 44425 } 44426 default: 44427 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44428 return err 44429 } 44430 } 44431 if err := iprot.ReadFieldEnd(ctx); err != nil { 44432 return err 44433 } 44434 } 44435 if err := iprot.ReadStructEnd(ctx); err != nil { 44436 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 44437 } 44438 return nil 44439 } 44440 44441 func (p *ApplyDbIdx256PreviousResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 44442 p.Success = &NextPreviousReturn{} 44443 if err := p.Success.Read(ctx, iprot); err != nil { 44444 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 44445 } 44446 return nil 44447 } 44448 44449 func (p *ApplyDbIdx256PreviousResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 44450 if err := oprot.WriteStructBegin(ctx, "db_idx256_previous_result"); err != nil { 44451 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 44452 if p != nil { 44453 if err := p.writeField0(ctx, oprot); err != nil { return err } 44454 } 44455 if err := oprot.WriteFieldStop(ctx); err != nil { 44456 return thrift.PrependError("write field stop error: ", err) } 44457 if err := oprot.WriteStructEnd(ctx); err != nil { 44458 return thrift.PrependError("write struct stop error: ", err) } 44459 return nil 44460 } 44461 44462 func (p *ApplyDbIdx256PreviousResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 44463 if p.IsSetSuccess() { 44464 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 44465 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 44466 if err := p.Success.Write(ctx, oprot); err != nil { 44467 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 44468 } 44469 if err := oprot.WriteFieldEnd(ctx); err != nil { 44470 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 44471 } 44472 return err 44473 } 44474 44475 func (p *ApplyDbIdx256PreviousResult) String() string { 44476 if p == nil { 44477 return "<nil>" 44478 } 44479 return fmt.Sprintf("ApplyDbIdx256PreviousResult(%+v)", *p) 44480 } 44481 44482 // Attributes: 44483 // - Code 44484 // - Scope 44485 // - Table 44486 // - Primary 44487 type ApplyDbIdx256FindPrimaryArgs struct { 44488 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 44489 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 44490 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 44491 Primary *Uint64 `thrift:"primary,4" db:"primary" json:"primary"` 44492 } 44493 44494 func NewApplyDbIdx256FindPrimaryArgs() *ApplyDbIdx256FindPrimaryArgs { 44495 return &ApplyDbIdx256FindPrimaryArgs{} 44496 } 44497 44498 var ApplyDbIdx256FindPrimaryArgs_Code_DEFAULT *Uint64 44499 func (p *ApplyDbIdx256FindPrimaryArgs) GetCode() *Uint64 { 44500 if !p.IsSetCode() { 44501 return ApplyDbIdx256FindPrimaryArgs_Code_DEFAULT 44502 } 44503 return p.Code 44504 } 44505 var ApplyDbIdx256FindPrimaryArgs_Scope_DEFAULT *Uint64 44506 func (p *ApplyDbIdx256FindPrimaryArgs) GetScope() *Uint64 { 44507 if !p.IsSetScope() { 44508 return ApplyDbIdx256FindPrimaryArgs_Scope_DEFAULT 44509 } 44510 return p.Scope 44511 } 44512 var ApplyDbIdx256FindPrimaryArgs_Table_DEFAULT *Uint64 44513 func (p *ApplyDbIdx256FindPrimaryArgs) GetTable() *Uint64 { 44514 if !p.IsSetTable() { 44515 return ApplyDbIdx256FindPrimaryArgs_Table_DEFAULT 44516 } 44517 return p.Table 44518 } 44519 var ApplyDbIdx256FindPrimaryArgs_Primary_DEFAULT *Uint64 44520 func (p *ApplyDbIdx256FindPrimaryArgs) GetPrimary() *Uint64 { 44521 if !p.IsSetPrimary() { 44522 return ApplyDbIdx256FindPrimaryArgs_Primary_DEFAULT 44523 } 44524 return p.Primary 44525 } 44526 func (p *ApplyDbIdx256FindPrimaryArgs) IsSetCode() bool { 44527 return p.Code != nil 44528 } 44529 44530 func (p *ApplyDbIdx256FindPrimaryArgs) IsSetScope() bool { 44531 return p.Scope != nil 44532 } 44533 44534 func (p *ApplyDbIdx256FindPrimaryArgs) IsSetTable() bool { 44535 return p.Table != nil 44536 } 44537 44538 func (p *ApplyDbIdx256FindPrimaryArgs) IsSetPrimary() bool { 44539 return p.Primary != nil 44540 } 44541 44542 func (p *ApplyDbIdx256FindPrimaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 44543 if _, err := iprot.ReadStructBegin(ctx); err != nil { 44544 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 44545 } 44546 44547 44548 for { 44549 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 44550 if err != nil { 44551 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 44552 } 44553 if fieldTypeId == thrift.STOP { break; } 44554 switch fieldId { 44555 case 1: 44556 if fieldTypeId == thrift.STRUCT { 44557 if err := p.ReadField1(ctx, iprot); err != nil { 44558 return err 44559 } 44560 } else { 44561 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44562 return err 44563 } 44564 } 44565 case 2: 44566 if fieldTypeId == thrift.STRUCT { 44567 if err := p.ReadField2(ctx, iprot); err != nil { 44568 return err 44569 } 44570 } else { 44571 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44572 return err 44573 } 44574 } 44575 case 3: 44576 if fieldTypeId == thrift.STRUCT { 44577 if err := p.ReadField3(ctx, iprot); err != nil { 44578 return err 44579 } 44580 } else { 44581 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44582 return err 44583 } 44584 } 44585 case 4: 44586 if fieldTypeId == thrift.STRUCT { 44587 if err := p.ReadField4(ctx, iprot); err != nil { 44588 return err 44589 } 44590 } else { 44591 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44592 return err 44593 } 44594 } 44595 default: 44596 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44597 return err 44598 } 44599 } 44600 if err := iprot.ReadFieldEnd(ctx); err != nil { 44601 return err 44602 } 44603 } 44604 if err := iprot.ReadStructEnd(ctx); err != nil { 44605 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 44606 } 44607 return nil 44608 } 44609 44610 func (p *ApplyDbIdx256FindPrimaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 44611 p.Code = &Uint64{} 44612 if err := p.Code.Read(ctx, iprot); err != nil { 44613 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 44614 } 44615 return nil 44616 } 44617 44618 func (p *ApplyDbIdx256FindPrimaryArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 44619 p.Scope = &Uint64{} 44620 if err := p.Scope.Read(ctx, iprot); err != nil { 44621 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 44622 } 44623 return nil 44624 } 44625 44626 func (p *ApplyDbIdx256FindPrimaryArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 44627 p.Table = &Uint64{} 44628 if err := p.Table.Read(ctx, iprot); err != nil { 44629 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 44630 } 44631 return nil 44632 } 44633 44634 func (p *ApplyDbIdx256FindPrimaryArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 44635 p.Primary = &Uint64{} 44636 if err := p.Primary.Read(ctx, iprot); err != nil { 44637 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 44638 } 44639 return nil 44640 } 44641 44642 func (p *ApplyDbIdx256FindPrimaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 44643 if err := oprot.WriteStructBegin(ctx, "db_idx256_find_primary_args"); err != nil { 44644 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 44645 if p != nil { 44646 if err := p.writeField1(ctx, oprot); err != nil { return err } 44647 if err := p.writeField2(ctx, oprot); err != nil { return err } 44648 if err := p.writeField3(ctx, oprot); err != nil { return err } 44649 if err := p.writeField4(ctx, oprot); err != nil { return err } 44650 } 44651 if err := oprot.WriteFieldStop(ctx); err != nil { 44652 return thrift.PrependError("write field stop error: ", err) } 44653 if err := oprot.WriteStructEnd(ctx); err != nil { 44654 return thrift.PrependError("write struct stop error: ", err) } 44655 return nil 44656 } 44657 44658 func (p *ApplyDbIdx256FindPrimaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 44659 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 44660 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 44661 if err := p.Code.Write(ctx, oprot); err != nil { 44662 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 44663 } 44664 if err := oprot.WriteFieldEnd(ctx); err != nil { 44665 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 44666 return err 44667 } 44668 44669 func (p *ApplyDbIdx256FindPrimaryArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 44670 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 44671 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 44672 if err := p.Scope.Write(ctx, oprot); err != nil { 44673 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 44674 } 44675 if err := oprot.WriteFieldEnd(ctx); err != nil { 44676 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 44677 return err 44678 } 44679 44680 func (p *ApplyDbIdx256FindPrimaryArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 44681 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 44682 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 44683 if err := p.Table.Write(ctx, oprot); err != nil { 44684 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 44685 } 44686 if err := oprot.WriteFieldEnd(ctx); err != nil { 44687 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 44688 return err 44689 } 44690 44691 func (p *ApplyDbIdx256FindPrimaryArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 44692 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 4); err != nil { 44693 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:primary: ", p), err) } 44694 if err := p.Primary.Write(ctx, oprot); err != nil { 44695 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 44696 } 44697 if err := oprot.WriteFieldEnd(ctx); err != nil { 44698 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:primary: ", p), err) } 44699 return err 44700 } 44701 44702 func (p *ApplyDbIdx256FindPrimaryArgs) String() string { 44703 if p == nil { 44704 return "<nil>" 44705 } 44706 return fmt.Sprintf("ApplyDbIdx256FindPrimaryArgs(%+v)", *p) 44707 } 44708 44709 // Attributes: 44710 // - Success 44711 type ApplyDbIdx256FindPrimaryResult struct { 44712 Success *FindPrimaryReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 44713 } 44714 44715 func NewApplyDbIdx256FindPrimaryResult() *ApplyDbIdx256FindPrimaryResult { 44716 return &ApplyDbIdx256FindPrimaryResult{} 44717 } 44718 44719 var ApplyDbIdx256FindPrimaryResult_Success_DEFAULT *FindPrimaryReturn 44720 func (p *ApplyDbIdx256FindPrimaryResult) GetSuccess() *FindPrimaryReturn { 44721 if !p.IsSetSuccess() { 44722 return ApplyDbIdx256FindPrimaryResult_Success_DEFAULT 44723 } 44724 return p.Success 44725 } 44726 func (p *ApplyDbIdx256FindPrimaryResult) IsSetSuccess() bool { 44727 return p.Success != nil 44728 } 44729 44730 func (p *ApplyDbIdx256FindPrimaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 44731 if _, err := iprot.ReadStructBegin(ctx); err != nil { 44732 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 44733 } 44734 44735 44736 for { 44737 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 44738 if err != nil { 44739 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 44740 } 44741 if fieldTypeId == thrift.STOP { break; } 44742 switch fieldId { 44743 case 0: 44744 if fieldTypeId == thrift.STRUCT { 44745 if err := p.ReadField0(ctx, iprot); err != nil { 44746 return err 44747 } 44748 } else { 44749 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44750 return err 44751 } 44752 } 44753 default: 44754 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44755 return err 44756 } 44757 } 44758 if err := iprot.ReadFieldEnd(ctx); err != nil { 44759 return err 44760 } 44761 } 44762 if err := iprot.ReadStructEnd(ctx); err != nil { 44763 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 44764 } 44765 return nil 44766 } 44767 44768 func (p *ApplyDbIdx256FindPrimaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 44769 p.Success = &FindPrimaryReturn{} 44770 if err := p.Success.Read(ctx, iprot); err != nil { 44771 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 44772 } 44773 return nil 44774 } 44775 44776 func (p *ApplyDbIdx256FindPrimaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 44777 if err := oprot.WriteStructBegin(ctx, "db_idx256_find_primary_result"); err != nil { 44778 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 44779 if p != nil { 44780 if err := p.writeField0(ctx, oprot); err != nil { return err } 44781 } 44782 if err := oprot.WriteFieldStop(ctx); err != nil { 44783 return thrift.PrependError("write field stop error: ", err) } 44784 if err := oprot.WriteStructEnd(ctx); err != nil { 44785 return thrift.PrependError("write struct stop error: ", err) } 44786 return nil 44787 } 44788 44789 func (p *ApplyDbIdx256FindPrimaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 44790 if p.IsSetSuccess() { 44791 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 44792 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 44793 if err := p.Success.Write(ctx, oprot); err != nil { 44794 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 44795 } 44796 if err := oprot.WriteFieldEnd(ctx); err != nil { 44797 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 44798 } 44799 return err 44800 } 44801 44802 func (p *ApplyDbIdx256FindPrimaryResult) String() string { 44803 if p == nil { 44804 return "<nil>" 44805 } 44806 return fmt.Sprintf("ApplyDbIdx256FindPrimaryResult(%+v)", *p) 44807 } 44808 44809 // Attributes: 44810 // - Code 44811 // - Scope 44812 // - Table 44813 // - Data 44814 type ApplyDbIdx256FindSecondaryArgs struct { 44815 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 44816 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 44817 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 44818 Data []byte `thrift:"data,4" db:"data" json:"data"` 44819 } 44820 44821 func NewApplyDbIdx256FindSecondaryArgs() *ApplyDbIdx256FindSecondaryArgs { 44822 return &ApplyDbIdx256FindSecondaryArgs{} 44823 } 44824 44825 var ApplyDbIdx256FindSecondaryArgs_Code_DEFAULT *Uint64 44826 func (p *ApplyDbIdx256FindSecondaryArgs) GetCode() *Uint64 { 44827 if !p.IsSetCode() { 44828 return ApplyDbIdx256FindSecondaryArgs_Code_DEFAULT 44829 } 44830 return p.Code 44831 } 44832 var ApplyDbIdx256FindSecondaryArgs_Scope_DEFAULT *Uint64 44833 func (p *ApplyDbIdx256FindSecondaryArgs) GetScope() *Uint64 { 44834 if !p.IsSetScope() { 44835 return ApplyDbIdx256FindSecondaryArgs_Scope_DEFAULT 44836 } 44837 return p.Scope 44838 } 44839 var ApplyDbIdx256FindSecondaryArgs_Table_DEFAULT *Uint64 44840 func (p *ApplyDbIdx256FindSecondaryArgs) GetTable() *Uint64 { 44841 if !p.IsSetTable() { 44842 return ApplyDbIdx256FindSecondaryArgs_Table_DEFAULT 44843 } 44844 return p.Table 44845 } 44846 44847 func (p *ApplyDbIdx256FindSecondaryArgs) GetData() []byte { 44848 return p.Data 44849 } 44850 func (p *ApplyDbIdx256FindSecondaryArgs) IsSetCode() bool { 44851 return p.Code != nil 44852 } 44853 44854 func (p *ApplyDbIdx256FindSecondaryArgs) IsSetScope() bool { 44855 return p.Scope != nil 44856 } 44857 44858 func (p *ApplyDbIdx256FindSecondaryArgs) IsSetTable() bool { 44859 return p.Table != nil 44860 } 44861 44862 func (p *ApplyDbIdx256FindSecondaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 44863 if _, err := iprot.ReadStructBegin(ctx); err != nil { 44864 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 44865 } 44866 44867 44868 for { 44869 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 44870 if err != nil { 44871 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 44872 } 44873 if fieldTypeId == thrift.STOP { break; } 44874 switch fieldId { 44875 case 1: 44876 if fieldTypeId == thrift.STRUCT { 44877 if err := p.ReadField1(ctx, iprot); err != nil { 44878 return err 44879 } 44880 } else { 44881 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44882 return err 44883 } 44884 } 44885 case 2: 44886 if fieldTypeId == thrift.STRUCT { 44887 if err := p.ReadField2(ctx, iprot); err != nil { 44888 return err 44889 } 44890 } else { 44891 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44892 return err 44893 } 44894 } 44895 case 3: 44896 if fieldTypeId == thrift.STRUCT { 44897 if err := p.ReadField3(ctx, iprot); err != nil { 44898 return err 44899 } 44900 } else { 44901 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44902 return err 44903 } 44904 } 44905 case 4: 44906 if fieldTypeId == thrift.STRING { 44907 if err := p.ReadField4(ctx, iprot); err != nil { 44908 return err 44909 } 44910 } else { 44911 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44912 return err 44913 } 44914 } 44915 default: 44916 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 44917 return err 44918 } 44919 } 44920 if err := iprot.ReadFieldEnd(ctx); err != nil { 44921 return err 44922 } 44923 } 44924 if err := iprot.ReadStructEnd(ctx); err != nil { 44925 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 44926 } 44927 return nil 44928 } 44929 44930 func (p *ApplyDbIdx256FindSecondaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 44931 p.Code = &Uint64{} 44932 if err := p.Code.Read(ctx, iprot); err != nil { 44933 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 44934 } 44935 return nil 44936 } 44937 44938 func (p *ApplyDbIdx256FindSecondaryArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 44939 p.Scope = &Uint64{} 44940 if err := p.Scope.Read(ctx, iprot); err != nil { 44941 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 44942 } 44943 return nil 44944 } 44945 44946 func (p *ApplyDbIdx256FindSecondaryArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 44947 p.Table = &Uint64{} 44948 if err := p.Table.Read(ctx, iprot); err != nil { 44949 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 44950 } 44951 return nil 44952 } 44953 44954 func (p *ApplyDbIdx256FindSecondaryArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 44955 if v, err := iprot.ReadBinary(ctx); err != nil { 44956 return thrift.PrependError("error reading field 4: ", err) 44957 } else { 44958 p.Data = v 44959 } 44960 return nil 44961 } 44962 44963 func (p *ApplyDbIdx256FindSecondaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 44964 if err := oprot.WriteStructBegin(ctx, "db_idx256_find_secondary_args"); err != nil { 44965 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 44966 if p != nil { 44967 if err := p.writeField1(ctx, oprot); err != nil { return err } 44968 if err := p.writeField2(ctx, oprot); err != nil { return err } 44969 if err := p.writeField3(ctx, oprot); err != nil { return err } 44970 if err := p.writeField4(ctx, oprot); err != nil { return err } 44971 } 44972 if err := oprot.WriteFieldStop(ctx); err != nil { 44973 return thrift.PrependError("write field stop error: ", err) } 44974 if err := oprot.WriteStructEnd(ctx); err != nil { 44975 return thrift.PrependError("write struct stop error: ", err) } 44976 return nil 44977 } 44978 44979 func (p *ApplyDbIdx256FindSecondaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 44980 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 44981 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 44982 if err := p.Code.Write(ctx, oprot); err != nil { 44983 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 44984 } 44985 if err := oprot.WriteFieldEnd(ctx); err != nil { 44986 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 44987 return err 44988 } 44989 44990 func (p *ApplyDbIdx256FindSecondaryArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 44991 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 44992 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 44993 if err := p.Scope.Write(ctx, oprot); err != nil { 44994 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 44995 } 44996 if err := oprot.WriteFieldEnd(ctx); err != nil { 44997 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 44998 return err 44999 } 45000 45001 func (p *ApplyDbIdx256FindSecondaryArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 45002 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 45003 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 45004 if err := p.Table.Write(ctx, oprot); err != nil { 45005 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 45006 } 45007 if err := oprot.WriteFieldEnd(ctx); err != nil { 45008 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 45009 return err 45010 } 45011 45012 func (p *ApplyDbIdx256FindSecondaryArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 45013 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 4); err != nil { 45014 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:data: ", p), err) } 45015 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 45016 return thrift.PrependError(fmt.Sprintf("%T.data (4) field write error: ", p), err) } 45017 if err := oprot.WriteFieldEnd(ctx); err != nil { 45018 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:data: ", p), err) } 45019 return err 45020 } 45021 45022 func (p *ApplyDbIdx256FindSecondaryArgs) String() string { 45023 if p == nil { 45024 return "<nil>" 45025 } 45026 return fmt.Sprintf("ApplyDbIdx256FindSecondaryArgs(%+v)", *p) 45027 } 45028 45029 // Attributes: 45030 // - Success 45031 type ApplyDbIdx256FindSecondaryResult struct { 45032 Success *FindSecondaryReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 45033 } 45034 45035 func NewApplyDbIdx256FindSecondaryResult() *ApplyDbIdx256FindSecondaryResult { 45036 return &ApplyDbIdx256FindSecondaryResult{} 45037 } 45038 45039 var ApplyDbIdx256FindSecondaryResult_Success_DEFAULT *FindSecondaryReturn 45040 func (p *ApplyDbIdx256FindSecondaryResult) GetSuccess() *FindSecondaryReturn { 45041 if !p.IsSetSuccess() { 45042 return ApplyDbIdx256FindSecondaryResult_Success_DEFAULT 45043 } 45044 return p.Success 45045 } 45046 func (p *ApplyDbIdx256FindSecondaryResult) IsSetSuccess() bool { 45047 return p.Success != nil 45048 } 45049 45050 func (p *ApplyDbIdx256FindSecondaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 45051 if _, err := iprot.ReadStructBegin(ctx); err != nil { 45052 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 45053 } 45054 45055 45056 for { 45057 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 45058 if err != nil { 45059 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 45060 } 45061 if fieldTypeId == thrift.STOP { break; } 45062 switch fieldId { 45063 case 0: 45064 if fieldTypeId == thrift.STRUCT { 45065 if err := p.ReadField0(ctx, iprot); err != nil { 45066 return err 45067 } 45068 } else { 45069 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45070 return err 45071 } 45072 } 45073 default: 45074 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45075 return err 45076 } 45077 } 45078 if err := iprot.ReadFieldEnd(ctx); err != nil { 45079 return err 45080 } 45081 } 45082 if err := iprot.ReadStructEnd(ctx); err != nil { 45083 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 45084 } 45085 return nil 45086 } 45087 45088 func (p *ApplyDbIdx256FindSecondaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 45089 p.Success = &FindSecondaryReturn{} 45090 if err := p.Success.Read(ctx, iprot); err != nil { 45091 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 45092 } 45093 return nil 45094 } 45095 45096 func (p *ApplyDbIdx256FindSecondaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 45097 if err := oprot.WriteStructBegin(ctx, "db_idx256_find_secondary_result"); err != nil { 45098 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 45099 if p != nil { 45100 if err := p.writeField0(ctx, oprot); err != nil { return err } 45101 } 45102 if err := oprot.WriteFieldStop(ctx); err != nil { 45103 return thrift.PrependError("write field stop error: ", err) } 45104 if err := oprot.WriteStructEnd(ctx); err != nil { 45105 return thrift.PrependError("write struct stop error: ", err) } 45106 return nil 45107 } 45108 45109 func (p *ApplyDbIdx256FindSecondaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 45110 if p.IsSetSuccess() { 45111 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 45112 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 45113 if err := p.Success.Write(ctx, oprot); err != nil { 45114 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 45115 } 45116 if err := oprot.WriteFieldEnd(ctx); err != nil { 45117 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 45118 } 45119 return err 45120 } 45121 45122 func (p *ApplyDbIdx256FindSecondaryResult) String() string { 45123 if p == nil { 45124 return "<nil>" 45125 } 45126 return fmt.Sprintf("ApplyDbIdx256FindSecondaryResult(%+v)", *p) 45127 } 45128 45129 // Attributes: 45130 // - Code 45131 // - Scope 45132 // - Table 45133 // - Data 45134 // - Primary 45135 type ApplyDbIdx256LowerboundArgs struct { 45136 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 45137 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 45138 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 45139 Data []byte `thrift:"data,4" db:"data" json:"data"` 45140 Primary *Uint64 `thrift:"primary,5" db:"primary" json:"primary"` 45141 } 45142 45143 func NewApplyDbIdx256LowerboundArgs() *ApplyDbIdx256LowerboundArgs { 45144 return &ApplyDbIdx256LowerboundArgs{} 45145 } 45146 45147 var ApplyDbIdx256LowerboundArgs_Code_DEFAULT *Uint64 45148 func (p *ApplyDbIdx256LowerboundArgs) GetCode() *Uint64 { 45149 if !p.IsSetCode() { 45150 return ApplyDbIdx256LowerboundArgs_Code_DEFAULT 45151 } 45152 return p.Code 45153 } 45154 var ApplyDbIdx256LowerboundArgs_Scope_DEFAULT *Uint64 45155 func (p *ApplyDbIdx256LowerboundArgs) GetScope() *Uint64 { 45156 if !p.IsSetScope() { 45157 return ApplyDbIdx256LowerboundArgs_Scope_DEFAULT 45158 } 45159 return p.Scope 45160 } 45161 var ApplyDbIdx256LowerboundArgs_Table_DEFAULT *Uint64 45162 func (p *ApplyDbIdx256LowerboundArgs) GetTable() *Uint64 { 45163 if !p.IsSetTable() { 45164 return ApplyDbIdx256LowerboundArgs_Table_DEFAULT 45165 } 45166 return p.Table 45167 } 45168 45169 func (p *ApplyDbIdx256LowerboundArgs) GetData() []byte { 45170 return p.Data 45171 } 45172 var ApplyDbIdx256LowerboundArgs_Primary_DEFAULT *Uint64 45173 func (p *ApplyDbIdx256LowerboundArgs) GetPrimary() *Uint64 { 45174 if !p.IsSetPrimary() { 45175 return ApplyDbIdx256LowerboundArgs_Primary_DEFAULT 45176 } 45177 return p.Primary 45178 } 45179 func (p *ApplyDbIdx256LowerboundArgs) IsSetCode() bool { 45180 return p.Code != nil 45181 } 45182 45183 func (p *ApplyDbIdx256LowerboundArgs) IsSetScope() bool { 45184 return p.Scope != nil 45185 } 45186 45187 func (p *ApplyDbIdx256LowerboundArgs) IsSetTable() bool { 45188 return p.Table != nil 45189 } 45190 45191 func (p *ApplyDbIdx256LowerboundArgs) IsSetPrimary() bool { 45192 return p.Primary != nil 45193 } 45194 45195 func (p *ApplyDbIdx256LowerboundArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 45196 if _, err := iprot.ReadStructBegin(ctx); err != nil { 45197 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 45198 } 45199 45200 45201 for { 45202 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 45203 if err != nil { 45204 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 45205 } 45206 if fieldTypeId == thrift.STOP { break; } 45207 switch fieldId { 45208 case 1: 45209 if fieldTypeId == thrift.STRUCT { 45210 if err := p.ReadField1(ctx, iprot); err != nil { 45211 return err 45212 } 45213 } else { 45214 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45215 return err 45216 } 45217 } 45218 case 2: 45219 if fieldTypeId == thrift.STRUCT { 45220 if err := p.ReadField2(ctx, iprot); err != nil { 45221 return err 45222 } 45223 } else { 45224 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45225 return err 45226 } 45227 } 45228 case 3: 45229 if fieldTypeId == thrift.STRUCT { 45230 if err := p.ReadField3(ctx, iprot); err != nil { 45231 return err 45232 } 45233 } else { 45234 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45235 return err 45236 } 45237 } 45238 case 4: 45239 if fieldTypeId == thrift.STRING { 45240 if err := p.ReadField4(ctx, iprot); err != nil { 45241 return err 45242 } 45243 } else { 45244 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45245 return err 45246 } 45247 } 45248 case 5: 45249 if fieldTypeId == thrift.STRUCT { 45250 if err := p.ReadField5(ctx, iprot); err != nil { 45251 return err 45252 } 45253 } else { 45254 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45255 return err 45256 } 45257 } 45258 default: 45259 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45260 return err 45261 } 45262 } 45263 if err := iprot.ReadFieldEnd(ctx); err != nil { 45264 return err 45265 } 45266 } 45267 if err := iprot.ReadStructEnd(ctx); err != nil { 45268 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 45269 } 45270 return nil 45271 } 45272 45273 func (p *ApplyDbIdx256LowerboundArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 45274 p.Code = &Uint64{} 45275 if err := p.Code.Read(ctx, iprot); err != nil { 45276 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 45277 } 45278 return nil 45279 } 45280 45281 func (p *ApplyDbIdx256LowerboundArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 45282 p.Scope = &Uint64{} 45283 if err := p.Scope.Read(ctx, iprot); err != nil { 45284 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 45285 } 45286 return nil 45287 } 45288 45289 func (p *ApplyDbIdx256LowerboundArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 45290 p.Table = &Uint64{} 45291 if err := p.Table.Read(ctx, iprot); err != nil { 45292 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 45293 } 45294 return nil 45295 } 45296 45297 func (p *ApplyDbIdx256LowerboundArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 45298 if v, err := iprot.ReadBinary(ctx); err != nil { 45299 return thrift.PrependError("error reading field 4: ", err) 45300 } else { 45301 p.Data = v 45302 } 45303 return nil 45304 } 45305 45306 func (p *ApplyDbIdx256LowerboundArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 45307 p.Primary = &Uint64{} 45308 if err := p.Primary.Read(ctx, iprot); err != nil { 45309 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 45310 } 45311 return nil 45312 } 45313 45314 func (p *ApplyDbIdx256LowerboundArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 45315 if err := oprot.WriteStructBegin(ctx, "db_idx256_lowerbound_args"); err != nil { 45316 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 45317 if p != nil { 45318 if err := p.writeField1(ctx, oprot); err != nil { return err } 45319 if err := p.writeField2(ctx, oprot); err != nil { return err } 45320 if err := p.writeField3(ctx, oprot); err != nil { return err } 45321 if err := p.writeField4(ctx, oprot); err != nil { return err } 45322 if err := p.writeField5(ctx, oprot); err != nil { return err } 45323 } 45324 if err := oprot.WriteFieldStop(ctx); err != nil { 45325 return thrift.PrependError("write field stop error: ", err) } 45326 if err := oprot.WriteStructEnd(ctx); err != nil { 45327 return thrift.PrependError("write struct stop error: ", err) } 45328 return nil 45329 } 45330 45331 func (p *ApplyDbIdx256LowerboundArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 45332 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 45333 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 45334 if err := p.Code.Write(ctx, oprot); err != nil { 45335 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 45336 } 45337 if err := oprot.WriteFieldEnd(ctx); err != nil { 45338 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 45339 return err 45340 } 45341 45342 func (p *ApplyDbIdx256LowerboundArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 45343 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 45344 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 45345 if err := p.Scope.Write(ctx, oprot); err != nil { 45346 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 45347 } 45348 if err := oprot.WriteFieldEnd(ctx); err != nil { 45349 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 45350 return err 45351 } 45352 45353 func (p *ApplyDbIdx256LowerboundArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 45354 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 45355 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 45356 if err := p.Table.Write(ctx, oprot); err != nil { 45357 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 45358 } 45359 if err := oprot.WriteFieldEnd(ctx); err != nil { 45360 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 45361 return err 45362 } 45363 45364 func (p *ApplyDbIdx256LowerboundArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 45365 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 4); err != nil { 45366 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:data: ", p), err) } 45367 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 45368 return thrift.PrependError(fmt.Sprintf("%T.data (4) field write error: ", p), err) } 45369 if err := oprot.WriteFieldEnd(ctx); err != nil { 45370 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:data: ", p), err) } 45371 return err 45372 } 45373 45374 func (p *ApplyDbIdx256LowerboundArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 45375 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 5); err != nil { 45376 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:primary: ", p), err) } 45377 if err := p.Primary.Write(ctx, oprot); err != nil { 45378 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 45379 } 45380 if err := oprot.WriteFieldEnd(ctx); err != nil { 45381 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:primary: ", p), err) } 45382 return err 45383 } 45384 45385 func (p *ApplyDbIdx256LowerboundArgs) String() string { 45386 if p == nil { 45387 return "<nil>" 45388 } 45389 return fmt.Sprintf("ApplyDbIdx256LowerboundArgs(%+v)", *p) 45390 } 45391 45392 // Attributes: 45393 // - Success 45394 type ApplyDbIdx256LowerboundResult struct { 45395 Success *LowerBoundUpperBoundReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 45396 } 45397 45398 func NewApplyDbIdx256LowerboundResult() *ApplyDbIdx256LowerboundResult { 45399 return &ApplyDbIdx256LowerboundResult{} 45400 } 45401 45402 var ApplyDbIdx256LowerboundResult_Success_DEFAULT *LowerBoundUpperBoundReturn 45403 func (p *ApplyDbIdx256LowerboundResult) GetSuccess() *LowerBoundUpperBoundReturn { 45404 if !p.IsSetSuccess() { 45405 return ApplyDbIdx256LowerboundResult_Success_DEFAULT 45406 } 45407 return p.Success 45408 } 45409 func (p *ApplyDbIdx256LowerboundResult) IsSetSuccess() bool { 45410 return p.Success != nil 45411 } 45412 45413 func (p *ApplyDbIdx256LowerboundResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 45414 if _, err := iprot.ReadStructBegin(ctx); err != nil { 45415 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 45416 } 45417 45418 45419 for { 45420 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 45421 if err != nil { 45422 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 45423 } 45424 if fieldTypeId == thrift.STOP { break; } 45425 switch fieldId { 45426 case 0: 45427 if fieldTypeId == thrift.STRUCT { 45428 if err := p.ReadField0(ctx, iprot); err != nil { 45429 return err 45430 } 45431 } else { 45432 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45433 return err 45434 } 45435 } 45436 default: 45437 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45438 return err 45439 } 45440 } 45441 if err := iprot.ReadFieldEnd(ctx); err != nil { 45442 return err 45443 } 45444 } 45445 if err := iprot.ReadStructEnd(ctx); err != nil { 45446 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 45447 } 45448 return nil 45449 } 45450 45451 func (p *ApplyDbIdx256LowerboundResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 45452 p.Success = &LowerBoundUpperBoundReturn{} 45453 if err := p.Success.Read(ctx, iprot); err != nil { 45454 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 45455 } 45456 return nil 45457 } 45458 45459 func (p *ApplyDbIdx256LowerboundResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 45460 if err := oprot.WriteStructBegin(ctx, "db_idx256_lowerbound_result"); err != nil { 45461 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 45462 if p != nil { 45463 if err := p.writeField0(ctx, oprot); err != nil { return err } 45464 } 45465 if err := oprot.WriteFieldStop(ctx); err != nil { 45466 return thrift.PrependError("write field stop error: ", err) } 45467 if err := oprot.WriteStructEnd(ctx); err != nil { 45468 return thrift.PrependError("write struct stop error: ", err) } 45469 return nil 45470 } 45471 45472 func (p *ApplyDbIdx256LowerboundResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 45473 if p.IsSetSuccess() { 45474 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 45475 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 45476 if err := p.Success.Write(ctx, oprot); err != nil { 45477 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 45478 } 45479 if err := oprot.WriteFieldEnd(ctx); err != nil { 45480 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 45481 } 45482 return err 45483 } 45484 45485 func (p *ApplyDbIdx256LowerboundResult) String() string { 45486 if p == nil { 45487 return "<nil>" 45488 } 45489 return fmt.Sprintf("ApplyDbIdx256LowerboundResult(%+v)", *p) 45490 } 45491 45492 // Attributes: 45493 // - Code 45494 // - Scope 45495 // - Table 45496 // - Data 45497 // - Primary 45498 type ApplyDbIdx256UpperboundArgs struct { 45499 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 45500 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 45501 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 45502 Data []byte `thrift:"data,4" db:"data" json:"data"` 45503 Primary *Uint64 `thrift:"primary,5" db:"primary" json:"primary"` 45504 } 45505 45506 func NewApplyDbIdx256UpperboundArgs() *ApplyDbIdx256UpperboundArgs { 45507 return &ApplyDbIdx256UpperboundArgs{} 45508 } 45509 45510 var ApplyDbIdx256UpperboundArgs_Code_DEFAULT *Uint64 45511 func (p *ApplyDbIdx256UpperboundArgs) GetCode() *Uint64 { 45512 if !p.IsSetCode() { 45513 return ApplyDbIdx256UpperboundArgs_Code_DEFAULT 45514 } 45515 return p.Code 45516 } 45517 var ApplyDbIdx256UpperboundArgs_Scope_DEFAULT *Uint64 45518 func (p *ApplyDbIdx256UpperboundArgs) GetScope() *Uint64 { 45519 if !p.IsSetScope() { 45520 return ApplyDbIdx256UpperboundArgs_Scope_DEFAULT 45521 } 45522 return p.Scope 45523 } 45524 var ApplyDbIdx256UpperboundArgs_Table_DEFAULT *Uint64 45525 func (p *ApplyDbIdx256UpperboundArgs) GetTable() *Uint64 { 45526 if !p.IsSetTable() { 45527 return ApplyDbIdx256UpperboundArgs_Table_DEFAULT 45528 } 45529 return p.Table 45530 } 45531 45532 func (p *ApplyDbIdx256UpperboundArgs) GetData() []byte { 45533 return p.Data 45534 } 45535 var ApplyDbIdx256UpperboundArgs_Primary_DEFAULT *Uint64 45536 func (p *ApplyDbIdx256UpperboundArgs) GetPrimary() *Uint64 { 45537 if !p.IsSetPrimary() { 45538 return ApplyDbIdx256UpperboundArgs_Primary_DEFAULT 45539 } 45540 return p.Primary 45541 } 45542 func (p *ApplyDbIdx256UpperboundArgs) IsSetCode() bool { 45543 return p.Code != nil 45544 } 45545 45546 func (p *ApplyDbIdx256UpperboundArgs) IsSetScope() bool { 45547 return p.Scope != nil 45548 } 45549 45550 func (p *ApplyDbIdx256UpperboundArgs) IsSetTable() bool { 45551 return p.Table != nil 45552 } 45553 45554 func (p *ApplyDbIdx256UpperboundArgs) IsSetPrimary() bool { 45555 return p.Primary != nil 45556 } 45557 45558 func (p *ApplyDbIdx256UpperboundArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 45559 if _, err := iprot.ReadStructBegin(ctx); err != nil { 45560 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 45561 } 45562 45563 45564 for { 45565 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 45566 if err != nil { 45567 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 45568 } 45569 if fieldTypeId == thrift.STOP { break; } 45570 switch fieldId { 45571 case 1: 45572 if fieldTypeId == thrift.STRUCT { 45573 if err := p.ReadField1(ctx, iprot); err != nil { 45574 return err 45575 } 45576 } else { 45577 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45578 return err 45579 } 45580 } 45581 case 2: 45582 if fieldTypeId == thrift.STRUCT { 45583 if err := p.ReadField2(ctx, iprot); err != nil { 45584 return err 45585 } 45586 } else { 45587 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45588 return err 45589 } 45590 } 45591 case 3: 45592 if fieldTypeId == thrift.STRUCT { 45593 if err := p.ReadField3(ctx, iprot); err != nil { 45594 return err 45595 } 45596 } else { 45597 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45598 return err 45599 } 45600 } 45601 case 4: 45602 if fieldTypeId == thrift.STRING { 45603 if err := p.ReadField4(ctx, iprot); err != nil { 45604 return err 45605 } 45606 } else { 45607 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45608 return err 45609 } 45610 } 45611 case 5: 45612 if fieldTypeId == thrift.STRUCT { 45613 if err := p.ReadField5(ctx, iprot); err != nil { 45614 return err 45615 } 45616 } else { 45617 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45618 return err 45619 } 45620 } 45621 default: 45622 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45623 return err 45624 } 45625 } 45626 if err := iprot.ReadFieldEnd(ctx); err != nil { 45627 return err 45628 } 45629 } 45630 if err := iprot.ReadStructEnd(ctx); err != nil { 45631 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 45632 } 45633 return nil 45634 } 45635 45636 func (p *ApplyDbIdx256UpperboundArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 45637 p.Code = &Uint64{} 45638 if err := p.Code.Read(ctx, iprot); err != nil { 45639 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 45640 } 45641 return nil 45642 } 45643 45644 func (p *ApplyDbIdx256UpperboundArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 45645 p.Scope = &Uint64{} 45646 if err := p.Scope.Read(ctx, iprot); err != nil { 45647 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 45648 } 45649 return nil 45650 } 45651 45652 func (p *ApplyDbIdx256UpperboundArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 45653 p.Table = &Uint64{} 45654 if err := p.Table.Read(ctx, iprot); err != nil { 45655 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 45656 } 45657 return nil 45658 } 45659 45660 func (p *ApplyDbIdx256UpperboundArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 45661 if v, err := iprot.ReadBinary(ctx); err != nil { 45662 return thrift.PrependError("error reading field 4: ", err) 45663 } else { 45664 p.Data = v 45665 } 45666 return nil 45667 } 45668 45669 func (p *ApplyDbIdx256UpperboundArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 45670 p.Primary = &Uint64{} 45671 if err := p.Primary.Read(ctx, iprot); err != nil { 45672 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 45673 } 45674 return nil 45675 } 45676 45677 func (p *ApplyDbIdx256UpperboundArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 45678 if err := oprot.WriteStructBegin(ctx, "db_idx256_upperbound_args"); err != nil { 45679 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 45680 if p != nil { 45681 if err := p.writeField1(ctx, oprot); err != nil { return err } 45682 if err := p.writeField2(ctx, oprot); err != nil { return err } 45683 if err := p.writeField3(ctx, oprot); err != nil { return err } 45684 if err := p.writeField4(ctx, oprot); err != nil { return err } 45685 if err := p.writeField5(ctx, oprot); err != nil { return err } 45686 } 45687 if err := oprot.WriteFieldStop(ctx); err != nil { 45688 return thrift.PrependError("write field stop error: ", err) } 45689 if err := oprot.WriteStructEnd(ctx); err != nil { 45690 return thrift.PrependError("write struct stop error: ", err) } 45691 return nil 45692 } 45693 45694 func (p *ApplyDbIdx256UpperboundArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 45695 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 45696 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 45697 if err := p.Code.Write(ctx, oprot); err != nil { 45698 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 45699 } 45700 if err := oprot.WriteFieldEnd(ctx); err != nil { 45701 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 45702 return err 45703 } 45704 45705 func (p *ApplyDbIdx256UpperboundArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 45706 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 45707 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 45708 if err := p.Scope.Write(ctx, oprot); err != nil { 45709 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 45710 } 45711 if err := oprot.WriteFieldEnd(ctx); err != nil { 45712 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 45713 return err 45714 } 45715 45716 func (p *ApplyDbIdx256UpperboundArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 45717 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 45718 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 45719 if err := p.Table.Write(ctx, oprot); err != nil { 45720 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 45721 } 45722 if err := oprot.WriteFieldEnd(ctx); err != nil { 45723 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 45724 return err 45725 } 45726 45727 func (p *ApplyDbIdx256UpperboundArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 45728 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 4); err != nil { 45729 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:data: ", p), err) } 45730 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 45731 return thrift.PrependError(fmt.Sprintf("%T.data (4) field write error: ", p), err) } 45732 if err := oprot.WriteFieldEnd(ctx); err != nil { 45733 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:data: ", p), err) } 45734 return err 45735 } 45736 45737 func (p *ApplyDbIdx256UpperboundArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 45738 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 5); err != nil { 45739 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:primary: ", p), err) } 45740 if err := p.Primary.Write(ctx, oprot); err != nil { 45741 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 45742 } 45743 if err := oprot.WriteFieldEnd(ctx); err != nil { 45744 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:primary: ", p), err) } 45745 return err 45746 } 45747 45748 func (p *ApplyDbIdx256UpperboundArgs) String() string { 45749 if p == nil { 45750 return "<nil>" 45751 } 45752 return fmt.Sprintf("ApplyDbIdx256UpperboundArgs(%+v)", *p) 45753 } 45754 45755 // Attributes: 45756 // - Success 45757 type ApplyDbIdx256UpperboundResult struct { 45758 Success *LowerBoundUpperBoundReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 45759 } 45760 45761 func NewApplyDbIdx256UpperboundResult() *ApplyDbIdx256UpperboundResult { 45762 return &ApplyDbIdx256UpperboundResult{} 45763 } 45764 45765 var ApplyDbIdx256UpperboundResult_Success_DEFAULT *LowerBoundUpperBoundReturn 45766 func (p *ApplyDbIdx256UpperboundResult) GetSuccess() *LowerBoundUpperBoundReturn { 45767 if !p.IsSetSuccess() { 45768 return ApplyDbIdx256UpperboundResult_Success_DEFAULT 45769 } 45770 return p.Success 45771 } 45772 func (p *ApplyDbIdx256UpperboundResult) IsSetSuccess() bool { 45773 return p.Success != nil 45774 } 45775 45776 func (p *ApplyDbIdx256UpperboundResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 45777 if _, err := iprot.ReadStructBegin(ctx); err != nil { 45778 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 45779 } 45780 45781 45782 for { 45783 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 45784 if err != nil { 45785 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 45786 } 45787 if fieldTypeId == thrift.STOP { break; } 45788 switch fieldId { 45789 case 0: 45790 if fieldTypeId == thrift.STRUCT { 45791 if err := p.ReadField0(ctx, iprot); err != nil { 45792 return err 45793 } 45794 } else { 45795 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45796 return err 45797 } 45798 } 45799 default: 45800 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45801 return err 45802 } 45803 } 45804 if err := iprot.ReadFieldEnd(ctx); err != nil { 45805 return err 45806 } 45807 } 45808 if err := iprot.ReadStructEnd(ctx); err != nil { 45809 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 45810 } 45811 return nil 45812 } 45813 45814 func (p *ApplyDbIdx256UpperboundResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 45815 p.Success = &LowerBoundUpperBoundReturn{} 45816 if err := p.Success.Read(ctx, iprot); err != nil { 45817 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 45818 } 45819 return nil 45820 } 45821 45822 func (p *ApplyDbIdx256UpperboundResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 45823 if err := oprot.WriteStructBegin(ctx, "db_idx256_upperbound_result"); err != nil { 45824 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 45825 if p != nil { 45826 if err := p.writeField0(ctx, oprot); err != nil { return err } 45827 } 45828 if err := oprot.WriteFieldStop(ctx); err != nil { 45829 return thrift.PrependError("write field stop error: ", err) } 45830 if err := oprot.WriteStructEnd(ctx); err != nil { 45831 return thrift.PrependError("write struct stop error: ", err) } 45832 return nil 45833 } 45834 45835 func (p *ApplyDbIdx256UpperboundResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 45836 if p.IsSetSuccess() { 45837 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 45838 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 45839 if err := p.Success.Write(ctx, oprot); err != nil { 45840 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 45841 } 45842 if err := oprot.WriteFieldEnd(ctx); err != nil { 45843 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 45844 } 45845 return err 45846 } 45847 45848 func (p *ApplyDbIdx256UpperboundResult) String() string { 45849 if p == nil { 45850 return "<nil>" 45851 } 45852 return fmt.Sprintf("ApplyDbIdx256UpperboundResult(%+v)", *p) 45853 } 45854 45855 // Attributes: 45856 // - Code 45857 // - Scope 45858 // - Table 45859 type ApplyDbIdx256EndArgs struct { 45860 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 45861 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 45862 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 45863 } 45864 45865 func NewApplyDbIdx256EndArgs() *ApplyDbIdx256EndArgs { 45866 return &ApplyDbIdx256EndArgs{} 45867 } 45868 45869 var ApplyDbIdx256EndArgs_Code_DEFAULT *Uint64 45870 func (p *ApplyDbIdx256EndArgs) GetCode() *Uint64 { 45871 if !p.IsSetCode() { 45872 return ApplyDbIdx256EndArgs_Code_DEFAULT 45873 } 45874 return p.Code 45875 } 45876 var ApplyDbIdx256EndArgs_Scope_DEFAULT *Uint64 45877 func (p *ApplyDbIdx256EndArgs) GetScope() *Uint64 { 45878 if !p.IsSetScope() { 45879 return ApplyDbIdx256EndArgs_Scope_DEFAULT 45880 } 45881 return p.Scope 45882 } 45883 var ApplyDbIdx256EndArgs_Table_DEFAULT *Uint64 45884 func (p *ApplyDbIdx256EndArgs) GetTable() *Uint64 { 45885 if !p.IsSetTable() { 45886 return ApplyDbIdx256EndArgs_Table_DEFAULT 45887 } 45888 return p.Table 45889 } 45890 func (p *ApplyDbIdx256EndArgs) IsSetCode() bool { 45891 return p.Code != nil 45892 } 45893 45894 func (p *ApplyDbIdx256EndArgs) IsSetScope() bool { 45895 return p.Scope != nil 45896 } 45897 45898 func (p *ApplyDbIdx256EndArgs) IsSetTable() bool { 45899 return p.Table != nil 45900 } 45901 45902 func (p *ApplyDbIdx256EndArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 45903 if _, err := iprot.ReadStructBegin(ctx); err != nil { 45904 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 45905 } 45906 45907 45908 for { 45909 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 45910 if err != nil { 45911 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 45912 } 45913 if fieldTypeId == thrift.STOP { break; } 45914 switch fieldId { 45915 case 1: 45916 if fieldTypeId == thrift.STRUCT { 45917 if err := p.ReadField1(ctx, iprot); err != nil { 45918 return err 45919 } 45920 } else { 45921 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45922 return err 45923 } 45924 } 45925 case 2: 45926 if fieldTypeId == thrift.STRUCT { 45927 if err := p.ReadField2(ctx, iprot); err != nil { 45928 return err 45929 } 45930 } else { 45931 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45932 return err 45933 } 45934 } 45935 case 3: 45936 if fieldTypeId == thrift.STRUCT { 45937 if err := p.ReadField3(ctx, iprot); err != nil { 45938 return err 45939 } 45940 } else { 45941 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45942 return err 45943 } 45944 } 45945 default: 45946 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 45947 return err 45948 } 45949 } 45950 if err := iprot.ReadFieldEnd(ctx); err != nil { 45951 return err 45952 } 45953 } 45954 if err := iprot.ReadStructEnd(ctx); err != nil { 45955 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 45956 } 45957 return nil 45958 } 45959 45960 func (p *ApplyDbIdx256EndArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 45961 p.Code = &Uint64{} 45962 if err := p.Code.Read(ctx, iprot); err != nil { 45963 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 45964 } 45965 return nil 45966 } 45967 45968 func (p *ApplyDbIdx256EndArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 45969 p.Scope = &Uint64{} 45970 if err := p.Scope.Read(ctx, iprot); err != nil { 45971 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 45972 } 45973 return nil 45974 } 45975 45976 func (p *ApplyDbIdx256EndArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 45977 p.Table = &Uint64{} 45978 if err := p.Table.Read(ctx, iprot); err != nil { 45979 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 45980 } 45981 return nil 45982 } 45983 45984 func (p *ApplyDbIdx256EndArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 45985 if err := oprot.WriteStructBegin(ctx, "db_idx256_end_args"); err != nil { 45986 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 45987 if p != nil { 45988 if err := p.writeField1(ctx, oprot); err != nil { return err } 45989 if err := p.writeField2(ctx, oprot); err != nil { return err } 45990 if err := p.writeField3(ctx, oprot); err != nil { return err } 45991 } 45992 if err := oprot.WriteFieldStop(ctx); err != nil { 45993 return thrift.PrependError("write field stop error: ", err) } 45994 if err := oprot.WriteStructEnd(ctx); err != nil { 45995 return thrift.PrependError("write struct stop error: ", err) } 45996 return nil 45997 } 45998 45999 func (p *ApplyDbIdx256EndArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 46000 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 46001 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 46002 if err := p.Code.Write(ctx, oprot); err != nil { 46003 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 46004 } 46005 if err := oprot.WriteFieldEnd(ctx); err != nil { 46006 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 46007 return err 46008 } 46009 46010 func (p *ApplyDbIdx256EndArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 46011 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 46012 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 46013 if err := p.Scope.Write(ctx, oprot); err != nil { 46014 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 46015 } 46016 if err := oprot.WriteFieldEnd(ctx); err != nil { 46017 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 46018 return err 46019 } 46020 46021 func (p *ApplyDbIdx256EndArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 46022 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 46023 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 46024 if err := p.Table.Write(ctx, oprot); err != nil { 46025 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 46026 } 46027 if err := oprot.WriteFieldEnd(ctx); err != nil { 46028 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 46029 return err 46030 } 46031 46032 func (p *ApplyDbIdx256EndArgs) String() string { 46033 if p == nil { 46034 return "<nil>" 46035 } 46036 return fmt.Sprintf("ApplyDbIdx256EndArgs(%+v)", *p) 46037 } 46038 46039 // Attributes: 46040 // - Success 46041 type ApplyDbIdx256EndResult struct { 46042 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 46043 } 46044 46045 func NewApplyDbIdx256EndResult() *ApplyDbIdx256EndResult { 46046 return &ApplyDbIdx256EndResult{} 46047 } 46048 46049 var ApplyDbIdx256EndResult_Success_DEFAULT int32 46050 func (p *ApplyDbIdx256EndResult) GetSuccess() int32 { 46051 if !p.IsSetSuccess() { 46052 return ApplyDbIdx256EndResult_Success_DEFAULT 46053 } 46054 return *p.Success 46055 } 46056 func (p *ApplyDbIdx256EndResult) IsSetSuccess() bool { 46057 return p.Success != nil 46058 } 46059 46060 func (p *ApplyDbIdx256EndResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 46061 if _, err := iprot.ReadStructBegin(ctx); err != nil { 46062 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 46063 } 46064 46065 46066 for { 46067 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 46068 if err != nil { 46069 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 46070 } 46071 if fieldTypeId == thrift.STOP { break; } 46072 switch fieldId { 46073 case 0: 46074 if fieldTypeId == thrift.I32 { 46075 if err := p.ReadField0(ctx, iprot); err != nil { 46076 return err 46077 } 46078 } else { 46079 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46080 return err 46081 } 46082 } 46083 default: 46084 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46085 return err 46086 } 46087 } 46088 if err := iprot.ReadFieldEnd(ctx); err != nil { 46089 return err 46090 } 46091 } 46092 if err := iprot.ReadStructEnd(ctx); err != nil { 46093 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 46094 } 46095 return nil 46096 } 46097 46098 func (p *ApplyDbIdx256EndResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 46099 if v, err := iprot.ReadI32(ctx); err != nil { 46100 return thrift.PrependError("error reading field 0: ", err) 46101 } else { 46102 p.Success = &v 46103 } 46104 return nil 46105 } 46106 46107 func (p *ApplyDbIdx256EndResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 46108 if err := oprot.WriteStructBegin(ctx, "db_idx256_end_result"); err != nil { 46109 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 46110 if p != nil { 46111 if err := p.writeField0(ctx, oprot); err != nil { return err } 46112 } 46113 if err := oprot.WriteFieldStop(ctx); err != nil { 46114 return thrift.PrependError("write field stop error: ", err) } 46115 if err := oprot.WriteStructEnd(ctx); err != nil { 46116 return thrift.PrependError("write struct stop error: ", err) } 46117 return nil 46118 } 46119 46120 func (p *ApplyDbIdx256EndResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 46121 if p.IsSetSuccess() { 46122 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 46123 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 46124 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 46125 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 46126 if err := oprot.WriteFieldEnd(ctx); err != nil { 46127 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 46128 } 46129 return err 46130 } 46131 46132 func (p *ApplyDbIdx256EndResult) String() string { 46133 if p == nil { 46134 return "<nil>" 46135 } 46136 return fmt.Sprintf("ApplyDbIdx256EndResult(%+v)", *p) 46137 } 46138 46139 // Attributes: 46140 // - Scope 46141 // - Table 46142 // - Payer 46143 // - ID 46144 // - Secondary 46145 type ApplyDbIdxDoubleStoreArgs struct { 46146 Scope *Uint64 `thrift:"scope,1" db:"scope" json:"scope"` 46147 Table *Uint64 `thrift:"table,2" db:"table" json:"table"` 46148 Payer *Uint64 `thrift:"payer,3" db:"payer" json:"payer"` 46149 ID *Uint64 `thrift:"id,4" db:"id" json:"id"` 46150 Secondary []byte `thrift:"secondary,5" db:"secondary" json:"secondary"` 46151 } 46152 46153 func NewApplyDbIdxDoubleStoreArgs() *ApplyDbIdxDoubleStoreArgs { 46154 return &ApplyDbIdxDoubleStoreArgs{} 46155 } 46156 46157 var ApplyDbIdxDoubleStoreArgs_Scope_DEFAULT *Uint64 46158 func (p *ApplyDbIdxDoubleStoreArgs) GetScope() *Uint64 { 46159 if !p.IsSetScope() { 46160 return ApplyDbIdxDoubleStoreArgs_Scope_DEFAULT 46161 } 46162 return p.Scope 46163 } 46164 var ApplyDbIdxDoubleStoreArgs_Table_DEFAULT *Uint64 46165 func (p *ApplyDbIdxDoubleStoreArgs) GetTable() *Uint64 { 46166 if !p.IsSetTable() { 46167 return ApplyDbIdxDoubleStoreArgs_Table_DEFAULT 46168 } 46169 return p.Table 46170 } 46171 var ApplyDbIdxDoubleStoreArgs_Payer_DEFAULT *Uint64 46172 func (p *ApplyDbIdxDoubleStoreArgs) GetPayer() *Uint64 { 46173 if !p.IsSetPayer() { 46174 return ApplyDbIdxDoubleStoreArgs_Payer_DEFAULT 46175 } 46176 return p.Payer 46177 } 46178 var ApplyDbIdxDoubleStoreArgs_ID_DEFAULT *Uint64 46179 func (p *ApplyDbIdxDoubleStoreArgs) GetID() *Uint64 { 46180 if !p.IsSetID() { 46181 return ApplyDbIdxDoubleStoreArgs_ID_DEFAULT 46182 } 46183 return p.ID 46184 } 46185 46186 func (p *ApplyDbIdxDoubleStoreArgs) GetSecondary() []byte { 46187 return p.Secondary 46188 } 46189 func (p *ApplyDbIdxDoubleStoreArgs) IsSetScope() bool { 46190 return p.Scope != nil 46191 } 46192 46193 func (p *ApplyDbIdxDoubleStoreArgs) IsSetTable() bool { 46194 return p.Table != nil 46195 } 46196 46197 func (p *ApplyDbIdxDoubleStoreArgs) IsSetPayer() bool { 46198 return p.Payer != nil 46199 } 46200 46201 func (p *ApplyDbIdxDoubleStoreArgs) IsSetID() bool { 46202 return p.ID != nil 46203 } 46204 46205 func (p *ApplyDbIdxDoubleStoreArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 46206 if _, err := iprot.ReadStructBegin(ctx); err != nil { 46207 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 46208 } 46209 46210 46211 for { 46212 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 46213 if err != nil { 46214 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 46215 } 46216 if fieldTypeId == thrift.STOP { break; } 46217 switch fieldId { 46218 case 1: 46219 if fieldTypeId == thrift.STRUCT { 46220 if err := p.ReadField1(ctx, iprot); err != nil { 46221 return err 46222 } 46223 } else { 46224 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46225 return err 46226 } 46227 } 46228 case 2: 46229 if fieldTypeId == thrift.STRUCT { 46230 if err := p.ReadField2(ctx, iprot); err != nil { 46231 return err 46232 } 46233 } else { 46234 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46235 return err 46236 } 46237 } 46238 case 3: 46239 if fieldTypeId == thrift.STRUCT { 46240 if err := p.ReadField3(ctx, iprot); err != nil { 46241 return err 46242 } 46243 } else { 46244 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46245 return err 46246 } 46247 } 46248 case 4: 46249 if fieldTypeId == thrift.STRUCT { 46250 if err := p.ReadField4(ctx, iprot); err != nil { 46251 return err 46252 } 46253 } else { 46254 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46255 return err 46256 } 46257 } 46258 case 5: 46259 if fieldTypeId == thrift.STRING { 46260 if err := p.ReadField5(ctx, iprot); err != nil { 46261 return err 46262 } 46263 } else { 46264 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46265 return err 46266 } 46267 } 46268 default: 46269 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46270 return err 46271 } 46272 } 46273 if err := iprot.ReadFieldEnd(ctx); err != nil { 46274 return err 46275 } 46276 } 46277 if err := iprot.ReadStructEnd(ctx); err != nil { 46278 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 46279 } 46280 return nil 46281 } 46282 46283 func (p *ApplyDbIdxDoubleStoreArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 46284 p.Scope = &Uint64{} 46285 if err := p.Scope.Read(ctx, iprot); err != nil { 46286 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 46287 } 46288 return nil 46289 } 46290 46291 func (p *ApplyDbIdxDoubleStoreArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 46292 p.Table = &Uint64{} 46293 if err := p.Table.Read(ctx, iprot); err != nil { 46294 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 46295 } 46296 return nil 46297 } 46298 46299 func (p *ApplyDbIdxDoubleStoreArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 46300 p.Payer = &Uint64{} 46301 if err := p.Payer.Read(ctx, iprot); err != nil { 46302 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 46303 } 46304 return nil 46305 } 46306 46307 func (p *ApplyDbIdxDoubleStoreArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 46308 p.ID = &Uint64{} 46309 if err := p.ID.Read(ctx, iprot); err != nil { 46310 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ID), err) 46311 } 46312 return nil 46313 } 46314 46315 func (p *ApplyDbIdxDoubleStoreArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 46316 if v, err := iprot.ReadBinary(ctx); err != nil { 46317 return thrift.PrependError("error reading field 5: ", err) 46318 } else { 46319 p.Secondary = v 46320 } 46321 return nil 46322 } 46323 46324 func (p *ApplyDbIdxDoubleStoreArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 46325 if err := oprot.WriteStructBegin(ctx, "db_idx_double_store_args"); err != nil { 46326 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 46327 if p != nil { 46328 if err := p.writeField1(ctx, oprot); err != nil { return err } 46329 if err := p.writeField2(ctx, oprot); err != nil { return err } 46330 if err := p.writeField3(ctx, oprot); err != nil { return err } 46331 if err := p.writeField4(ctx, oprot); err != nil { return err } 46332 if err := p.writeField5(ctx, oprot); err != nil { return err } 46333 } 46334 if err := oprot.WriteFieldStop(ctx); err != nil { 46335 return thrift.PrependError("write field stop error: ", err) } 46336 if err := oprot.WriteStructEnd(ctx); err != nil { 46337 return thrift.PrependError("write struct stop error: ", err) } 46338 return nil 46339 } 46340 46341 func (p *ApplyDbIdxDoubleStoreArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 46342 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 1); err != nil { 46343 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:scope: ", p), err) } 46344 if err := p.Scope.Write(ctx, oprot); err != nil { 46345 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 46346 } 46347 if err := oprot.WriteFieldEnd(ctx); err != nil { 46348 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:scope: ", p), err) } 46349 return err 46350 } 46351 46352 func (p *ApplyDbIdxDoubleStoreArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 46353 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 2); err != nil { 46354 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:table: ", p), err) } 46355 if err := p.Table.Write(ctx, oprot); err != nil { 46356 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 46357 } 46358 if err := oprot.WriteFieldEnd(ctx); err != nil { 46359 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:table: ", p), err) } 46360 return err 46361 } 46362 46363 func (p *ApplyDbIdxDoubleStoreArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 46364 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 3); err != nil { 46365 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:payer: ", p), err) } 46366 if err := p.Payer.Write(ctx, oprot); err != nil { 46367 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 46368 } 46369 if err := oprot.WriteFieldEnd(ctx); err != nil { 46370 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:payer: ", p), err) } 46371 return err 46372 } 46373 46374 func (p *ApplyDbIdxDoubleStoreArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 46375 if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRUCT, 4); err != nil { 46376 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err) } 46377 if err := p.ID.Write(ctx, oprot); err != nil { 46378 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ID), err) 46379 } 46380 if err := oprot.WriteFieldEnd(ctx); err != nil { 46381 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err) } 46382 return err 46383 } 46384 46385 func (p *ApplyDbIdxDoubleStoreArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 46386 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 5); err != nil { 46387 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:secondary: ", p), err) } 46388 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 46389 return thrift.PrependError(fmt.Sprintf("%T.secondary (5) field write error: ", p), err) } 46390 if err := oprot.WriteFieldEnd(ctx); err != nil { 46391 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:secondary: ", p), err) } 46392 return err 46393 } 46394 46395 func (p *ApplyDbIdxDoubleStoreArgs) String() string { 46396 if p == nil { 46397 return "<nil>" 46398 } 46399 return fmt.Sprintf("ApplyDbIdxDoubleStoreArgs(%+v)", *p) 46400 } 46401 46402 // Attributes: 46403 // - Success 46404 type ApplyDbIdxDoubleStoreResult struct { 46405 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 46406 } 46407 46408 func NewApplyDbIdxDoubleStoreResult() *ApplyDbIdxDoubleStoreResult { 46409 return &ApplyDbIdxDoubleStoreResult{} 46410 } 46411 46412 var ApplyDbIdxDoubleStoreResult_Success_DEFAULT int32 46413 func (p *ApplyDbIdxDoubleStoreResult) GetSuccess() int32 { 46414 if !p.IsSetSuccess() { 46415 return ApplyDbIdxDoubleStoreResult_Success_DEFAULT 46416 } 46417 return *p.Success 46418 } 46419 func (p *ApplyDbIdxDoubleStoreResult) IsSetSuccess() bool { 46420 return p.Success != nil 46421 } 46422 46423 func (p *ApplyDbIdxDoubleStoreResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 46424 if _, err := iprot.ReadStructBegin(ctx); err != nil { 46425 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 46426 } 46427 46428 46429 for { 46430 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 46431 if err != nil { 46432 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 46433 } 46434 if fieldTypeId == thrift.STOP { break; } 46435 switch fieldId { 46436 case 0: 46437 if fieldTypeId == thrift.I32 { 46438 if err := p.ReadField0(ctx, iprot); err != nil { 46439 return err 46440 } 46441 } else { 46442 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46443 return err 46444 } 46445 } 46446 default: 46447 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46448 return err 46449 } 46450 } 46451 if err := iprot.ReadFieldEnd(ctx); err != nil { 46452 return err 46453 } 46454 } 46455 if err := iprot.ReadStructEnd(ctx); err != nil { 46456 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 46457 } 46458 return nil 46459 } 46460 46461 func (p *ApplyDbIdxDoubleStoreResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 46462 if v, err := iprot.ReadI32(ctx); err != nil { 46463 return thrift.PrependError("error reading field 0: ", err) 46464 } else { 46465 p.Success = &v 46466 } 46467 return nil 46468 } 46469 46470 func (p *ApplyDbIdxDoubleStoreResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 46471 if err := oprot.WriteStructBegin(ctx, "db_idx_double_store_result"); err != nil { 46472 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 46473 if p != nil { 46474 if err := p.writeField0(ctx, oprot); err != nil { return err } 46475 } 46476 if err := oprot.WriteFieldStop(ctx); err != nil { 46477 return thrift.PrependError("write field stop error: ", err) } 46478 if err := oprot.WriteStructEnd(ctx); err != nil { 46479 return thrift.PrependError("write struct stop error: ", err) } 46480 return nil 46481 } 46482 46483 func (p *ApplyDbIdxDoubleStoreResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 46484 if p.IsSetSuccess() { 46485 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 46486 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 46487 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 46488 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 46489 if err := oprot.WriteFieldEnd(ctx); err != nil { 46490 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 46491 } 46492 return err 46493 } 46494 46495 func (p *ApplyDbIdxDoubleStoreResult) String() string { 46496 if p == nil { 46497 return "<nil>" 46498 } 46499 return fmt.Sprintf("ApplyDbIdxDoubleStoreResult(%+v)", *p) 46500 } 46501 46502 // Attributes: 46503 // - Iterator 46504 // - Payer 46505 // - Secondary 46506 type ApplyDbIdxDoubleUpdateArgs struct { 46507 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 46508 Payer *Uint64 `thrift:"payer,2" db:"payer" json:"payer"` 46509 Secondary []byte `thrift:"secondary,3" db:"secondary" json:"secondary"` 46510 } 46511 46512 func NewApplyDbIdxDoubleUpdateArgs() *ApplyDbIdxDoubleUpdateArgs { 46513 return &ApplyDbIdxDoubleUpdateArgs{} 46514 } 46515 46516 46517 func (p *ApplyDbIdxDoubleUpdateArgs) GetIterator() int32 { 46518 return p.Iterator 46519 } 46520 var ApplyDbIdxDoubleUpdateArgs_Payer_DEFAULT *Uint64 46521 func (p *ApplyDbIdxDoubleUpdateArgs) GetPayer() *Uint64 { 46522 if !p.IsSetPayer() { 46523 return ApplyDbIdxDoubleUpdateArgs_Payer_DEFAULT 46524 } 46525 return p.Payer 46526 } 46527 46528 func (p *ApplyDbIdxDoubleUpdateArgs) GetSecondary() []byte { 46529 return p.Secondary 46530 } 46531 func (p *ApplyDbIdxDoubleUpdateArgs) IsSetPayer() bool { 46532 return p.Payer != nil 46533 } 46534 46535 func (p *ApplyDbIdxDoubleUpdateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 46536 if _, err := iprot.ReadStructBegin(ctx); err != nil { 46537 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 46538 } 46539 46540 46541 for { 46542 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 46543 if err != nil { 46544 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 46545 } 46546 if fieldTypeId == thrift.STOP { break; } 46547 switch fieldId { 46548 case 1: 46549 if fieldTypeId == thrift.I32 { 46550 if err := p.ReadField1(ctx, iprot); err != nil { 46551 return err 46552 } 46553 } else { 46554 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46555 return err 46556 } 46557 } 46558 case 2: 46559 if fieldTypeId == thrift.STRUCT { 46560 if err := p.ReadField2(ctx, iprot); err != nil { 46561 return err 46562 } 46563 } else { 46564 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46565 return err 46566 } 46567 } 46568 case 3: 46569 if fieldTypeId == thrift.STRING { 46570 if err := p.ReadField3(ctx, iprot); err != nil { 46571 return err 46572 } 46573 } else { 46574 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46575 return err 46576 } 46577 } 46578 default: 46579 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46580 return err 46581 } 46582 } 46583 if err := iprot.ReadFieldEnd(ctx); err != nil { 46584 return err 46585 } 46586 } 46587 if err := iprot.ReadStructEnd(ctx); err != nil { 46588 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 46589 } 46590 return nil 46591 } 46592 46593 func (p *ApplyDbIdxDoubleUpdateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 46594 if v, err := iprot.ReadI32(ctx); err != nil { 46595 return thrift.PrependError("error reading field 1: ", err) 46596 } else { 46597 p.Iterator = v 46598 } 46599 return nil 46600 } 46601 46602 func (p *ApplyDbIdxDoubleUpdateArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 46603 p.Payer = &Uint64{} 46604 if err := p.Payer.Read(ctx, iprot); err != nil { 46605 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 46606 } 46607 return nil 46608 } 46609 46610 func (p *ApplyDbIdxDoubleUpdateArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 46611 if v, err := iprot.ReadBinary(ctx); err != nil { 46612 return thrift.PrependError("error reading field 3: ", err) 46613 } else { 46614 p.Secondary = v 46615 } 46616 return nil 46617 } 46618 46619 func (p *ApplyDbIdxDoubleUpdateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 46620 if err := oprot.WriteStructBegin(ctx, "db_idx_double_update_args"); err != nil { 46621 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 46622 if p != nil { 46623 if err := p.writeField1(ctx, oprot); err != nil { return err } 46624 if err := p.writeField2(ctx, oprot); err != nil { return err } 46625 if err := p.writeField3(ctx, oprot); err != nil { return err } 46626 } 46627 if err := oprot.WriteFieldStop(ctx); err != nil { 46628 return thrift.PrependError("write field stop error: ", err) } 46629 if err := oprot.WriteStructEnd(ctx); err != nil { 46630 return thrift.PrependError("write struct stop error: ", err) } 46631 return nil 46632 } 46633 46634 func (p *ApplyDbIdxDoubleUpdateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 46635 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 46636 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 46637 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 46638 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 46639 if err := oprot.WriteFieldEnd(ctx); err != nil { 46640 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 46641 return err 46642 } 46643 46644 func (p *ApplyDbIdxDoubleUpdateArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 46645 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 2); err != nil { 46646 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:payer: ", p), err) } 46647 if err := p.Payer.Write(ctx, oprot); err != nil { 46648 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 46649 } 46650 if err := oprot.WriteFieldEnd(ctx); err != nil { 46651 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:payer: ", p), err) } 46652 return err 46653 } 46654 46655 func (p *ApplyDbIdxDoubleUpdateArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 46656 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 3); err != nil { 46657 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:secondary: ", p), err) } 46658 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 46659 return thrift.PrependError(fmt.Sprintf("%T.secondary (3) field write error: ", p), err) } 46660 if err := oprot.WriteFieldEnd(ctx); err != nil { 46661 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:secondary: ", p), err) } 46662 return err 46663 } 46664 46665 func (p *ApplyDbIdxDoubleUpdateArgs) String() string { 46666 if p == nil { 46667 return "<nil>" 46668 } 46669 return fmt.Sprintf("ApplyDbIdxDoubleUpdateArgs(%+v)", *p) 46670 } 46671 46672 type ApplyDbIdxDoubleUpdateResult struct { 46673 } 46674 46675 func NewApplyDbIdxDoubleUpdateResult() *ApplyDbIdxDoubleUpdateResult { 46676 return &ApplyDbIdxDoubleUpdateResult{} 46677 } 46678 46679 func (p *ApplyDbIdxDoubleUpdateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 46680 if _, err := iprot.ReadStructBegin(ctx); err != nil { 46681 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 46682 } 46683 46684 46685 for { 46686 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 46687 if err != nil { 46688 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 46689 } 46690 if fieldTypeId == thrift.STOP { break; } 46691 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46692 return err 46693 } 46694 if err := iprot.ReadFieldEnd(ctx); err != nil { 46695 return err 46696 } 46697 } 46698 if err := iprot.ReadStructEnd(ctx); err != nil { 46699 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 46700 } 46701 return nil 46702 } 46703 46704 func (p *ApplyDbIdxDoubleUpdateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 46705 if err := oprot.WriteStructBegin(ctx, "db_idx_double_update_result"); err != nil { 46706 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 46707 if p != nil { 46708 } 46709 if err := oprot.WriteFieldStop(ctx); err != nil { 46710 return thrift.PrependError("write field stop error: ", err) } 46711 if err := oprot.WriteStructEnd(ctx); err != nil { 46712 return thrift.PrependError("write struct stop error: ", err) } 46713 return nil 46714 } 46715 46716 func (p *ApplyDbIdxDoubleUpdateResult) String() string { 46717 if p == nil { 46718 return "<nil>" 46719 } 46720 return fmt.Sprintf("ApplyDbIdxDoubleUpdateResult(%+v)", *p) 46721 } 46722 46723 // Attributes: 46724 // - Iterator 46725 type ApplyDbIdxDoubleRemoveArgs struct { 46726 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 46727 } 46728 46729 func NewApplyDbIdxDoubleRemoveArgs() *ApplyDbIdxDoubleRemoveArgs { 46730 return &ApplyDbIdxDoubleRemoveArgs{} 46731 } 46732 46733 46734 func (p *ApplyDbIdxDoubleRemoveArgs) GetIterator() int32 { 46735 return p.Iterator 46736 } 46737 func (p *ApplyDbIdxDoubleRemoveArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 46738 if _, err := iprot.ReadStructBegin(ctx); err != nil { 46739 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 46740 } 46741 46742 46743 for { 46744 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 46745 if err != nil { 46746 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 46747 } 46748 if fieldTypeId == thrift.STOP { break; } 46749 switch fieldId { 46750 case 1: 46751 if fieldTypeId == thrift.I32 { 46752 if err := p.ReadField1(ctx, iprot); err != nil { 46753 return err 46754 } 46755 } else { 46756 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46757 return err 46758 } 46759 } 46760 default: 46761 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46762 return err 46763 } 46764 } 46765 if err := iprot.ReadFieldEnd(ctx); err != nil { 46766 return err 46767 } 46768 } 46769 if err := iprot.ReadStructEnd(ctx); err != nil { 46770 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 46771 } 46772 return nil 46773 } 46774 46775 func (p *ApplyDbIdxDoubleRemoveArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 46776 if v, err := iprot.ReadI32(ctx); err != nil { 46777 return thrift.PrependError("error reading field 1: ", err) 46778 } else { 46779 p.Iterator = v 46780 } 46781 return nil 46782 } 46783 46784 func (p *ApplyDbIdxDoubleRemoveArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 46785 if err := oprot.WriteStructBegin(ctx, "db_idx_double_remove_args"); err != nil { 46786 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 46787 if p != nil { 46788 if err := p.writeField1(ctx, oprot); err != nil { return err } 46789 } 46790 if err := oprot.WriteFieldStop(ctx); err != nil { 46791 return thrift.PrependError("write field stop error: ", err) } 46792 if err := oprot.WriteStructEnd(ctx); err != nil { 46793 return thrift.PrependError("write struct stop error: ", err) } 46794 return nil 46795 } 46796 46797 func (p *ApplyDbIdxDoubleRemoveArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 46798 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 46799 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 46800 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 46801 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 46802 if err := oprot.WriteFieldEnd(ctx); err != nil { 46803 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 46804 return err 46805 } 46806 46807 func (p *ApplyDbIdxDoubleRemoveArgs) String() string { 46808 if p == nil { 46809 return "<nil>" 46810 } 46811 return fmt.Sprintf("ApplyDbIdxDoubleRemoveArgs(%+v)", *p) 46812 } 46813 46814 type ApplyDbIdxDoubleRemoveResult struct { 46815 } 46816 46817 func NewApplyDbIdxDoubleRemoveResult() *ApplyDbIdxDoubleRemoveResult { 46818 return &ApplyDbIdxDoubleRemoveResult{} 46819 } 46820 46821 func (p *ApplyDbIdxDoubleRemoveResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 46822 if _, err := iprot.ReadStructBegin(ctx); err != nil { 46823 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 46824 } 46825 46826 46827 for { 46828 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 46829 if err != nil { 46830 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 46831 } 46832 if fieldTypeId == thrift.STOP { break; } 46833 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46834 return err 46835 } 46836 if err := iprot.ReadFieldEnd(ctx); err != nil { 46837 return err 46838 } 46839 } 46840 if err := iprot.ReadStructEnd(ctx); err != nil { 46841 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 46842 } 46843 return nil 46844 } 46845 46846 func (p *ApplyDbIdxDoubleRemoveResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 46847 if err := oprot.WriteStructBegin(ctx, "db_idx_double_remove_result"); err != nil { 46848 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 46849 if p != nil { 46850 } 46851 if err := oprot.WriteFieldStop(ctx); err != nil { 46852 return thrift.PrependError("write field stop error: ", err) } 46853 if err := oprot.WriteStructEnd(ctx); err != nil { 46854 return thrift.PrependError("write struct stop error: ", err) } 46855 return nil 46856 } 46857 46858 func (p *ApplyDbIdxDoubleRemoveResult) String() string { 46859 if p == nil { 46860 return "<nil>" 46861 } 46862 return fmt.Sprintf("ApplyDbIdxDoubleRemoveResult(%+v)", *p) 46863 } 46864 46865 // Attributes: 46866 // - Iterator 46867 type ApplyDbIdxDoubleNextArgs struct { 46868 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 46869 } 46870 46871 func NewApplyDbIdxDoubleNextArgs() *ApplyDbIdxDoubleNextArgs { 46872 return &ApplyDbIdxDoubleNextArgs{} 46873 } 46874 46875 46876 func (p *ApplyDbIdxDoubleNextArgs) GetIterator() int32 { 46877 return p.Iterator 46878 } 46879 func (p *ApplyDbIdxDoubleNextArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 46880 if _, err := iprot.ReadStructBegin(ctx); err != nil { 46881 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 46882 } 46883 46884 46885 for { 46886 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 46887 if err != nil { 46888 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 46889 } 46890 if fieldTypeId == thrift.STOP { break; } 46891 switch fieldId { 46892 case 1: 46893 if fieldTypeId == thrift.I32 { 46894 if err := p.ReadField1(ctx, iprot); err != nil { 46895 return err 46896 } 46897 } else { 46898 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46899 return err 46900 } 46901 } 46902 default: 46903 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46904 return err 46905 } 46906 } 46907 if err := iprot.ReadFieldEnd(ctx); err != nil { 46908 return err 46909 } 46910 } 46911 if err := iprot.ReadStructEnd(ctx); err != nil { 46912 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 46913 } 46914 return nil 46915 } 46916 46917 func (p *ApplyDbIdxDoubleNextArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 46918 if v, err := iprot.ReadI32(ctx); err != nil { 46919 return thrift.PrependError("error reading field 1: ", err) 46920 } else { 46921 p.Iterator = v 46922 } 46923 return nil 46924 } 46925 46926 func (p *ApplyDbIdxDoubleNextArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 46927 if err := oprot.WriteStructBegin(ctx, "db_idx_double_next_args"); err != nil { 46928 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 46929 if p != nil { 46930 if err := p.writeField1(ctx, oprot); err != nil { return err } 46931 } 46932 if err := oprot.WriteFieldStop(ctx); err != nil { 46933 return thrift.PrependError("write field stop error: ", err) } 46934 if err := oprot.WriteStructEnd(ctx); err != nil { 46935 return thrift.PrependError("write struct stop error: ", err) } 46936 return nil 46937 } 46938 46939 func (p *ApplyDbIdxDoubleNextArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 46940 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 46941 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 46942 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 46943 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 46944 if err := oprot.WriteFieldEnd(ctx); err != nil { 46945 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 46946 return err 46947 } 46948 46949 func (p *ApplyDbIdxDoubleNextArgs) String() string { 46950 if p == nil { 46951 return "<nil>" 46952 } 46953 return fmt.Sprintf("ApplyDbIdxDoubleNextArgs(%+v)", *p) 46954 } 46955 46956 // Attributes: 46957 // - Success 46958 type ApplyDbIdxDoubleNextResult struct { 46959 Success *NextPreviousReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 46960 } 46961 46962 func NewApplyDbIdxDoubleNextResult() *ApplyDbIdxDoubleNextResult { 46963 return &ApplyDbIdxDoubleNextResult{} 46964 } 46965 46966 var ApplyDbIdxDoubleNextResult_Success_DEFAULT *NextPreviousReturn 46967 func (p *ApplyDbIdxDoubleNextResult) GetSuccess() *NextPreviousReturn { 46968 if !p.IsSetSuccess() { 46969 return ApplyDbIdxDoubleNextResult_Success_DEFAULT 46970 } 46971 return p.Success 46972 } 46973 func (p *ApplyDbIdxDoubleNextResult) IsSetSuccess() bool { 46974 return p.Success != nil 46975 } 46976 46977 func (p *ApplyDbIdxDoubleNextResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 46978 if _, err := iprot.ReadStructBegin(ctx); err != nil { 46979 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 46980 } 46981 46982 46983 for { 46984 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 46985 if err != nil { 46986 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 46987 } 46988 if fieldTypeId == thrift.STOP { break; } 46989 switch fieldId { 46990 case 0: 46991 if fieldTypeId == thrift.STRUCT { 46992 if err := p.ReadField0(ctx, iprot); err != nil { 46993 return err 46994 } 46995 } else { 46996 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 46997 return err 46998 } 46999 } 47000 default: 47001 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47002 return err 47003 } 47004 } 47005 if err := iprot.ReadFieldEnd(ctx); err != nil { 47006 return err 47007 } 47008 } 47009 if err := iprot.ReadStructEnd(ctx); err != nil { 47010 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 47011 } 47012 return nil 47013 } 47014 47015 func (p *ApplyDbIdxDoubleNextResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 47016 p.Success = &NextPreviousReturn{} 47017 if err := p.Success.Read(ctx, iprot); err != nil { 47018 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 47019 } 47020 return nil 47021 } 47022 47023 func (p *ApplyDbIdxDoubleNextResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 47024 if err := oprot.WriteStructBegin(ctx, "db_idx_double_next_result"); err != nil { 47025 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 47026 if p != nil { 47027 if err := p.writeField0(ctx, oprot); err != nil { return err } 47028 } 47029 if err := oprot.WriteFieldStop(ctx); err != nil { 47030 return thrift.PrependError("write field stop error: ", err) } 47031 if err := oprot.WriteStructEnd(ctx); err != nil { 47032 return thrift.PrependError("write struct stop error: ", err) } 47033 return nil 47034 } 47035 47036 func (p *ApplyDbIdxDoubleNextResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 47037 if p.IsSetSuccess() { 47038 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 47039 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 47040 if err := p.Success.Write(ctx, oprot); err != nil { 47041 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 47042 } 47043 if err := oprot.WriteFieldEnd(ctx); err != nil { 47044 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 47045 } 47046 return err 47047 } 47048 47049 func (p *ApplyDbIdxDoubleNextResult) String() string { 47050 if p == nil { 47051 return "<nil>" 47052 } 47053 return fmt.Sprintf("ApplyDbIdxDoubleNextResult(%+v)", *p) 47054 } 47055 47056 // Attributes: 47057 // - Iterator 47058 type ApplyDbIdxDoublePreviousArgs struct { 47059 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 47060 } 47061 47062 func NewApplyDbIdxDoublePreviousArgs() *ApplyDbIdxDoublePreviousArgs { 47063 return &ApplyDbIdxDoublePreviousArgs{} 47064 } 47065 47066 47067 func (p *ApplyDbIdxDoublePreviousArgs) GetIterator() int32 { 47068 return p.Iterator 47069 } 47070 func (p *ApplyDbIdxDoublePreviousArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 47071 if _, err := iprot.ReadStructBegin(ctx); err != nil { 47072 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 47073 } 47074 47075 47076 for { 47077 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 47078 if err != nil { 47079 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 47080 } 47081 if fieldTypeId == thrift.STOP { break; } 47082 switch fieldId { 47083 case 1: 47084 if fieldTypeId == thrift.I32 { 47085 if err := p.ReadField1(ctx, iprot); err != nil { 47086 return err 47087 } 47088 } else { 47089 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47090 return err 47091 } 47092 } 47093 default: 47094 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47095 return err 47096 } 47097 } 47098 if err := iprot.ReadFieldEnd(ctx); err != nil { 47099 return err 47100 } 47101 } 47102 if err := iprot.ReadStructEnd(ctx); err != nil { 47103 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 47104 } 47105 return nil 47106 } 47107 47108 func (p *ApplyDbIdxDoublePreviousArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 47109 if v, err := iprot.ReadI32(ctx); err != nil { 47110 return thrift.PrependError("error reading field 1: ", err) 47111 } else { 47112 p.Iterator = v 47113 } 47114 return nil 47115 } 47116 47117 func (p *ApplyDbIdxDoublePreviousArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 47118 if err := oprot.WriteStructBegin(ctx, "db_idx_double_previous_args"); err != nil { 47119 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 47120 if p != nil { 47121 if err := p.writeField1(ctx, oprot); err != nil { return err } 47122 } 47123 if err := oprot.WriteFieldStop(ctx); err != nil { 47124 return thrift.PrependError("write field stop error: ", err) } 47125 if err := oprot.WriteStructEnd(ctx); err != nil { 47126 return thrift.PrependError("write struct stop error: ", err) } 47127 return nil 47128 } 47129 47130 func (p *ApplyDbIdxDoublePreviousArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 47131 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 47132 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 47133 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 47134 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 47135 if err := oprot.WriteFieldEnd(ctx); err != nil { 47136 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 47137 return err 47138 } 47139 47140 func (p *ApplyDbIdxDoublePreviousArgs) String() string { 47141 if p == nil { 47142 return "<nil>" 47143 } 47144 return fmt.Sprintf("ApplyDbIdxDoublePreviousArgs(%+v)", *p) 47145 } 47146 47147 // Attributes: 47148 // - Success 47149 type ApplyDbIdxDoublePreviousResult struct { 47150 Success *NextPreviousReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 47151 } 47152 47153 func NewApplyDbIdxDoublePreviousResult() *ApplyDbIdxDoublePreviousResult { 47154 return &ApplyDbIdxDoublePreviousResult{} 47155 } 47156 47157 var ApplyDbIdxDoublePreviousResult_Success_DEFAULT *NextPreviousReturn 47158 func (p *ApplyDbIdxDoublePreviousResult) GetSuccess() *NextPreviousReturn { 47159 if !p.IsSetSuccess() { 47160 return ApplyDbIdxDoublePreviousResult_Success_DEFAULT 47161 } 47162 return p.Success 47163 } 47164 func (p *ApplyDbIdxDoublePreviousResult) IsSetSuccess() bool { 47165 return p.Success != nil 47166 } 47167 47168 func (p *ApplyDbIdxDoublePreviousResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 47169 if _, err := iprot.ReadStructBegin(ctx); err != nil { 47170 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 47171 } 47172 47173 47174 for { 47175 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 47176 if err != nil { 47177 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 47178 } 47179 if fieldTypeId == thrift.STOP { break; } 47180 switch fieldId { 47181 case 0: 47182 if fieldTypeId == thrift.STRUCT { 47183 if err := p.ReadField0(ctx, iprot); err != nil { 47184 return err 47185 } 47186 } else { 47187 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47188 return err 47189 } 47190 } 47191 default: 47192 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47193 return err 47194 } 47195 } 47196 if err := iprot.ReadFieldEnd(ctx); err != nil { 47197 return err 47198 } 47199 } 47200 if err := iprot.ReadStructEnd(ctx); err != nil { 47201 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 47202 } 47203 return nil 47204 } 47205 47206 func (p *ApplyDbIdxDoublePreviousResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 47207 p.Success = &NextPreviousReturn{} 47208 if err := p.Success.Read(ctx, iprot); err != nil { 47209 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 47210 } 47211 return nil 47212 } 47213 47214 func (p *ApplyDbIdxDoublePreviousResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 47215 if err := oprot.WriteStructBegin(ctx, "db_idx_double_previous_result"); err != nil { 47216 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 47217 if p != nil { 47218 if err := p.writeField0(ctx, oprot); err != nil { return err } 47219 } 47220 if err := oprot.WriteFieldStop(ctx); err != nil { 47221 return thrift.PrependError("write field stop error: ", err) } 47222 if err := oprot.WriteStructEnd(ctx); err != nil { 47223 return thrift.PrependError("write struct stop error: ", err) } 47224 return nil 47225 } 47226 47227 func (p *ApplyDbIdxDoublePreviousResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 47228 if p.IsSetSuccess() { 47229 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 47230 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 47231 if err := p.Success.Write(ctx, oprot); err != nil { 47232 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 47233 } 47234 if err := oprot.WriteFieldEnd(ctx); err != nil { 47235 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 47236 } 47237 return err 47238 } 47239 47240 func (p *ApplyDbIdxDoublePreviousResult) String() string { 47241 if p == nil { 47242 return "<nil>" 47243 } 47244 return fmt.Sprintf("ApplyDbIdxDoublePreviousResult(%+v)", *p) 47245 } 47246 47247 // Attributes: 47248 // - Code 47249 // - Scope 47250 // - Table 47251 // - Primary 47252 type ApplyDbIdxDoubleFindPrimaryArgs struct { 47253 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 47254 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 47255 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 47256 Primary *Uint64 `thrift:"primary,4" db:"primary" json:"primary"` 47257 } 47258 47259 func NewApplyDbIdxDoubleFindPrimaryArgs() *ApplyDbIdxDoubleFindPrimaryArgs { 47260 return &ApplyDbIdxDoubleFindPrimaryArgs{} 47261 } 47262 47263 var ApplyDbIdxDoubleFindPrimaryArgs_Code_DEFAULT *Uint64 47264 func (p *ApplyDbIdxDoubleFindPrimaryArgs) GetCode() *Uint64 { 47265 if !p.IsSetCode() { 47266 return ApplyDbIdxDoubleFindPrimaryArgs_Code_DEFAULT 47267 } 47268 return p.Code 47269 } 47270 var ApplyDbIdxDoubleFindPrimaryArgs_Scope_DEFAULT *Uint64 47271 func (p *ApplyDbIdxDoubleFindPrimaryArgs) GetScope() *Uint64 { 47272 if !p.IsSetScope() { 47273 return ApplyDbIdxDoubleFindPrimaryArgs_Scope_DEFAULT 47274 } 47275 return p.Scope 47276 } 47277 var ApplyDbIdxDoubleFindPrimaryArgs_Table_DEFAULT *Uint64 47278 func (p *ApplyDbIdxDoubleFindPrimaryArgs) GetTable() *Uint64 { 47279 if !p.IsSetTable() { 47280 return ApplyDbIdxDoubleFindPrimaryArgs_Table_DEFAULT 47281 } 47282 return p.Table 47283 } 47284 var ApplyDbIdxDoubleFindPrimaryArgs_Primary_DEFAULT *Uint64 47285 func (p *ApplyDbIdxDoubleFindPrimaryArgs) GetPrimary() *Uint64 { 47286 if !p.IsSetPrimary() { 47287 return ApplyDbIdxDoubleFindPrimaryArgs_Primary_DEFAULT 47288 } 47289 return p.Primary 47290 } 47291 func (p *ApplyDbIdxDoubleFindPrimaryArgs) IsSetCode() bool { 47292 return p.Code != nil 47293 } 47294 47295 func (p *ApplyDbIdxDoubleFindPrimaryArgs) IsSetScope() bool { 47296 return p.Scope != nil 47297 } 47298 47299 func (p *ApplyDbIdxDoubleFindPrimaryArgs) IsSetTable() bool { 47300 return p.Table != nil 47301 } 47302 47303 func (p *ApplyDbIdxDoubleFindPrimaryArgs) IsSetPrimary() bool { 47304 return p.Primary != nil 47305 } 47306 47307 func (p *ApplyDbIdxDoubleFindPrimaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 47308 if _, err := iprot.ReadStructBegin(ctx); err != nil { 47309 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 47310 } 47311 47312 47313 for { 47314 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 47315 if err != nil { 47316 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 47317 } 47318 if fieldTypeId == thrift.STOP { break; } 47319 switch fieldId { 47320 case 1: 47321 if fieldTypeId == thrift.STRUCT { 47322 if err := p.ReadField1(ctx, iprot); err != nil { 47323 return err 47324 } 47325 } else { 47326 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47327 return err 47328 } 47329 } 47330 case 2: 47331 if fieldTypeId == thrift.STRUCT { 47332 if err := p.ReadField2(ctx, iprot); err != nil { 47333 return err 47334 } 47335 } else { 47336 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47337 return err 47338 } 47339 } 47340 case 3: 47341 if fieldTypeId == thrift.STRUCT { 47342 if err := p.ReadField3(ctx, iprot); err != nil { 47343 return err 47344 } 47345 } else { 47346 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47347 return err 47348 } 47349 } 47350 case 4: 47351 if fieldTypeId == thrift.STRUCT { 47352 if err := p.ReadField4(ctx, iprot); err != nil { 47353 return err 47354 } 47355 } else { 47356 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47357 return err 47358 } 47359 } 47360 default: 47361 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47362 return err 47363 } 47364 } 47365 if err := iprot.ReadFieldEnd(ctx); err != nil { 47366 return err 47367 } 47368 } 47369 if err := iprot.ReadStructEnd(ctx); err != nil { 47370 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 47371 } 47372 return nil 47373 } 47374 47375 func (p *ApplyDbIdxDoubleFindPrimaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 47376 p.Code = &Uint64{} 47377 if err := p.Code.Read(ctx, iprot); err != nil { 47378 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 47379 } 47380 return nil 47381 } 47382 47383 func (p *ApplyDbIdxDoubleFindPrimaryArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 47384 p.Scope = &Uint64{} 47385 if err := p.Scope.Read(ctx, iprot); err != nil { 47386 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 47387 } 47388 return nil 47389 } 47390 47391 func (p *ApplyDbIdxDoubleFindPrimaryArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 47392 p.Table = &Uint64{} 47393 if err := p.Table.Read(ctx, iprot); err != nil { 47394 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 47395 } 47396 return nil 47397 } 47398 47399 func (p *ApplyDbIdxDoubleFindPrimaryArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 47400 p.Primary = &Uint64{} 47401 if err := p.Primary.Read(ctx, iprot); err != nil { 47402 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 47403 } 47404 return nil 47405 } 47406 47407 func (p *ApplyDbIdxDoubleFindPrimaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 47408 if err := oprot.WriteStructBegin(ctx, "db_idx_double_find_primary_args"); err != nil { 47409 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 47410 if p != nil { 47411 if err := p.writeField1(ctx, oprot); err != nil { return err } 47412 if err := p.writeField2(ctx, oprot); err != nil { return err } 47413 if err := p.writeField3(ctx, oprot); err != nil { return err } 47414 if err := p.writeField4(ctx, oprot); err != nil { return err } 47415 } 47416 if err := oprot.WriteFieldStop(ctx); err != nil { 47417 return thrift.PrependError("write field stop error: ", err) } 47418 if err := oprot.WriteStructEnd(ctx); err != nil { 47419 return thrift.PrependError("write struct stop error: ", err) } 47420 return nil 47421 } 47422 47423 func (p *ApplyDbIdxDoubleFindPrimaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 47424 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 47425 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 47426 if err := p.Code.Write(ctx, oprot); err != nil { 47427 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 47428 } 47429 if err := oprot.WriteFieldEnd(ctx); err != nil { 47430 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 47431 return err 47432 } 47433 47434 func (p *ApplyDbIdxDoubleFindPrimaryArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 47435 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 47436 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 47437 if err := p.Scope.Write(ctx, oprot); err != nil { 47438 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 47439 } 47440 if err := oprot.WriteFieldEnd(ctx); err != nil { 47441 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 47442 return err 47443 } 47444 47445 func (p *ApplyDbIdxDoubleFindPrimaryArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 47446 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 47447 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 47448 if err := p.Table.Write(ctx, oprot); err != nil { 47449 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 47450 } 47451 if err := oprot.WriteFieldEnd(ctx); err != nil { 47452 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 47453 return err 47454 } 47455 47456 func (p *ApplyDbIdxDoubleFindPrimaryArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 47457 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 4); err != nil { 47458 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:primary: ", p), err) } 47459 if err := p.Primary.Write(ctx, oprot); err != nil { 47460 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 47461 } 47462 if err := oprot.WriteFieldEnd(ctx); err != nil { 47463 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:primary: ", p), err) } 47464 return err 47465 } 47466 47467 func (p *ApplyDbIdxDoubleFindPrimaryArgs) String() string { 47468 if p == nil { 47469 return "<nil>" 47470 } 47471 return fmt.Sprintf("ApplyDbIdxDoubleFindPrimaryArgs(%+v)", *p) 47472 } 47473 47474 // Attributes: 47475 // - Success 47476 type ApplyDbIdxDoubleFindPrimaryResult struct { 47477 Success *FindPrimaryReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 47478 } 47479 47480 func NewApplyDbIdxDoubleFindPrimaryResult() *ApplyDbIdxDoubleFindPrimaryResult { 47481 return &ApplyDbIdxDoubleFindPrimaryResult{} 47482 } 47483 47484 var ApplyDbIdxDoubleFindPrimaryResult_Success_DEFAULT *FindPrimaryReturn 47485 func (p *ApplyDbIdxDoubleFindPrimaryResult) GetSuccess() *FindPrimaryReturn { 47486 if !p.IsSetSuccess() { 47487 return ApplyDbIdxDoubleFindPrimaryResult_Success_DEFAULT 47488 } 47489 return p.Success 47490 } 47491 func (p *ApplyDbIdxDoubleFindPrimaryResult) IsSetSuccess() bool { 47492 return p.Success != nil 47493 } 47494 47495 func (p *ApplyDbIdxDoubleFindPrimaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 47496 if _, err := iprot.ReadStructBegin(ctx); err != nil { 47497 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 47498 } 47499 47500 47501 for { 47502 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 47503 if err != nil { 47504 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 47505 } 47506 if fieldTypeId == thrift.STOP { break; } 47507 switch fieldId { 47508 case 0: 47509 if fieldTypeId == thrift.STRUCT { 47510 if err := p.ReadField0(ctx, iprot); err != nil { 47511 return err 47512 } 47513 } else { 47514 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47515 return err 47516 } 47517 } 47518 default: 47519 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47520 return err 47521 } 47522 } 47523 if err := iprot.ReadFieldEnd(ctx); err != nil { 47524 return err 47525 } 47526 } 47527 if err := iprot.ReadStructEnd(ctx); err != nil { 47528 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 47529 } 47530 return nil 47531 } 47532 47533 func (p *ApplyDbIdxDoubleFindPrimaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 47534 p.Success = &FindPrimaryReturn{} 47535 if err := p.Success.Read(ctx, iprot); err != nil { 47536 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 47537 } 47538 return nil 47539 } 47540 47541 func (p *ApplyDbIdxDoubleFindPrimaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 47542 if err := oprot.WriteStructBegin(ctx, "db_idx_double_find_primary_result"); err != nil { 47543 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 47544 if p != nil { 47545 if err := p.writeField0(ctx, oprot); err != nil { return err } 47546 } 47547 if err := oprot.WriteFieldStop(ctx); err != nil { 47548 return thrift.PrependError("write field stop error: ", err) } 47549 if err := oprot.WriteStructEnd(ctx); err != nil { 47550 return thrift.PrependError("write struct stop error: ", err) } 47551 return nil 47552 } 47553 47554 func (p *ApplyDbIdxDoubleFindPrimaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 47555 if p.IsSetSuccess() { 47556 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 47557 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 47558 if err := p.Success.Write(ctx, oprot); err != nil { 47559 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 47560 } 47561 if err := oprot.WriteFieldEnd(ctx); err != nil { 47562 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 47563 } 47564 return err 47565 } 47566 47567 func (p *ApplyDbIdxDoubleFindPrimaryResult) String() string { 47568 if p == nil { 47569 return "<nil>" 47570 } 47571 return fmt.Sprintf("ApplyDbIdxDoubleFindPrimaryResult(%+v)", *p) 47572 } 47573 47574 // Attributes: 47575 // - Code 47576 // - Scope 47577 // - Table 47578 // - Secondary 47579 type ApplyDbIdxDoubleFindSecondaryArgs struct { 47580 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 47581 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 47582 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 47583 Secondary []byte `thrift:"secondary,4" db:"secondary" json:"secondary"` 47584 } 47585 47586 func NewApplyDbIdxDoubleFindSecondaryArgs() *ApplyDbIdxDoubleFindSecondaryArgs { 47587 return &ApplyDbIdxDoubleFindSecondaryArgs{} 47588 } 47589 47590 var ApplyDbIdxDoubleFindSecondaryArgs_Code_DEFAULT *Uint64 47591 func (p *ApplyDbIdxDoubleFindSecondaryArgs) GetCode() *Uint64 { 47592 if !p.IsSetCode() { 47593 return ApplyDbIdxDoubleFindSecondaryArgs_Code_DEFAULT 47594 } 47595 return p.Code 47596 } 47597 var ApplyDbIdxDoubleFindSecondaryArgs_Scope_DEFAULT *Uint64 47598 func (p *ApplyDbIdxDoubleFindSecondaryArgs) GetScope() *Uint64 { 47599 if !p.IsSetScope() { 47600 return ApplyDbIdxDoubleFindSecondaryArgs_Scope_DEFAULT 47601 } 47602 return p.Scope 47603 } 47604 var ApplyDbIdxDoubleFindSecondaryArgs_Table_DEFAULT *Uint64 47605 func (p *ApplyDbIdxDoubleFindSecondaryArgs) GetTable() *Uint64 { 47606 if !p.IsSetTable() { 47607 return ApplyDbIdxDoubleFindSecondaryArgs_Table_DEFAULT 47608 } 47609 return p.Table 47610 } 47611 47612 func (p *ApplyDbIdxDoubleFindSecondaryArgs) GetSecondary() []byte { 47613 return p.Secondary 47614 } 47615 func (p *ApplyDbIdxDoubleFindSecondaryArgs) IsSetCode() bool { 47616 return p.Code != nil 47617 } 47618 47619 func (p *ApplyDbIdxDoubleFindSecondaryArgs) IsSetScope() bool { 47620 return p.Scope != nil 47621 } 47622 47623 func (p *ApplyDbIdxDoubleFindSecondaryArgs) IsSetTable() bool { 47624 return p.Table != nil 47625 } 47626 47627 func (p *ApplyDbIdxDoubleFindSecondaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 47628 if _, err := iprot.ReadStructBegin(ctx); err != nil { 47629 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 47630 } 47631 47632 47633 for { 47634 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 47635 if err != nil { 47636 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 47637 } 47638 if fieldTypeId == thrift.STOP { break; } 47639 switch fieldId { 47640 case 1: 47641 if fieldTypeId == thrift.STRUCT { 47642 if err := p.ReadField1(ctx, iprot); err != nil { 47643 return err 47644 } 47645 } else { 47646 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47647 return err 47648 } 47649 } 47650 case 2: 47651 if fieldTypeId == thrift.STRUCT { 47652 if err := p.ReadField2(ctx, iprot); err != nil { 47653 return err 47654 } 47655 } else { 47656 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47657 return err 47658 } 47659 } 47660 case 3: 47661 if fieldTypeId == thrift.STRUCT { 47662 if err := p.ReadField3(ctx, iprot); err != nil { 47663 return err 47664 } 47665 } else { 47666 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47667 return err 47668 } 47669 } 47670 case 4: 47671 if fieldTypeId == thrift.STRING { 47672 if err := p.ReadField4(ctx, iprot); err != nil { 47673 return err 47674 } 47675 } else { 47676 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47677 return err 47678 } 47679 } 47680 default: 47681 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47682 return err 47683 } 47684 } 47685 if err := iprot.ReadFieldEnd(ctx); err != nil { 47686 return err 47687 } 47688 } 47689 if err := iprot.ReadStructEnd(ctx); err != nil { 47690 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 47691 } 47692 return nil 47693 } 47694 47695 func (p *ApplyDbIdxDoubleFindSecondaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 47696 p.Code = &Uint64{} 47697 if err := p.Code.Read(ctx, iprot); err != nil { 47698 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 47699 } 47700 return nil 47701 } 47702 47703 func (p *ApplyDbIdxDoubleFindSecondaryArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 47704 p.Scope = &Uint64{} 47705 if err := p.Scope.Read(ctx, iprot); err != nil { 47706 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 47707 } 47708 return nil 47709 } 47710 47711 func (p *ApplyDbIdxDoubleFindSecondaryArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 47712 p.Table = &Uint64{} 47713 if err := p.Table.Read(ctx, iprot); err != nil { 47714 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 47715 } 47716 return nil 47717 } 47718 47719 func (p *ApplyDbIdxDoubleFindSecondaryArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 47720 if v, err := iprot.ReadBinary(ctx); err != nil { 47721 return thrift.PrependError("error reading field 4: ", err) 47722 } else { 47723 p.Secondary = v 47724 } 47725 return nil 47726 } 47727 47728 func (p *ApplyDbIdxDoubleFindSecondaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 47729 if err := oprot.WriteStructBegin(ctx, "db_idx_double_find_secondary_args"); err != nil { 47730 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 47731 if p != nil { 47732 if err := p.writeField1(ctx, oprot); err != nil { return err } 47733 if err := p.writeField2(ctx, oprot); err != nil { return err } 47734 if err := p.writeField3(ctx, oprot); err != nil { return err } 47735 if err := p.writeField4(ctx, oprot); err != nil { return err } 47736 } 47737 if err := oprot.WriteFieldStop(ctx); err != nil { 47738 return thrift.PrependError("write field stop error: ", err) } 47739 if err := oprot.WriteStructEnd(ctx); err != nil { 47740 return thrift.PrependError("write struct stop error: ", err) } 47741 return nil 47742 } 47743 47744 func (p *ApplyDbIdxDoubleFindSecondaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 47745 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 47746 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 47747 if err := p.Code.Write(ctx, oprot); err != nil { 47748 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 47749 } 47750 if err := oprot.WriteFieldEnd(ctx); err != nil { 47751 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 47752 return err 47753 } 47754 47755 func (p *ApplyDbIdxDoubleFindSecondaryArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 47756 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 47757 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 47758 if err := p.Scope.Write(ctx, oprot); err != nil { 47759 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 47760 } 47761 if err := oprot.WriteFieldEnd(ctx); err != nil { 47762 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 47763 return err 47764 } 47765 47766 func (p *ApplyDbIdxDoubleFindSecondaryArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 47767 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 47768 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 47769 if err := p.Table.Write(ctx, oprot); err != nil { 47770 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 47771 } 47772 if err := oprot.WriteFieldEnd(ctx); err != nil { 47773 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 47774 return err 47775 } 47776 47777 func (p *ApplyDbIdxDoubleFindSecondaryArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 47778 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 4); err != nil { 47779 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondary: ", p), err) } 47780 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 47781 return thrift.PrependError(fmt.Sprintf("%T.secondary (4) field write error: ", p), err) } 47782 if err := oprot.WriteFieldEnd(ctx); err != nil { 47783 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondary: ", p), err) } 47784 return err 47785 } 47786 47787 func (p *ApplyDbIdxDoubleFindSecondaryArgs) String() string { 47788 if p == nil { 47789 return "<nil>" 47790 } 47791 return fmt.Sprintf("ApplyDbIdxDoubleFindSecondaryArgs(%+v)", *p) 47792 } 47793 47794 // Attributes: 47795 // - Success 47796 type ApplyDbIdxDoubleFindSecondaryResult struct { 47797 Success *FindSecondaryReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 47798 } 47799 47800 func NewApplyDbIdxDoubleFindSecondaryResult() *ApplyDbIdxDoubleFindSecondaryResult { 47801 return &ApplyDbIdxDoubleFindSecondaryResult{} 47802 } 47803 47804 var ApplyDbIdxDoubleFindSecondaryResult_Success_DEFAULT *FindSecondaryReturn 47805 func (p *ApplyDbIdxDoubleFindSecondaryResult) GetSuccess() *FindSecondaryReturn { 47806 if !p.IsSetSuccess() { 47807 return ApplyDbIdxDoubleFindSecondaryResult_Success_DEFAULT 47808 } 47809 return p.Success 47810 } 47811 func (p *ApplyDbIdxDoubleFindSecondaryResult) IsSetSuccess() bool { 47812 return p.Success != nil 47813 } 47814 47815 func (p *ApplyDbIdxDoubleFindSecondaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 47816 if _, err := iprot.ReadStructBegin(ctx); err != nil { 47817 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 47818 } 47819 47820 47821 for { 47822 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 47823 if err != nil { 47824 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 47825 } 47826 if fieldTypeId == thrift.STOP { break; } 47827 switch fieldId { 47828 case 0: 47829 if fieldTypeId == thrift.STRUCT { 47830 if err := p.ReadField0(ctx, iprot); err != nil { 47831 return err 47832 } 47833 } else { 47834 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47835 return err 47836 } 47837 } 47838 default: 47839 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47840 return err 47841 } 47842 } 47843 if err := iprot.ReadFieldEnd(ctx); err != nil { 47844 return err 47845 } 47846 } 47847 if err := iprot.ReadStructEnd(ctx); err != nil { 47848 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 47849 } 47850 return nil 47851 } 47852 47853 func (p *ApplyDbIdxDoubleFindSecondaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 47854 p.Success = &FindSecondaryReturn{} 47855 if err := p.Success.Read(ctx, iprot); err != nil { 47856 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 47857 } 47858 return nil 47859 } 47860 47861 func (p *ApplyDbIdxDoubleFindSecondaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 47862 if err := oprot.WriteStructBegin(ctx, "db_idx_double_find_secondary_result"); err != nil { 47863 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 47864 if p != nil { 47865 if err := p.writeField0(ctx, oprot); err != nil { return err } 47866 } 47867 if err := oprot.WriteFieldStop(ctx); err != nil { 47868 return thrift.PrependError("write field stop error: ", err) } 47869 if err := oprot.WriteStructEnd(ctx); err != nil { 47870 return thrift.PrependError("write struct stop error: ", err) } 47871 return nil 47872 } 47873 47874 func (p *ApplyDbIdxDoubleFindSecondaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 47875 if p.IsSetSuccess() { 47876 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 47877 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 47878 if err := p.Success.Write(ctx, oprot); err != nil { 47879 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 47880 } 47881 if err := oprot.WriteFieldEnd(ctx); err != nil { 47882 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 47883 } 47884 return err 47885 } 47886 47887 func (p *ApplyDbIdxDoubleFindSecondaryResult) String() string { 47888 if p == nil { 47889 return "<nil>" 47890 } 47891 return fmt.Sprintf("ApplyDbIdxDoubleFindSecondaryResult(%+v)", *p) 47892 } 47893 47894 // Attributes: 47895 // - Code 47896 // - Scope 47897 // - Table 47898 // - Secondary 47899 // - Primary 47900 type ApplyDbIdxDoubleLowerboundArgs struct { 47901 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 47902 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 47903 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 47904 Secondary []byte `thrift:"secondary,4" db:"secondary" json:"secondary"` 47905 Primary *Uint64 `thrift:"primary,5" db:"primary" json:"primary"` 47906 } 47907 47908 func NewApplyDbIdxDoubleLowerboundArgs() *ApplyDbIdxDoubleLowerboundArgs { 47909 return &ApplyDbIdxDoubleLowerboundArgs{} 47910 } 47911 47912 var ApplyDbIdxDoubleLowerboundArgs_Code_DEFAULT *Uint64 47913 func (p *ApplyDbIdxDoubleLowerboundArgs) GetCode() *Uint64 { 47914 if !p.IsSetCode() { 47915 return ApplyDbIdxDoubleLowerboundArgs_Code_DEFAULT 47916 } 47917 return p.Code 47918 } 47919 var ApplyDbIdxDoubleLowerboundArgs_Scope_DEFAULT *Uint64 47920 func (p *ApplyDbIdxDoubleLowerboundArgs) GetScope() *Uint64 { 47921 if !p.IsSetScope() { 47922 return ApplyDbIdxDoubleLowerboundArgs_Scope_DEFAULT 47923 } 47924 return p.Scope 47925 } 47926 var ApplyDbIdxDoubleLowerboundArgs_Table_DEFAULT *Uint64 47927 func (p *ApplyDbIdxDoubleLowerboundArgs) GetTable() *Uint64 { 47928 if !p.IsSetTable() { 47929 return ApplyDbIdxDoubleLowerboundArgs_Table_DEFAULT 47930 } 47931 return p.Table 47932 } 47933 47934 func (p *ApplyDbIdxDoubleLowerboundArgs) GetSecondary() []byte { 47935 return p.Secondary 47936 } 47937 var ApplyDbIdxDoubleLowerboundArgs_Primary_DEFAULT *Uint64 47938 func (p *ApplyDbIdxDoubleLowerboundArgs) GetPrimary() *Uint64 { 47939 if !p.IsSetPrimary() { 47940 return ApplyDbIdxDoubleLowerboundArgs_Primary_DEFAULT 47941 } 47942 return p.Primary 47943 } 47944 func (p *ApplyDbIdxDoubleLowerboundArgs) IsSetCode() bool { 47945 return p.Code != nil 47946 } 47947 47948 func (p *ApplyDbIdxDoubleLowerboundArgs) IsSetScope() bool { 47949 return p.Scope != nil 47950 } 47951 47952 func (p *ApplyDbIdxDoubleLowerboundArgs) IsSetTable() bool { 47953 return p.Table != nil 47954 } 47955 47956 func (p *ApplyDbIdxDoubleLowerboundArgs) IsSetPrimary() bool { 47957 return p.Primary != nil 47958 } 47959 47960 func (p *ApplyDbIdxDoubleLowerboundArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 47961 if _, err := iprot.ReadStructBegin(ctx); err != nil { 47962 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 47963 } 47964 47965 47966 for { 47967 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 47968 if err != nil { 47969 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 47970 } 47971 if fieldTypeId == thrift.STOP { break; } 47972 switch fieldId { 47973 case 1: 47974 if fieldTypeId == thrift.STRUCT { 47975 if err := p.ReadField1(ctx, iprot); err != nil { 47976 return err 47977 } 47978 } else { 47979 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47980 return err 47981 } 47982 } 47983 case 2: 47984 if fieldTypeId == thrift.STRUCT { 47985 if err := p.ReadField2(ctx, iprot); err != nil { 47986 return err 47987 } 47988 } else { 47989 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 47990 return err 47991 } 47992 } 47993 case 3: 47994 if fieldTypeId == thrift.STRUCT { 47995 if err := p.ReadField3(ctx, iprot); err != nil { 47996 return err 47997 } 47998 } else { 47999 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48000 return err 48001 } 48002 } 48003 case 4: 48004 if fieldTypeId == thrift.STRING { 48005 if err := p.ReadField4(ctx, iprot); err != nil { 48006 return err 48007 } 48008 } else { 48009 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48010 return err 48011 } 48012 } 48013 case 5: 48014 if fieldTypeId == thrift.STRUCT { 48015 if err := p.ReadField5(ctx, iprot); err != nil { 48016 return err 48017 } 48018 } else { 48019 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48020 return err 48021 } 48022 } 48023 default: 48024 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48025 return err 48026 } 48027 } 48028 if err := iprot.ReadFieldEnd(ctx); err != nil { 48029 return err 48030 } 48031 } 48032 if err := iprot.ReadStructEnd(ctx); err != nil { 48033 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 48034 } 48035 return nil 48036 } 48037 48038 func (p *ApplyDbIdxDoubleLowerboundArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 48039 p.Code = &Uint64{} 48040 if err := p.Code.Read(ctx, iprot); err != nil { 48041 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 48042 } 48043 return nil 48044 } 48045 48046 func (p *ApplyDbIdxDoubleLowerboundArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 48047 p.Scope = &Uint64{} 48048 if err := p.Scope.Read(ctx, iprot); err != nil { 48049 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 48050 } 48051 return nil 48052 } 48053 48054 func (p *ApplyDbIdxDoubleLowerboundArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 48055 p.Table = &Uint64{} 48056 if err := p.Table.Read(ctx, iprot); err != nil { 48057 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 48058 } 48059 return nil 48060 } 48061 48062 func (p *ApplyDbIdxDoubleLowerboundArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 48063 if v, err := iprot.ReadBinary(ctx); err != nil { 48064 return thrift.PrependError("error reading field 4: ", err) 48065 } else { 48066 p.Secondary = v 48067 } 48068 return nil 48069 } 48070 48071 func (p *ApplyDbIdxDoubleLowerboundArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 48072 p.Primary = &Uint64{} 48073 if err := p.Primary.Read(ctx, iprot); err != nil { 48074 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 48075 } 48076 return nil 48077 } 48078 48079 func (p *ApplyDbIdxDoubleLowerboundArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 48080 if err := oprot.WriteStructBegin(ctx, "db_idx_double_lowerbound_args"); err != nil { 48081 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 48082 if p != nil { 48083 if err := p.writeField1(ctx, oprot); err != nil { return err } 48084 if err := p.writeField2(ctx, oprot); err != nil { return err } 48085 if err := p.writeField3(ctx, oprot); err != nil { return err } 48086 if err := p.writeField4(ctx, oprot); err != nil { return err } 48087 if err := p.writeField5(ctx, oprot); err != nil { return err } 48088 } 48089 if err := oprot.WriteFieldStop(ctx); err != nil { 48090 return thrift.PrependError("write field stop error: ", err) } 48091 if err := oprot.WriteStructEnd(ctx); err != nil { 48092 return thrift.PrependError("write struct stop error: ", err) } 48093 return nil 48094 } 48095 48096 func (p *ApplyDbIdxDoubleLowerboundArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 48097 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 48098 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 48099 if err := p.Code.Write(ctx, oprot); err != nil { 48100 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 48101 } 48102 if err := oprot.WriteFieldEnd(ctx); err != nil { 48103 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 48104 return err 48105 } 48106 48107 func (p *ApplyDbIdxDoubleLowerboundArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 48108 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 48109 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 48110 if err := p.Scope.Write(ctx, oprot); err != nil { 48111 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 48112 } 48113 if err := oprot.WriteFieldEnd(ctx); err != nil { 48114 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 48115 return err 48116 } 48117 48118 func (p *ApplyDbIdxDoubleLowerboundArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 48119 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 48120 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 48121 if err := p.Table.Write(ctx, oprot); err != nil { 48122 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 48123 } 48124 if err := oprot.WriteFieldEnd(ctx); err != nil { 48125 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 48126 return err 48127 } 48128 48129 func (p *ApplyDbIdxDoubleLowerboundArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 48130 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 4); err != nil { 48131 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondary: ", p), err) } 48132 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 48133 return thrift.PrependError(fmt.Sprintf("%T.secondary (4) field write error: ", p), err) } 48134 if err := oprot.WriteFieldEnd(ctx); err != nil { 48135 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondary: ", p), err) } 48136 return err 48137 } 48138 48139 func (p *ApplyDbIdxDoubleLowerboundArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 48140 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 5); err != nil { 48141 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:primary: ", p), err) } 48142 if err := p.Primary.Write(ctx, oprot); err != nil { 48143 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 48144 } 48145 if err := oprot.WriteFieldEnd(ctx); err != nil { 48146 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:primary: ", p), err) } 48147 return err 48148 } 48149 48150 func (p *ApplyDbIdxDoubleLowerboundArgs) String() string { 48151 if p == nil { 48152 return "<nil>" 48153 } 48154 return fmt.Sprintf("ApplyDbIdxDoubleLowerboundArgs(%+v)", *p) 48155 } 48156 48157 // Attributes: 48158 // - Success 48159 type ApplyDbIdxDoubleLowerboundResult struct { 48160 Success *LowerBoundUpperBoundReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 48161 } 48162 48163 func NewApplyDbIdxDoubleLowerboundResult() *ApplyDbIdxDoubleLowerboundResult { 48164 return &ApplyDbIdxDoubleLowerboundResult{} 48165 } 48166 48167 var ApplyDbIdxDoubleLowerboundResult_Success_DEFAULT *LowerBoundUpperBoundReturn 48168 func (p *ApplyDbIdxDoubleLowerboundResult) GetSuccess() *LowerBoundUpperBoundReturn { 48169 if !p.IsSetSuccess() { 48170 return ApplyDbIdxDoubleLowerboundResult_Success_DEFAULT 48171 } 48172 return p.Success 48173 } 48174 func (p *ApplyDbIdxDoubleLowerboundResult) IsSetSuccess() bool { 48175 return p.Success != nil 48176 } 48177 48178 func (p *ApplyDbIdxDoubleLowerboundResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 48179 if _, err := iprot.ReadStructBegin(ctx); err != nil { 48180 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 48181 } 48182 48183 48184 for { 48185 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 48186 if err != nil { 48187 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 48188 } 48189 if fieldTypeId == thrift.STOP { break; } 48190 switch fieldId { 48191 case 0: 48192 if fieldTypeId == thrift.STRUCT { 48193 if err := p.ReadField0(ctx, iprot); err != nil { 48194 return err 48195 } 48196 } else { 48197 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48198 return err 48199 } 48200 } 48201 default: 48202 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48203 return err 48204 } 48205 } 48206 if err := iprot.ReadFieldEnd(ctx); err != nil { 48207 return err 48208 } 48209 } 48210 if err := iprot.ReadStructEnd(ctx); err != nil { 48211 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 48212 } 48213 return nil 48214 } 48215 48216 func (p *ApplyDbIdxDoubleLowerboundResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 48217 p.Success = &LowerBoundUpperBoundReturn{} 48218 if err := p.Success.Read(ctx, iprot); err != nil { 48219 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 48220 } 48221 return nil 48222 } 48223 48224 func (p *ApplyDbIdxDoubleLowerboundResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 48225 if err := oprot.WriteStructBegin(ctx, "db_idx_double_lowerbound_result"); err != nil { 48226 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 48227 if p != nil { 48228 if err := p.writeField0(ctx, oprot); err != nil { return err } 48229 } 48230 if err := oprot.WriteFieldStop(ctx); err != nil { 48231 return thrift.PrependError("write field stop error: ", err) } 48232 if err := oprot.WriteStructEnd(ctx); err != nil { 48233 return thrift.PrependError("write struct stop error: ", err) } 48234 return nil 48235 } 48236 48237 func (p *ApplyDbIdxDoubleLowerboundResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 48238 if p.IsSetSuccess() { 48239 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 48240 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 48241 if err := p.Success.Write(ctx, oprot); err != nil { 48242 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 48243 } 48244 if err := oprot.WriteFieldEnd(ctx); err != nil { 48245 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 48246 } 48247 return err 48248 } 48249 48250 func (p *ApplyDbIdxDoubleLowerboundResult) String() string { 48251 if p == nil { 48252 return "<nil>" 48253 } 48254 return fmt.Sprintf("ApplyDbIdxDoubleLowerboundResult(%+v)", *p) 48255 } 48256 48257 // Attributes: 48258 // - Code 48259 // - Scope 48260 // - Table 48261 // - Secondary 48262 // - Primary 48263 type ApplyDbIdxDoubleUpperboundArgs struct { 48264 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 48265 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 48266 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 48267 Secondary []byte `thrift:"secondary,4" db:"secondary" json:"secondary"` 48268 Primary *Uint64 `thrift:"primary,5" db:"primary" json:"primary"` 48269 } 48270 48271 func NewApplyDbIdxDoubleUpperboundArgs() *ApplyDbIdxDoubleUpperboundArgs { 48272 return &ApplyDbIdxDoubleUpperboundArgs{} 48273 } 48274 48275 var ApplyDbIdxDoubleUpperboundArgs_Code_DEFAULT *Uint64 48276 func (p *ApplyDbIdxDoubleUpperboundArgs) GetCode() *Uint64 { 48277 if !p.IsSetCode() { 48278 return ApplyDbIdxDoubleUpperboundArgs_Code_DEFAULT 48279 } 48280 return p.Code 48281 } 48282 var ApplyDbIdxDoubleUpperboundArgs_Scope_DEFAULT *Uint64 48283 func (p *ApplyDbIdxDoubleUpperboundArgs) GetScope() *Uint64 { 48284 if !p.IsSetScope() { 48285 return ApplyDbIdxDoubleUpperboundArgs_Scope_DEFAULT 48286 } 48287 return p.Scope 48288 } 48289 var ApplyDbIdxDoubleUpperboundArgs_Table_DEFAULT *Uint64 48290 func (p *ApplyDbIdxDoubleUpperboundArgs) GetTable() *Uint64 { 48291 if !p.IsSetTable() { 48292 return ApplyDbIdxDoubleUpperboundArgs_Table_DEFAULT 48293 } 48294 return p.Table 48295 } 48296 48297 func (p *ApplyDbIdxDoubleUpperboundArgs) GetSecondary() []byte { 48298 return p.Secondary 48299 } 48300 var ApplyDbIdxDoubleUpperboundArgs_Primary_DEFAULT *Uint64 48301 func (p *ApplyDbIdxDoubleUpperboundArgs) GetPrimary() *Uint64 { 48302 if !p.IsSetPrimary() { 48303 return ApplyDbIdxDoubleUpperboundArgs_Primary_DEFAULT 48304 } 48305 return p.Primary 48306 } 48307 func (p *ApplyDbIdxDoubleUpperboundArgs) IsSetCode() bool { 48308 return p.Code != nil 48309 } 48310 48311 func (p *ApplyDbIdxDoubleUpperboundArgs) IsSetScope() bool { 48312 return p.Scope != nil 48313 } 48314 48315 func (p *ApplyDbIdxDoubleUpperboundArgs) IsSetTable() bool { 48316 return p.Table != nil 48317 } 48318 48319 func (p *ApplyDbIdxDoubleUpperboundArgs) IsSetPrimary() bool { 48320 return p.Primary != nil 48321 } 48322 48323 func (p *ApplyDbIdxDoubleUpperboundArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 48324 if _, err := iprot.ReadStructBegin(ctx); err != nil { 48325 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 48326 } 48327 48328 48329 for { 48330 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 48331 if err != nil { 48332 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 48333 } 48334 if fieldTypeId == thrift.STOP { break; } 48335 switch fieldId { 48336 case 1: 48337 if fieldTypeId == thrift.STRUCT { 48338 if err := p.ReadField1(ctx, iprot); err != nil { 48339 return err 48340 } 48341 } else { 48342 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48343 return err 48344 } 48345 } 48346 case 2: 48347 if fieldTypeId == thrift.STRUCT { 48348 if err := p.ReadField2(ctx, iprot); err != nil { 48349 return err 48350 } 48351 } else { 48352 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48353 return err 48354 } 48355 } 48356 case 3: 48357 if fieldTypeId == thrift.STRUCT { 48358 if err := p.ReadField3(ctx, iprot); err != nil { 48359 return err 48360 } 48361 } else { 48362 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48363 return err 48364 } 48365 } 48366 case 4: 48367 if fieldTypeId == thrift.STRING { 48368 if err := p.ReadField4(ctx, iprot); err != nil { 48369 return err 48370 } 48371 } else { 48372 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48373 return err 48374 } 48375 } 48376 case 5: 48377 if fieldTypeId == thrift.STRUCT { 48378 if err := p.ReadField5(ctx, iprot); err != nil { 48379 return err 48380 } 48381 } else { 48382 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48383 return err 48384 } 48385 } 48386 default: 48387 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48388 return err 48389 } 48390 } 48391 if err := iprot.ReadFieldEnd(ctx); err != nil { 48392 return err 48393 } 48394 } 48395 if err := iprot.ReadStructEnd(ctx); err != nil { 48396 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 48397 } 48398 return nil 48399 } 48400 48401 func (p *ApplyDbIdxDoubleUpperboundArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 48402 p.Code = &Uint64{} 48403 if err := p.Code.Read(ctx, iprot); err != nil { 48404 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 48405 } 48406 return nil 48407 } 48408 48409 func (p *ApplyDbIdxDoubleUpperboundArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 48410 p.Scope = &Uint64{} 48411 if err := p.Scope.Read(ctx, iprot); err != nil { 48412 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 48413 } 48414 return nil 48415 } 48416 48417 func (p *ApplyDbIdxDoubleUpperboundArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 48418 p.Table = &Uint64{} 48419 if err := p.Table.Read(ctx, iprot); err != nil { 48420 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 48421 } 48422 return nil 48423 } 48424 48425 func (p *ApplyDbIdxDoubleUpperboundArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 48426 if v, err := iprot.ReadBinary(ctx); err != nil { 48427 return thrift.PrependError("error reading field 4: ", err) 48428 } else { 48429 p.Secondary = v 48430 } 48431 return nil 48432 } 48433 48434 func (p *ApplyDbIdxDoubleUpperboundArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 48435 p.Primary = &Uint64{} 48436 if err := p.Primary.Read(ctx, iprot); err != nil { 48437 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 48438 } 48439 return nil 48440 } 48441 48442 func (p *ApplyDbIdxDoubleUpperboundArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 48443 if err := oprot.WriteStructBegin(ctx, "db_idx_double_upperbound_args"); err != nil { 48444 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 48445 if p != nil { 48446 if err := p.writeField1(ctx, oprot); err != nil { return err } 48447 if err := p.writeField2(ctx, oprot); err != nil { return err } 48448 if err := p.writeField3(ctx, oprot); err != nil { return err } 48449 if err := p.writeField4(ctx, oprot); err != nil { return err } 48450 if err := p.writeField5(ctx, oprot); err != nil { return err } 48451 } 48452 if err := oprot.WriteFieldStop(ctx); err != nil { 48453 return thrift.PrependError("write field stop error: ", err) } 48454 if err := oprot.WriteStructEnd(ctx); err != nil { 48455 return thrift.PrependError("write struct stop error: ", err) } 48456 return nil 48457 } 48458 48459 func (p *ApplyDbIdxDoubleUpperboundArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 48460 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 48461 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 48462 if err := p.Code.Write(ctx, oprot); err != nil { 48463 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 48464 } 48465 if err := oprot.WriteFieldEnd(ctx); err != nil { 48466 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 48467 return err 48468 } 48469 48470 func (p *ApplyDbIdxDoubleUpperboundArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 48471 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 48472 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 48473 if err := p.Scope.Write(ctx, oprot); err != nil { 48474 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 48475 } 48476 if err := oprot.WriteFieldEnd(ctx); err != nil { 48477 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 48478 return err 48479 } 48480 48481 func (p *ApplyDbIdxDoubleUpperboundArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 48482 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 48483 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 48484 if err := p.Table.Write(ctx, oprot); err != nil { 48485 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 48486 } 48487 if err := oprot.WriteFieldEnd(ctx); err != nil { 48488 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 48489 return err 48490 } 48491 48492 func (p *ApplyDbIdxDoubleUpperboundArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 48493 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 4); err != nil { 48494 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondary: ", p), err) } 48495 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 48496 return thrift.PrependError(fmt.Sprintf("%T.secondary (4) field write error: ", p), err) } 48497 if err := oprot.WriteFieldEnd(ctx); err != nil { 48498 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondary: ", p), err) } 48499 return err 48500 } 48501 48502 func (p *ApplyDbIdxDoubleUpperboundArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 48503 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 5); err != nil { 48504 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:primary: ", p), err) } 48505 if err := p.Primary.Write(ctx, oprot); err != nil { 48506 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 48507 } 48508 if err := oprot.WriteFieldEnd(ctx); err != nil { 48509 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:primary: ", p), err) } 48510 return err 48511 } 48512 48513 func (p *ApplyDbIdxDoubleUpperboundArgs) String() string { 48514 if p == nil { 48515 return "<nil>" 48516 } 48517 return fmt.Sprintf("ApplyDbIdxDoubleUpperboundArgs(%+v)", *p) 48518 } 48519 48520 // Attributes: 48521 // - Success 48522 type ApplyDbIdxDoubleUpperboundResult struct { 48523 Success *LowerBoundUpperBoundReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 48524 } 48525 48526 func NewApplyDbIdxDoubleUpperboundResult() *ApplyDbIdxDoubleUpperboundResult { 48527 return &ApplyDbIdxDoubleUpperboundResult{} 48528 } 48529 48530 var ApplyDbIdxDoubleUpperboundResult_Success_DEFAULT *LowerBoundUpperBoundReturn 48531 func (p *ApplyDbIdxDoubleUpperboundResult) GetSuccess() *LowerBoundUpperBoundReturn { 48532 if !p.IsSetSuccess() { 48533 return ApplyDbIdxDoubleUpperboundResult_Success_DEFAULT 48534 } 48535 return p.Success 48536 } 48537 func (p *ApplyDbIdxDoubleUpperboundResult) IsSetSuccess() bool { 48538 return p.Success != nil 48539 } 48540 48541 func (p *ApplyDbIdxDoubleUpperboundResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 48542 if _, err := iprot.ReadStructBegin(ctx); err != nil { 48543 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 48544 } 48545 48546 48547 for { 48548 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 48549 if err != nil { 48550 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 48551 } 48552 if fieldTypeId == thrift.STOP { break; } 48553 switch fieldId { 48554 case 0: 48555 if fieldTypeId == thrift.STRUCT { 48556 if err := p.ReadField0(ctx, iprot); err != nil { 48557 return err 48558 } 48559 } else { 48560 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48561 return err 48562 } 48563 } 48564 default: 48565 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48566 return err 48567 } 48568 } 48569 if err := iprot.ReadFieldEnd(ctx); err != nil { 48570 return err 48571 } 48572 } 48573 if err := iprot.ReadStructEnd(ctx); err != nil { 48574 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 48575 } 48576 return nil 48577 } 48578 48579 func (p *ApplyDbIdxDoubleUpperboundResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 48580 p.Success = &LowerBoundUpperBoundReturn{} 48581 if err := p.Success.Read(ctx, iprot); err != nil { 48582 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 48583 } 48584 return nil 48585 } 48586 48587 func (p *ApplyDbIdxDoubleUpperboundResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 48588 if err := oprot.WriteStructBegin(ctx, "db_idx_double_upperbound_result"); err != nil { 48589 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 48590 if p != nil { 48591 if err := p.writeField0(ctx, oprot); err != nil { return err } 48592 } 48593 if err := oprot.WriteFieldStop(ctx); err != nil { 48594 return thrift.PrependError("write field stop error: ", err) } 48595 if err := oprot.WriteStructEnd(ctx); err != nil { 48596 return thrift.PrependError("write struct stop error: ", err) } 48597 return nil 48598 } 48599 48600 func (p *ApplyDbIdxDoubleUpperboundResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 48601 if p.IsSetSuccess() { 48602 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 48603 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 48604 if err := p.Success.Write(ctx, oprot); err != nil { 48605 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 48606 } 48607 if err := oprot.WriteFieldEnd(ctx); err != nil { 48608 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 48609 } 48610 return err 48611 } 48612 48613 func (p *ApplyDbIdxDoubleUpperboundResult) String() string { 48614 if p == nil { 48615 return "<nil>" 48616 } 48617 return fmt.Sprintf("ApplyDbIdxDoubleUpperboundResult(%+v)", *p) 48618 } 48619 48620 // Attributes: 48621 // - Code 48622 // - Scope 48623 // - Table 48624 type ApplyDbIdxDoubleEndArgs struct { 48625 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 48626 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 48627 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 48628 } 48629 48630 func NewApplyDbIdxDoubleEndArgs() *ApplyDbIdxDoubleEndArgs { 48631 return &ApplyDbIdxDoubleEndArgs{} 48632 } 48633 48634 var ApplyDbIdxDoubleEndArgs_Code_DEFAULT *Uint64 48635 func (p *ApplyDbIdxDoubleEndArgs) GetCode() *Uint64 { 48636 if !p.IsSetCode() { 48637 return ApplyDbIdxDoubleEndArgs_Code_DEFAULT 48638 } 48639 return p.Code 48640 } 48641 var ApplyDbIdxDoubleEndArgs_Scope_DEFAULT *Uint64 48642 func (p *ApplyDbIdxDoubleEndArgs) GetScope() *Uint64 { 48643 if !p.IsSetScope() { 48644 return ApplyDbIdxDoubleEndArgs_Scope_DEFAULT 48645 } 48646 return p.Scope 48647 } 48648 var ApplyDbIdxDoubleEndArgs_Table_DEFAULT *Uint64 48649 func (p *ApplyDbIdxDoubleEndArgs) GetTable() *Uint64 { 48650 if !p.IsSetTable() { 48651 return ApplyDbIdxDoubleEndArgs_Table_DEFAULT 48652 } 48653 return p.Table 48654 } 48655 func (p *ApplyDbIdxDoubleEndArgs) IsSetCode() bool { 48656 return p.Code != nil 48657 } 48658 48659 func (p *ApplyDbIdxDoubleEndArgs) IsSetScope() bool { 48660 return p.Scope != nil 48661 } 48662 48663 func (p *ApplyDbIdxDoubleEndArgs) IsSetTable() bool { 48664 return p.Table != nil 48665 } 48666 48667 func (p *ApplyDbIdxDoubleEndArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 48668 if _, err := iprot.ReadStructBegin(ctx); err != nil { 48669 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 48670 } 48671 48672 48673 for { 48674 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 48675 if err != nil { 48676 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 48677 } 48678 if fieldTypeId == thrift.STOP { break; } 48679 switch fieldId { 48680 case 1: 48681 if fieldTypeId == thrift.STRUCT { 48682 if err := p.ReadField1(ctx, iprot); err != nil { 48683 return err 48684 } 48685 } else { 48686 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48687 return err 48688 } 48689 } 48690 case 2: 48691 if fieldTypeId == thrift.STRUCT { 48692 if err := p.ReadField2(ctx, iprot); err != nil { 48693 return err 48694 } 48695 } else { 48696 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48697 return err 48698 } 48699 } 48700 case 3: 48701 if fieldTypeId == thrift.STRUCT { 48702 if err := p.ReadField3(ctx, iprot); err != nil { 48703 return err 48704 } 48705 } else { 48706 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48707 return err 48708 } 48709 } 48710 default: 48711 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48712 return err 48713 } 48714 } 48715 if err := iprot.ReadFieldEnd(ctx); err != nil { 48716 return err 48717 } 48718 } 48719 if err := iprot.ReadStructEnd(ctx); err != nil { 48720 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 48721 } 48722 return nil 48723 } 48724 48725 func (p *ApplyDbIdxDoubleEndArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 48726 p.Code = &Uint64{} 48727 if err := p.Code.Read(ctx, iprot); err != nil { 48728 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 48729 } 48730 return nil 48731 } 48732 48733 func (p *ApplyDbIdxDoubleEndArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 48734 p.Scope = &Uint64{} 48735 if err := p.Scope.Read(ctx, iprot); err != nil { 48736 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 48737 } 48738 return nil 48739 } 48740 48741 func (p *ApplyDbIdxDoubleEndArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 48742 p.Table = &Uint64{} 48743 if err := p.Table.Read(ctx, iprot); err != nil { 48744 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 48745 } 48746 return nil 48747 } 48748 48749 func (p *ApplyDbIdxDoubleEndArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 48750 if err := oprot.WriteStructBegin(ctx, "db_idx_double_end_args"); err != nil { 48751 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 48752 if p != nil { 48753 if err := p.writeField1(ctx, oprot); err != nil { return err } 48754 if err := p.writeField2(ctx, oprot); err != nil { return err } 48755 if err := p.writeField3(ctx, oprot); err != nil { return err } 48756 } 48757 if err := oprot.WriteFieldStop(ctx); err != nil { 48758 return thrift.PrependError("write field stop error: ", err) } 48759 if err := oprot.WriteStructEnd(ctx); err != nil { 48760 return thrift.PrependError("write struct stop error: ", err) } 48761 return nil 48762 } 48763 48764 func (p *ApplyDbIdxDoubleEndArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 48765 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 48766 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 48767 if err := p.Code.Write(ctx, oprot); err != nil { 48768 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 48769 } 48770 if err := oprot.WriteFieldEnd(ctx); err != nil { 48771 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 48772 return err 48773 } 48774 48775 func (p *ApplyDbIdxDoubleEndArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 48776 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 48777 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 48778 if err := p.Scope.Write(ctx, oprot); err != nil { 48779 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 48780 } 48781 if err := oprot.WriteFieldEnd(ctx); err != nil { 48782 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 48783 return err 48784 } 48785 48786 func (p *ApplyDbIdxDoubleEndArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 48787 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 48788 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 48789 if err := p.Table.Write(ctx, oprot); err != nil { 48790 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 48791 } 48792 if err := oprot.WriteFieldEnd(ctx); err != nil { 48793 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 48794 return err 48795 } 48796 48797 func (p *ApplyDbIdxDoubleEndArgs) String() string { 48798 if p == nil { 48799 return "<nil>" 48800 } 48801 return fmt.Sprintf("ApplyDbIdxDoubleEndArgs(%+v)", *p) 48802 } 48803 48804 // Attributes: 48805 // - Success 48806 type ApplyDbIdxDoubleEndResult struct { 48807 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 48808 } 48809 48810 func NewApplyDbIdxDoubleEndResult() *ApplyDbIdxDoubleEndResult { 48811 return &ApplyDbIdxDoubleEndResult{} 48812 } 48813 48814 var ApplyDbIdxDoubleEndResult_Success_DEFAULT int32 48815 func (p *ApplyDbIdxDoubleEndResult) GetSuccess() int32 { 48816 if !p.IsSetSuccess() { 48817 return ApplyDbIdxDoubleEndResult_Success_DEFAULT 48818 } 48819 return *p.Success 48820 } 48821 func (p *ApplyDbIdxDoubleEndResult) IsSetSuccess() bool { 48822 return p.Success != nil 48823 } 48824 48825 func (p *ApplyDbIdxDoubleEndResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 48826 if _, err := iprot.ReadStructBegin(ctx); err != nil { 48827 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 48828 } 48829 48830 48831 for { 48832 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 48833 if err != nil { 48834 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 48835 } 48836 if fieldTypeId == thrift.STOP { break; } 48837 switch fieldId { 48838 case 0: 48839 if fieldTypeId == thrift.I32 { 48840 if err := p.ReadField0(ctx, iprot); err != nil { 48841 return err 48842 } 48843 } else { 48844 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48845 return err 48846 } 48847 } 48848 default: 48849 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48850 return err 48851 } 48852 } 48853 if err := iprot.ReadFieldEnd(ctx); err != nil { 48854 return err 48855 } 48856 } 48857 if err := iprot.ReadStructEnd(ctx); err != nil { 48858 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 48859 } 48860 return nil 48861 } 48862 48863 func (p *ApplyDbIdxDoubleEndResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 48864 if v, err := iprot.ReadI32(ctx); err != nil { 48865 return thrift.PrependError("error reading field 0: ", err) 48866 } else { 48867 p.Success = &v 48868 } 48869 return nil 48870 } 48871 48872 func (p *ApplyDbIdxDoubleEndResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 48873 if err := oprot.WriteStructBegin(ctx, "db_idx_double_end_result"); err != nil { 48874 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 48875 if p != nil { 48876 if err := p.writeField0(ctx, oprot); err != nil { return err } 48877 } 48878 if err := oprot.WriteFieldStop(ctx); err != nil { 48879 return thrift.PrependError("write field stop error: ", err) } 48880 if err := oprot.WriteStructEnd(ctx); err != nil { 48881 return thrift.PrependError("write struct stop error: ", err) } 48882 return nil 48883 } 48884 48885 func (p *ApplyDbIdxDoubleEndResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 48886 if p.IsSetSuccess() { 48887 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 48888 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 48889 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 48890 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 48891 if err := oprot.WriteFieldEnd(ctx); err != nil { 48892 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 48893 } 48894 return err 48895 } 48896 48897 func (p *ApplyDbIdxDoubleEndResult) String() string { 48898 if p == nil { 48899 return "<nil>" 48900 } 48901 return fmt.Sprintf("ApplyDbIdxDoubleEndResult(%+v)", *p) 48902 } 48903 48904 // Attributes: 48905 // - Scope 48906 // - Table 48907 // - Payer 48908 // - ID 48909 // - Secondary 48910 type ApplyDbIdxLongDoubleStoreArgs struct { 48911 Scope *Uint64 `thrift:"scope,1" db:"scope" json:"scope"` 48912 Table *Uint64 `thrift:"table,2" db:"table" json:"table"` 48913 Payer *Uint64 `thrift:"payer,3" db:"payer" json:"payer"` 48914 ID *Uint64 `thrift:"id,4" db:"id" json:"id"` 48915 Secondary []byte `thrift:"secondary,5" db:"secondary" json:"secondary"` 48916 } 48917 48918 func NewApplyDbIdxLongDoubleStoreArgs() *ApplyDbIdxLongDoubleStoreArgs { 48919 return &ApplyDbIdxLongDoubleStoreArgs{} 48920 } 48921 48922 var ApplyDbIdxLongDoubleStoreArgs_Scope_DEFAULT *Uint64 48923 func (p *ApplyDbIdxLongDoubleStoreArgs) GetScope() *Uint64 { 48924 if !p.IsSetScope() { 48925 return ApplyDbIdxLongDoubleStoreArgs_Scope_DEFAULT 48926 } 48927 return p.Scope 48928 } 48929 var ApplyDbIdxLongDoubleStoreArgs_Table_DEFAULT *Uint64 48930 func (p *ApplyDbIdxLongDoubleStoreArgs) GetTable() *Uint64 { 48931 if !p.IsSetTable() { 48932 return ApplyDbIdxLongDoubleStoreArgs_Table_DEFAULT 48933 } 48934 return p.Table 48935 } 48936 var ApplyDbIdxLongDoubleStoreArgs_Payer_DEFAULT *Uint64 48937 func (p *ApplyDbIdxLongDoubleStoreArgs) GetPayer() *Uint64 { 48938 if !p.IsSetPayer() { 48939 return ApplyDbIdxLongDoubleStoreArgs_Payer_DEFAULT 48940 } 48941 return p.Payer 48942 } 48943 var ApplyDbIdxLongDoubleStoreArgs_ID_DEFAULT *Uint64 48944 func (p *ApplyDbIdxLongDoubleStoreArgs) GetID() *Uint64 { 48945 if !p.IsSetID() { 48946 return ApplyDbIdxLongDoubleStoreArgs_ID_DEFAULT 48947 } 48948 return p.ID 48949 } 48950 48951 func (p *ApplyDbIdxLongDoubleStoreArgs) GetSecondary() []byte { 48952 return p.Secondary 48953 } 48954 func (p *ApplyDbIdxLongDoubleStoreArgs) IsSetScope() bool { 48955 return p.Scope != nil 48956 } 48957 48958 func (p *ApplyDbIdxLongDoubleStoreArgs) IsSetTable() bool { 48959 return p.Table != nil 48960 } 48961 48962 func (p *ApplyDbIdxLongDoubleStoreArgs) IsSetPayer() bool { 48963 return p.Payer != nil 48964 } 48965 48966 func (p *ApplyDbIdxLongDoubleStoreArgs) IsSetID() bool { 48967 return p.ID != nil 48968 } 48969 48970 func (p *ApplyDbIdxLongDoubleStoreArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 48971 if _, err := iprot.ReadStructBegin(ctx); err != nil { 48972 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 48973 } 48974 48975 48976 for { 48977 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 48978 if err != nil { 48979 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 48980 } 48981 if fieldTypeId == thrift.STOP { break; } 48982 switch fieldId { 48983 case 1: 48984 if fieldTypeId == thrift.STRUCT { 48985 if err := p.ReadField1(ctx, iprot); err != nil { 48986 return err 48987 } 48988 } else { 48989 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 48990 return err 48991 } 48992 } 48993 case 2: 48994 if fieldTypeId == thrift.STRUCT { 48995 if err := p.ReadField2(ctx, iprot); err != nil { 48996 return err 48997 } 48998 } else { 48999 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49000 return err 49001 } 49002 } 49003 case 3: 49004 if fieldTypeId == thrift.STRUCT { 49005 if err := p.ReadField3(ctx, iprot); err != nil { 49006 return err 49007 } 49008 } else { 49009 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49010 return err 49011 } 49012 } 49013 case 4: 49014 if fieldTypeId == thrift.STRUCT { 49015 if err := p.ReadField4(ctx, iprot); err != nil { 49016 return err 49017 } 49018 } else { 49019 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49020 return err 49021 } 49022 } 49023 case 5: 49024 if fieldTypeId == thrift.STRING { 49025 if err := p.ReadField5(ctx, iprot); err != nil { 49026 return err 49027 } 49028 } else { 49029 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49030 return err 49031 } 49032 } 49033 default: 49034 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49035 return err 49036 } 49037 } 49038 if err := iprot.ReadFieldEnd(ctx); err != nil { 49039 return err 49040 } 49041 } 49042 if err := iprot.ReadStructEnd(ctx); err != nil { 49043 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 49044 } 49045 return nil 49046 } 49047 49048 func (p *ApplyDbIdxLongDoubleStoreArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 49049 p.Scope = &Uint64{} 49050 if err := p.Scope.Read(ctx, iprot); err != nil { 49051 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 49052 } 49053 return nil 49054 } 49055 49056 func (p *ApplyDbIdxLongDoubleStoreArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 49057 p.Table = &Uint64{} 49058 if err := p.Table.Read(ctx, iprot); err != nil { 49059 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 49060 } 49061 return nil 49062 } 49063 49064 func (p *ApplyDbIdxLongDoubleStoreArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 49065 p.Payer = &Uint64{} 49066 if err := p.Payer.Read(ctx, iprot); err != nil { 49067 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 49068 } 49069 return nil 49070 } 49071 49072 func (p *ApplyDbIdxLongDoubleStoreArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 49073 p.ID = &Uint64{} 49074 if err := p.ID.Read(ctx, iprot); err != nil { 49075 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ID), err) 49076 } 49077 return nil 49078 } 49079 49080 func (p *ApplyDbIdxLongDoubleStoreArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 49081 if v, err := iprot.ReadBinary(ctx); err != nil { 49082 return thrift.PrependError("error reading field 5: ", err) 49083 } else { 49084 p.Secondary = v 49085 } 49086 return nil 49087 } 49088 49089 func (p *ApplyDbIdxLongDoubleStoreArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 49090 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_store_args"); err != nil { 49091 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 49092 if p != nil { 49093 if err := p.writeField1(ctx, oprot); err != nil { return err } 49094 if err := p.writeField2(ctx, oprot); err != nil { return err } 49095 if err := p.writeField3(ctx, oprot); err != nil { return err } 49096 if err := p.writeField4(ctx, oprot); err != nil { return err } 49097 if err := p.writeField5(ctx, oprot); err != nil { return err } 49098 } 49099 if err := oprot.WriteFieldStop(ctx); err != nil { 49100 return thrift.PrependError("write field stop error: ", err) } 49101 if err := oprot.WriteStructEnd(ctx); err != nil { 49102 return thrift.PrependError("write struct stop error: ", err) } 49103 return nil 49104 } 49105 49106 func (p *ApplyDbIdxLongDoubleStoreArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 49107 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 1); err != nil { 49108 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:scope: ", p), err) } 49109 if err := p.Scope.Write(ctx, oprot); err != nil { 49110 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 49111 } 49112 if err := oprot.WriteFieldEnd(ctx); err != nil { 49113 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:scope: ", p), err) } 49114 return err 49115 } 49116 49117 func (p *ApplyDbIdxLongDoubleStoreArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 49118 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 2); err != nil { 49119 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:table: ", p), err) } 49120 if err := p.Table.Write(ctx, oprot); err != nil { 49121 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 49122 } 49123 if err := oprot.WriteFieldEnd(ctx); err != nil { 49124 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:table: ", p), err) } 49125 return err 49126 } 49127 49128 func (p *ApplyDbIdxLongDoubleStoreArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 49129 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 3); err != nil { 49130 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:payer: ", p), err) } 49131 if err := p.Payer.Write(ctx, oprot); err != nil { 49132 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 49133 } 49134 if err := oprot.WriteFieldEnd(ctx); err != nil { 49135 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:payer: ", p), err) } 49136 return err 49137 } 49138 49139 func (p *ApplyDbIdxLongDoubleStoreArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 49140 if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRUCT, 4); err != nil { 49141 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err) } 49142 if err := p.ID.Write(ctx, oprot); err != nil { 49143 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ID), err) 49144 } 49145 if err := oprot.WriteFieldEnd(ctx); err != nil { 49146 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err) } 49147 return err 49148 } 49149 49150 func (p *ApplyDbIdxLongDoubleStoreArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 49151 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 5); err != nil { 49152 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:secondary: ", p), err) } 49153 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 49154 return thrift.PrependError(fmt.Sprintf("%T.secondary (5) field write error: ", p), err) } 49155 if err := oprot.WriteFieldEnd(ctx); err != nil { 49156 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:secondary: ", p), err) } 49157 return err 49158 } 49159 49160 func (p *ApplyDbIdxLongDoubleStoreArgs) String() string { 49161 if p == nil { 49162 return "<nil>" 49163 } 49164 return fmt.Sprintf("ApplyDbIdxLongDoubleStoreArgs(%+v)", *p) 49165 } 49166 49167 // Attributes: 49168 // - Success 49169 type ApplyDbIdxLongDoubleStoreResult struct { 49170 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 49171 } 49172 49173 func NewApplyDbIdxLongDoubleStoreResult() *ApplyDbIdxLongDoubleStoreResult { 49174 return &ApplyDbIdxLongDoubleStoreResult{} 49175 } 49176 49177 var ApplyDbIdxLongDoubleStoreResult_Success_DEFAULT int32 49178 func (p *ApplyDbIdxLongDoubleStoreResult) GetSuccess() int32 { 49179 if !p.IsSetSuccess() { 49180 return ApplyDbIdxLongDoubleStoreResult_Success_DEFAULT 49181 } 49182 return *p.Success 49183 } 49184 func (p *ApplyDbIdxLongDoubleStoreResult) IsSetSuccess() bool { 49185 return p.Success != nil 49186 } 49187 49188 func (p *ApplyDbIdxLongDoubleStoreResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 49189 if _, err := iprot.ReadStructBegin(ctx); err != nil { 49190 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 49191 } 49192 49193 49194 for { 49195 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 49196 if err != nil { 49197 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 49198 } 49199 if fieldTypeId == thrift.STOP { break; } 49200 switch fieldId { 49201 case 0: 49202 if fieldTypeId == thrift.I32 { 49203 if err := p.ReadField0(ctx, iprot); err != nil { 49204 return err 49205 } 49206 } else { 49207 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49208 return err 49209 } 49210 } 49211 default: 49212 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49213 return err 49214 } 49215 } 49216 if err := iprot.ReadFieldEnd(ctx); err != nil { 49217 return err 49218 } 49219 } 49220 if err := iprot.ReadStructEnd(ctx); err != nil { 49221 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 49222 } 49223 return nil 49224 } 49225 49226 func (p *ApplyDbIdxLongDoubleStoreResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 49227 if v, err := iprot.ReadI32(ctx); err != nil { 49228 return thrift.PrependError("error reading field 0: ", err) 49229 } else { 49230 p.Success = &v 49231 } 49232 return nil 49233 } 49234 49235 func (p *ApplyDbIdxLongDoubleStoreResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 49236 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_store_result"); err != nil { 49237 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 49238 if p != nil { 49239 if err := p.writeField0(ctx, oprot); err != nil { return err } 49240 } 49241 if err := oprot.WriteFieldStop(ctx); err != nil { 49242 return thrift.PrependError("write field stop error: ", err) } 49243 if err := oprot.WriteStructEnd(ctx); err != nil { 49244 return thrift.PrependError("write struct stop error: ", err) } 49245 return nil 49246 } 49247 49248 func (p *ApplyDbIdxLongDoubleStoreResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 49249 if p.IsSetSuccess() { 49250 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 49251 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 49252 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 49253 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 49254 if err := oprot.WriteFieldEnd(ctx); err != nil { 49255 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 49256 } 49257 return err 49258 } 49259 49260 func (p *ApplyDbIdxLongDoubleStoreResult) String() string { 49261 if p == nil { 49262 return "<nil>" 49263 } 49264 return fmt.Sprintf("ApplyDbIdxLongDoubleStoreResult(%+v)", *p) 49265 } 49266 49267 // Attributes: 49268 // - Iterator 49269 // - Payer 49270 // - Secondary 49271 type ApplyDbIdxLongDoubleUpdateArgs struct { 49272 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 49273 Payer *Uint64 `thrift:"payer,2" db:"payer" json:"payer"` 49274 Secondary []byte `thrift:"secondary,3" db:"secondary" json:"secondary"` 49275 } 49276 49277 func NewApplyDbIdxLongDoubleUpdateArgs() *ApplyDbIdxLongDoubleUpdateArgs { 49278 return &ApplyDbIdxLongDoubleUpdateArgs{} 49279 } 49280 49281 49282 func (p *ApplyDbIdxLongDoubleUpdateArgs) GetIterator() int32 { 49283 return p.Iterator 49284 } 49285 var ApplyDbIdxLongDoubleUpdateArgs_Payer_DEFAULT *Uint64 49286 func (p *ApplyDbIdxLongDoubleUpdateArgs) GetPayer() *Uint64 { 49287 if !p.IsSetPayer() { 49288 return ApplyDbIdxLongDoubleUpdateArgs_Payer_DEFAULT 49289 } 49290 return p.Payer 49291 } 49292 49293 func (p *ApplyDbIdxLongDoubleUpdateArgs) GetSecondary() []byte { 49294 return p.Secondary 49295 } 49296 func (p *ApplyDbIdxLongDoubleUpdateArgs) IsSetPayer() bool { 49297 return p.Payer != nil 49298 } 49299 49300 func (p *ApplyDbIdxLongDoubleUpdateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 49301 if _, err := iprot.ReadStructBegin(ctx); err != nil { 49302 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 49303 } 49304 49305 49306 for { 49307 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 49308 if err != nil { 49309 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 49310 } 49311 if fieldTypeId == thrift.STOP { break; } 49312 switch fieldId { 49313 case 1: 49314 if fieldTypeId == thrift.I32 { 49315 if err := p.ReadField1(ctx, iprot); err != nil { 49316 return err 49317 } 49318 } else { 49319 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49320 return err 49321 } 49322 } 49323 case 2: 49324 if fieldTypeId == thrift.STRUCT { 49325 if err := p.ReadField2(ctx, iprot); err != nil { 49326 return err 49327 } 49328 } else { 49329 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49330 return err 49331 } 49332 } 49333 case 3: 49334 if fieldTypeId == thrift.STRING { 49335 if err := p.ReadField3(ctx, iprot); err != nil { 49336 return err 49337 } 49338 } else { 49339 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49340 return err 49341 } 49342 } 49343 default: 49344 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49345 return err 49346 } 49347 } 49348 if err := iprot.ReadFieldEnd(ctx); err != nil { 49349 return err 49350 } 49351 } 49352 if err := iprot.ReadStructEnd(ctx); err != nil { 49353 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 49354 } 49355 return nil 49356 } 49357 49358 func (p *ApplyDbIdxLongDoubleUpdateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 49359 if v, err := iprot.ReadI32(ctx); err != nil { 49360 return thrift.PrependError("error reading field 1: ", err) 49361 } else { 49362 p.Iterator = v 49363 } 49364 return nil 49365 } 49366 49367 func (p *ApplyDbIdxLongDoubleUpdateArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 49368 p.Payer = &Uint64{} 49369 if err := p.Payer.Read(ctx, iprot); err != nil { 49370 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Payer), err) 49371 } 49372 return nil 49373 } 49374 49375 func (p *ApplyDbIdxLongDoubleUpdateArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 49376 if v, err := iprot.ReadBinary(ctx); err != nil { 49377 return thrift.PrependError("error reading field 3: ", err) 49378 } else { 49379 p.Secondary = v 49380 } 49381 return nil 49382 } 49383 49384 func (p *ApplyDbIdxLongDoubleUpdateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 49385 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_update_args"); err != nil { 49386 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 49387 if p != nil { 49388 if err := p.writeField1(ctx, oprot); err != nil { return err } 49389 if err := p.writeField2(ctx, oprot); err != nil { return err } 49390 if err := p.writeField3(ctx, oprot); err != nil { return err } 49391 } 49392 if err := oprot.WriteFieldStop(ctx); err != nil { 49393 return thrift.PrependError("write field stop error: ", err) } 49394 if err := oprot.WriteStructEnd(ctx); err != nil { 49395 return thrift.PrependError("write struct stop error: ", err) } 49396 return nil 49397 } 49398 49399 func (p *ApplyDbIdxLongDoubleUpdateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 49400 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 49401 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 49402 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 49403 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 49404 if err := oprot.WriteFieldEnd(ctx); err != nil { 49405 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 49406 return err 49407 } 49408 49409 func (p *ApplyDbIdxLongDoubleUpdateArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 49410 if err := oprot.WriteFieldBegin(ctx, "payer", thrift.STRUCT, 2); err != nil { 49411 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:payer: ", p), err) } 49412 if err := p.Payer.Write(ctx, oprot); err != nil { 49413 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Payer), err) 49414 } 49415 if err := oprot.WriteFieldEnd(ctx); err != nil { 49416 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:payer: ", p), err) } 49417 return err 49418 } 49419 49420 func (p *ApplyDbIdxLongDoubleUpdateArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 49421 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 3); err != nil { 49422 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:secondary: ", p), err) } 49423 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 49424 return thrift.PrependError(fmt.Sprintf("%T.secondary (3) field write error: ", p), err) } 49425 if err := oprot.WriteFieldEnd(ctx); err != nil { 49426 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:secondary: ", p), err) } 49427 return err 49428 } 49429 49430 func (p *ApplyDbIdxLongDoubleUpdateArgs) String() string { 49431 if p == nil { 49432 return "<nil>" 49433 } 49434 return fmt.Sprintf("ApplyDbIdxLongDoubleUpdateArgs(%+v)", *p) 49435 } 49436 49437 type ApplyDbIdxLongDoubleUpdateResult struct { 49438 } 49439 49440 func NewApplyDbIdxLongDoubleUpdateResult() *ApplyDbIdxLongDoubleUpdateResult { 49441 return &ApplyDbIdxLongDoubleUpdateResult{} 49442 } 49443 49444 func (p *ApplyDbIdxLongDoubleUpdateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 49445 if _, err := iprot.ReadStructBegin(ctx); err != nil { 49446 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 49447 } 49448 49449 49450 for { 49451 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 49452 if err != nil { 49453 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 49454 } 49455 if fieldTypeId == thrift.STOP { break; } 49456 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49457 return err 49458 } 49459 if err := iprot.ReadFieldEnd(ctx); err != nil { 49460 return err 49461 } 49462 } 49463 if err := iprot.ReadStructEnd(ctx); err != nil { 49464 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 49465 } 49466 return nil 49467 } 49468 49469 func (p *ApplyDbIdxLongDoubleUpdateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 49470 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_update_result"); err != nil { 49471 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 49472 if p != nil { 49473 } 49474 if err := oprot.WriteFieldStop(ctx); err != nil { 49475 return thrift.PrependError("write field stop error: ", err) } 49476 if err := oprot.WriteStructEnd(ctx); err != nil { 49477 return thrift.PrependError("write struct stop error: ", err) } 49478 return nil 49479 } 49480 49481 func (p *ApplyDbIdxLongDoubleUpdateResult) String() string { 49482 if p == nil { 49483 return "<nil>" 49484 } 49485 return fmt.Sprintf("ApplyDbIdxLongDoubleUpdateResult(%+v)", *p) 49486 } 49487 49488 // Attributes: 49489 // - Iterator 49490 type ApplyDbIdxLongDoubleRemoveArgs struct { 49491 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 49492 } 49493 49494 func NewApplyDbIdxLongDoubleRemoveArgs() *ApplyDbIdxLongDoubleRemoveArgs { 49495 return &ApplyDbIdxLongDoubleRemoveArgs{} 49496 } 49497 49498 49499 func (p *ApplyDbIdxLongDoubleRemoveArgs) GetIterator() int32 { 49500 return p.Iterator 49501 } 49502 func (p *ApplyDbIdxLongDoubleRemoveArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 49503 if _, err := iprot.ReadStructBegin(ctx); err != nil { 49504 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 49505 } 49506 49507 49508 for { 49509 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 49510 if err != nil { 49511 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 49512 } 49513 if fieldTypeId == thrift.STOP { break; } 49514 switch fieldId { 49515 case 1: 49516 if fieldTypeId == thrift.I32 { 49517 if err := p.ReadField1(ctx, iprot); err != nil { 49518 return err 49519 } 49520 } else { 49521 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49522 return err 49523 } 49524 } 49525 default: 49526 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49527 return err 49528 } 49529 } 49530 if err := iprot.ReadFieldEnd(ctx); err != nil { 49531 return err 49532 } 49533 } 49534 if err := iprot.ReadStructEnd(ctx); err != nil { 49535 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 49536 } 49537 return nil 49538 } 49539 49540 func (p *ApplyDbIdxLongDoubleRemoveArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 49541 if v, err := iprot.ReadI32(ctx); err != nil { 49542 return thrift.PrependError("error reading field 1: ", err) 49543 } else { 49544 p.Iterator = v 49545 } 49546 return nil 49547 } 49548 49549 func (p *ApplyDbIdxLongDoubleRemoveArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 49550 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_remove_args"); err != nil { 49551 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 49552 if p != nil { 49553 if err := p.writeField1(ctx, oprot); err != nil { return err } 49554 } 49555 if err := oprot.WriteFieldStop(ctx); err != nil { 49556 return thrift.PrependError("write field stop error: ", err) } 49557 if err := oprot.WriteStructEnd(ctx); err != nil { 49558 return thrift.PrependError("write struct stop error: ", err) } 49559 return nil 49560 } 49561 49562 func (p *ApplyDbIdxLongDoubleRemoveArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 49563 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 49564 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 49565 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 49566 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 49567 if err := oprot.WriteFieldEnd(ctx); err != nil { 49568 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 49569 return err 49570 } 49571 49572 func (p *ApplyDbIdxLongDoubleRemoveArgs) String() string { 49573 if p == nil { 49574 return "<nil>" 49575 } 49576 return fmt.Sprintf("ApplyDbIdxLongDoubleRemoveArgs(%+v)", *p) 49577 } 49578 49579 type ApplyDbIdxLongDoubleRemoveResult struct { 49580 } 49581 49582 func NewApplyDbIdxLongDoubleRemoveResult() *ApplyDbIdxLongDoubleRemoveResult { 49583 return &ApplyDbIdxLongDoubleRemoveResult{} 49584 } 49585 49586 func (p *ApplyDbIdxLongDoubleRemoveResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 49587 if _, err := iprot.ReadStructBegin(ctx); err != nil { 49588 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 49589 } 49590 49591 49592 for { 49593 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 49594 if err != nil { 49595 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 49596 } 49597 if fieldTypeId == thrift.STOP { break; } 49598 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49599 return err 49600 } 49601 if err := iprot.ReadFieldEnd(ctx); err != nil { 49602 return err 49603 } 49604 } 49605 if err := iprot.ReadStructEnd(ctx); err != nil { 49606 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 49607 } 49608 return nil 49609 } 49610 49611 func (p *ApplyDbIdxLongDoubleRemoveResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 49612 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_remove_result"); err != nil { 49613 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 49614 if p != nil { 49615 } 49616 if err := oprot.WriteFieldStop(ctx); err != nil { 49617 return thrift.PrependError("write field stop error: ", err) } 49618 if err := oprot.WriteStructEnd(ctx); err != nil { 49619 return thrift.PrependError("write struct stop error: ", err) } 49620 return nil 49621 } 49622 49623 func (p *ApplyDbIdxLongDoubleRemoveResult) String() string { 49624 if p == nil { 49625 return "<nil>" 49626 } 49627 return fmt.Sprintf("ApplyDbIdxLongDoubleRemoveResult(%+v)", *p) 49628 } 49629 49630 // Attributes: 49631 // - Iterator 49632 type ApplyDbIdxLongDoubleNextArgs struct { 49633 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 49634 } 49635 49636 func NewApplyDbIdxLongDoubleNextArgs() *ApplyDbIdxLongDoubleNextArgs { 49637 return &ApplyDbIdxLongDoubleNextArgs{} 49638 } 49639 49640 49641 func (p *ApplyDbIdxLongDoubleNextArgs) GetIterator() int32 { 49642 return p.Iterator 49643 } 49644 func (p *ApplyDbIdxLongDoubleNextArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 49645 if _, err := iprot.ReadStructBegin(ctx); err != nil { 49646 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 49647 } 49648 49649 49650 for { 49651 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 49652 if err != nil { 49653 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 49654 } 49655 if fieldTypeId == thrift.STOP { break; } 49656 switch fieldId { 49657 case 1: 49658 if fieldTypeId == thrift.I32 { 49659 if err := p.ReadField1(ctx, iprot); err != nil { 49660 return err 49661 } 49662 } else { 49663 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49664 return err 49665 } 49666 } 49667 default: 49668 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49669 return err 49670 } 49671 } 49672 if err := iprot.ReadFieldEnd(ctx); err != nil { 49673 return err 49674 } 49675 } 49676 if err := iprot.ReadStructEnd(ctx); err != nil { 49677 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 49678 } 49679 return nil 49680 } 49681 49682 func (p *ApplyDbIdxLongDoubleNextArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 49683 if v, err := iprot.ReadI32(ctx); err != nil { 49684 return thrift.PrependError("error reading field 1: ", err) 49685 } else { 49686 p.Iterator = v 49687 } 49688 return nil 49689 } 49690 49691 func (p *ApplyDbIdxLongDoubleNextArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 49692 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_next_args"); err != nil { 49693 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 49694 if p != nil { 49695 if err := p.writeField1(ctx, oprot); err != nil { return err } 49696 } 49697 if err := oprot.WriteFieldStop(ctx); err != nil { 49698 return thrift.PrependError("write field stop error: ", err) } 49699 if err := oprot.WriteStructEnd(ctx); err != nil { 49700 return thrift.PrependError("write struct stop error: ", err) } 49701 return nil 49702 } 49703 49704 func (p *ApplyDbIdxLongDoubleNextArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 49705 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 49706 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 49707 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 49708 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 49709 if err := oprot.WriteFieldEnd(ctx); err != nil { 49710 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 49711 return err 49712 } 49713 49714 func (p *ApplyDbIdxLongDoubleNextArgs) String() string { 49715 if p == nil { 49716 return "<nil>" 49717 } 49718 return fmt.Sprintf("ApplyDbIdxLongDoubleNextArgs(%+v)", *p) 49719 } 49720 49721 // Attributes: 49722 // - Success 49723 type ApplyDbIdxLongDoubleNextResult struct { 49724 Success *NextPreviousReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 49725 } 49726 49727 func NewApplyDbIdxLongDoubleNextResult() *ApplyDbIdxLongDoubleNextResult { 49728 return &ApplyDbIdxLongDoubleNextResult{} 49729 } 49730 49731 var ApplyDbIdxLongDoubleNextResult_Success_DEFAULT *NextPreviousReturn 49732 func (p *ApplyDbIdxLongDoubleNextResult) GetSuccess() *NextPreviousReturn { 49733 if !p.IsSetSuccess() { 49734 return ApplyDbIdxLongDoubleNextResult_Success_DEFAULT 49735 } 49736 return p.Success 49737 } 49738 func (p *ApplyDbIdxLongDoubleNextResult) IsSetSuccess() bool { 49739 return p.Success != nil 49740 } 49741 49742 func (p *ApplyDbIdxLongDoubleNextResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 49743 if _, err := iprot.ReadStructBegin(ctx); err != nil { 49744 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 49745 } 49746 49747 49748 for { 49749 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 49750 if err != nil { 49751 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 49752 } 49753 if fieldTypeId == thrift.STOP { break; } 49754 switch fieldId { 49755 case 0: 49756 if fieldTypeId == thrift.STRUCT { 49757 if err := p.ReadField0(ctx, iprot); err != nil { 49758 return err 49759 } 49760 } else { 49761 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49762 return err 49763 } 49764 } 49765 default: 49766 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49767 return err 49768 } 49769 } 49770 if err := iprot.ReadFieldEnd(ctx); err != nil { 49771 return err 49772 } 49773 } 49774 if err := iprot.ReadStructEnd(ctx); err != nil { 49775 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 49776 } 49777 return nil 49778 } 49779 49780 func (p *ApplyDbIdxLongDoubleNextResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 49781 p.Success = &NextPreviousReturn{} 49782 if err := p.Success.Read(ctx, iprot); err != nil { 49783 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 49784 } 49785 return nil 49786 } 49787 49788 func (p *ApplyDbIdxLongDoubleNextResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 49789 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_next_result"); err != nil { 49790 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 49791 if p != nil { 49792 if err := p.writeField0(ctx, oprot); err != nil { return err } 49793 } 49794 if err := oprot.WriteFieldStop(ctx); err != nil { 49795 return thrift.PrependError("write field stop error: ", err) } 49796 if err := oprot.WriteStructEnd(ctx); err != nil { 49797 return thrift.PrependError("write struct stop error: ", err) } 49798 return nil 49799 } 49800 49801 func (p *ApplyDbIdxLongDoubleNextResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 49802 if p.IsSetSuccess() { 49803 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 49804 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 49805 if err := p.Success.Write(ctx, oprot); err != nil { 49806 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 49807 } 49808 if err := oprot.WriteFieldEnd(ctx); err != nil { 49809 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 49810 } 49811 return err 49812 } 49813 49814 func (p *ApplyDbIdxLongDoubleNextResult) String() string { 49815 if p == nil { 49816 return "<nil>" 49817 } 49818 return fmt.Sprintf("ApplyDbIdxLongDoubleNextResult(%+v)", *p) 49819 } 49820 49821 // Attributes: 49822 // - Iterator 49823 type ApplyDbIdxLongDoublePreviousArgs struct { 49824 Iterator int32 `thrift:"iterator,1" db:"iterator" json:"iterator"` 49825 } 49826 49827 func NewApplyDbIdxLongDoublePreviousArgs() *ApplyDbIdxLongDoublePreviousArgs { 49828 return &ApplyDbIdxLongDoublePreviousArgs{} 49829 } 49830 49831 49832 func (p *ApplyDbIdxLongDoublePreviousArgs) GetIterator() int32 { 49833 return p.Iterator 49834 } 49835 func (p *ApplyDbIdxLongDoublePreviousArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 49836 if _, err := iprot.ReadStructBegin(ctx); err != nil { 49837 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 49838 } 49839 49840 49841 for { 49842 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 49843 if err != nil { 49844 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 49845 } 49846 if fieldTypeId == thrift.STOP { break; } 49847 switch fieldId { 49848 case 1: 49849 if fieldTypeId == thrift.I32 { 49850 if err := p.ReadField1(ctx, iprot); err != nil { 49851 return err 49852 } 49853 } else { 49854 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49855 return err 49856 } 49857 } 49858 default: 49859 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49860 return err 49861 } 49862 } 49863 if err := iprot.ReadFieldEnd(ctx); err != nil { 49864 return err 49865 } 49866 } 49867 if err := iprot.ReadStructEnd(ctx); err != nil { 49868 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 49869 } 49870 return nil 49871 } 49872 49873 func (p *ApplyDbIdxLongDoublePreviousArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 49874 if v, err := iprot.ReadI32(ctx); err != nil { 49875 return thrift.PrependError("error reading field 1: ", err) 49876 } else { 49877 p.Iterator = v 49878 } 49879 return nil 49880 } 49881 49882 func (p *ApplyDbIdxLongDoublePreviousArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 49883 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_previous_args"); err != nil { 49884 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 49885 if p != nil { 49886 if err := p.writeField1(ctx, oprot); err != nil { return err } 49887 } 49888 if err := oprot.WriteFieldStop(ctx); err != nil { 49889 return thrift.PrependError("write field stop error: ", err) } 49890 if err := oprot.WriteStructEnd(ctx); err != nil { 49891 return thrift.PrependError("write struct stop error: ", err) } 49892 return nil 49893 } 49894 49895 func (p *ApplyDbIdxLongDoublePreviousArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 49896 if err := oprot.WriteFieldBegin(ctx, "iterator", thrift.I32, 1); err != nil { 49897 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:iterator: ", p), err) } 49898 if err := oprot.WriteI32(ctx, int32(p.Iterator)); err != nil { 49899 return thrift.PrependError(fmt.Sprintf("%T.iterator (1) field write error: ", p), err) } 49900 if err := oprot.WriteFieldEnd(ctx); err != nil { 49901 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:iterator: ", p), err) } 49902 return err 49903 } 49904 49905 func (p *ApplyDbIdxLongDoublePreviousArgs) String() string { 49906 if p == nil { 49907 return "<nil>" 49908 } 49909 return fmt.Sprintf("ApplyDbIdxLongDoublePreviousArgs(%+v)", *p) 49910 } 49911 49912 // Attributes: 49913 // - Success 49914 type ApplyDbIdxLongDoublePreviousResult struct { 49915 Success *NextPreviousReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 49916 } 49917 49918 func NewApplyDbIdxLongDoublePreviousResult() *ApplyDbIdxLongDoublePreviousResult { 49919 return &ApplyDbIdxLongDoublePreviousResult{} 49920 } 49921 49922 var ApplyDbIdxLongDoublePreviousResult_Success_DEFAULT *NextPreviousReturn 49923 func (p *ApplyDbIdxLongDoublePreviousResult) GetSuccess() *NextPreviousReturn { 49924 if !p.IsSetSuccess() { 49925 return ApplyDbIdxLongDoublePreviousResult_Success_DEFAULT 49926 } 49927 return p.Success 49928 } 49929 func (p *ApplyDbIdxLongDoublePreviousResult) IsSetSuccess() bool { 49930 return p.Success != nil 49931 } 49932 49933 func (p *ApplyDbIdxLongDoublePreviousResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 49934 if _, err := iprot.ReadStructBegin(ctx); err != nil { 49935 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 49936 } 49937 49938 49939 for { 49940 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 49941 if err != nil { 49942 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 49943 } 49944 if fieldTypeId == thrift.STOP { break; } 49945 switch fieldId { 49946 case 0: 49947 if fieldTypeId == thrift.STRUCT { 49948 if err := p.ReadField0(ctx, iprot); err != nil { 49949 return err 49950 } 49951 } else { 49952 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49953 return err 49954 } 49955 } 49956 default: 49957 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 49958 return err 49959 } 49960 } 49961 if err := iprot.ReadFieldEnd(ctx); err != nil { 49962 return err 49963 } 49964 } 49965 if err := iprot.ReadStructEnd(ctx); err != nil { 49966 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 49967 } 49968 return nil 49969 } 49970 49971 func (p *ApplyDbIdxLongDoublePreviousResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 49972 p.Success = &NextPreviousReturn{} 49973 if err := p.Success.Read(ctx, iprot); err != nil { 49974 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 49975 } 49976 return nil 49977 } 49978 49979 func (p *ApplyDbIdxLongDoublePreviousResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 49980 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_previous_result"); err != nil { 49981 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 49982 if p != nil { 49983 if err := p.writeField0(ctx, oprot); err != nil { return err } 49984 } 49985 if err := oprot.WriteFieldStop(ctx); err != nil { 49986 return thrift.PrependError("write field stop error: ", err) } 49987 if err := oprot.WriteStructEnd(ctx); err != nil { 49988 return thrift.PrependError("write struct stop error: ", err) } 49989 return nil 49990 } 49991 49992 func (p *ApplyDbIdxLongDoublePreviousResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 49993 if p.IsSetSuccess() { 49994 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 49995 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 49996 if err := p.Success.Write(ctx, oprot); err != nil { 49997 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 49998 } 49999 if err := oprot.WriteFieldEnd(ctx); err != nil { 50000 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 50001 } 50002 return err 50003 } 50004 50005 func (p *ApplyDbIdxLongDoublePreviousResult) String() string { 50006 if p == nil { 50007 return "<nil>" 50008 } 50009 return fmt.Sprintf("ApplyDbIdxLongDoublePreviousResult(%+v)", *p) 50010 } 50011 50012 // Attributes: 50013 // - Code 50014 // - Scope 50015 // - Table 50016 // - Primary 50017 type ApplyDbIdxLongDoubleFindPrimaryArgs struct { 50018 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 50019 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 50020 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 50021 Primary *Uint64 `thrift:"primary,4" db:"primary" json:"primary"` 50022 } 50023 50024 func NewApplyDbIdxLongDoubleFindPrimaryArgs() *ApplyDbIdxLongDoubleFindPrimaryArgs { 50025 return &ApplyDbIdxLongDoubleFindPrimaryArgs{} 50026 } 50027 50028 var ApplyDbIdxLongDoubleFindPrimaryArgs_Code_DEFAULT *Uint64 50029 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) GetCode() *Uint64 { 50030 if !p.IsSetCode() { 50031 return ApplyDbIdxLongDoubleFindPrimaryArgs_Code_DEFAULT 50032 } 50033 return p.Code 50034 } 50035 var ApplyDbIdxLongDoubleFindPrimaryArgs_Scope_DEFAULT *Uint64 50036 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) GetScope() *Uint64 { 50037 if !p.IsSetScope() { 50038 return ApplyDbIdxLongDoubleFindPrimaryArgs_Scope_DEFAULT 50039 } 50040 return p.Scope 50041 } 50042 var ApplyDbIdxLongDoubleFindPrimaryArgs_Table_DEFAULT *Uint64 50043 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) GetTable() *Uint64 { 50044 if !p.IsSetTable() { 50045 return ApplyDbIdxLongDoubleFindPrimaryArgs_Table_DEFAULT 50046 } 50047 return p.Table 50048 } 50049 var ApplyDbIdxLongDoubleFindPrimaryArgs_Primary_DEFAULT *Uint64 50050 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) GetPrimary() *Uint64 { 50051 if !p.IsSetPrimary() { 50052 return ApplyDbIdxLongDoubleFindPrimaryArgs_Primary_DEFAULT 50053 } 50054 return p.Primary 50055 } 50056 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) IsSetCode() bool { 50057 return p.Code != nil 50058 } 50059 50060 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) IsSetScope() bool { 50061 return p.Scope != nil 50062 } 50063 50064 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) IsSetTable() bool { 50065 return p.Table != nil 50066 } 50067 50068 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) IsSetPrimary() bool { 50069 return p.Primary != nil 50070 } 50071 50072 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 50073 if _, err := iprot.ReadStructBegin(ctx); err != nil { 50074 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 50075 } 50076 50077 50078 for { 50079 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 50080 if err != nil { 50081 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 50082 } 50083 if fieldTypeId == thrift.STOP { break; } 50084 switch fieldId { 50085 case 1: 50086 if fieldTypeId == thrift.STRUCT { 50087 if err := p.ReadField1(ctx, iprot); err != nil { 50088 return err 50089 } 50090 } else { 50091 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50092 return err 50093 } 50094 } 50095 case 2: 50096 if fieldTypeId == thrift.STRUCT { 50097 if err := p.ReadField2(ctx, iprot); err != nil { 50098 return err 50099 } 50100 } else { 50101 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50102 return err 50103 } 50104 } 50105 case 3: 50106 if fieldTypeId == thrift.STRUCT { 50107 if err := p.ReadField3(ctx, iprot); err != nil { 50108 return err 50109 } 50110 } else { 50111 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50112 return err 50113 } 50114 } 50115 case 4: 50116 if fieldTypeId == thrift.STRUCT { 50117 if err := p.ReadField4(ctx, iprot); err != nil { 50118 return err 50119 } 50120 } else { 50121 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50122 return err 50123 } 50124 } 50125 default: 50126 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50127 return err 50128 } 50129 } 50130 if err := iprot.ReadFieldEnd(ctx); err != nil { 50131 return err 50132 } 50133 } 50134 if err := iprot.ReadStructEnd(ctx); err != nil { 50135 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 50136 } 50137 return nil 50138 } 50139 50140 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 50141 p.Code = &Uint64{} 50142 if err := p.Code.Read(ctx, iprot); err != nil { 50143 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 50144 } 50145 return nil 50146 } 50147 50148 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 50149 p.Scope = &Uint64{} 50150 if err := p.Scope.Read(ctx, iprot); err != nil { 50151 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 50152 } 50153 return nil 50154 } 50155 50156 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 50157 p.Table = &Uint64{} 50158 if err := p.Table.Read(ctx, iprot); err != nil { 50159 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 50160 } 50161 return nil 50162 } 50163 50164 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 50165 p.Primary = &Uint64{} 50166 if err := p.Primary.Read(ctx, iprot); err != nil { 50167 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 50168 } 50169 return nil 50170 } 50171 50172 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 50173 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_find_primary_args"); err != nil { 50174 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 50175 if p != nil { 50176 if err := p.writeField1(ctx, oprot); err != nil { return err } 50177 if err := p.writeField2(ctx, oprot); err != nil { return err } 50178 if err := p.writeField3(ctx, oprot); err != nil { return err } 50179 if err := p.writeField4(ctx, oprot); err != nil { return err } 50180 } 50181 if err := oprot.WriteFieldStop(ctx); err != nil { 50182 return thrift.PrependError("write field stop error: ", err) } 50183 if err := oprot.WriteStructEnd(ctx); err != nil { 50184 return thrift.PrependError("write struct stop error: ", err) } 50185 return nil 50186 } 50187 50188 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 50189 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 50190 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 50191 if err := p.Code.Write(ctx, oprot); err != nil { 50192 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 50193 } 50194 if err := oprot.WriteFieldEnd(ctx); err != nil { 50195 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 50196 return err 50197 } 50198 50199 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 50200 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 50201 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 50202 if err := p.Scope.Write(ctx, oprot); err != nil { 50203 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 50204 } 50205 if err := oprot.WriteFieldEnd(ctx); err != nil { 50206 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 50207 return err 50208 } 50209 50210 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 50211 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 50212 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 50213 if err := p.Table.Write(ctx, oprot); err != nil { 50214 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 50215 } 50216 if err := oprot.WriteFieldEnd(ctx); err != nil { 50217 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 50218 return err 50219 } 50220 50221 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 50222 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 4); err != nil { 50223 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:primary: ", p), err) } 50224 if err := p.Primary.Write(ctx, oprot); err != nil { 50225 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 50226 } 50227 if err := oprot.WriteFieldEnd(ctx); err != nil { 50228 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:primary: ", p), err) } 50229 return err 50230 } 50231 50232 func (p *ApplyDbIdxLongDoubleFindPrimaryArgs) String() string { 50233 if p == nil { 50234 return "<nil>" 50235 } 50236 return fmt.Sprintf("ApplyDbIdxLongDoubleFindPrimaryArgs(%+v)", *p) 50237 } 50238 50239 // Attributes: 50240 // - Success 50241 type ApplyDbIdxLongDoubleFindPrimaryResult struct { 50242 Success *FindPrimaryReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 50243 } 50244 50245 func NewApplyDbIdxLongDoubleFindPrimaryResult() *ApplyDbIdxLongDoubleFindPrimaryResult { 50246 return &ApplyDbIdxLongDoubleFindPrimaryResult{} 50247 } 50248 50249 var ApplyDbIdxLongDoubleFindPrimaryResult_Success_DEFAULT *FindPrimaryReturn 50250 func (p *ApplyDbIdxLongDoubleFindPrimaryResult) GetSuccess() *FindPrimaryReturn { 50251 if !p.IsSetSuccess() { 50252 return ApplyDbIdxLongDoubleFindPrimaryResult_Success_DEFAULT 50253 } 50254 return p.Success 50255 } 50256 func (p *ApplyDbIdxLongDoubleFindPrimaryResult) IsSetSuccess() bool { 50257 return p.Success != nil 50258 } 50259 50260 func (p *ApplyDbIdxLongDoubleFindPrimaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 50261 if _, err := iprot.ReadStructBegin(ctx); err != nil { 50262 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 50263 } 50264 50265 50266 for { 50267 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 50268 if err != nil { 50269 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 50270 } 50271 if fieldTypeId == thrift.STOP { break; } 50272 switch fieldId { 50273 case 0: 50274 if fieldTypeId == thrift.STRUCT { 50275 if err := p.ReadField0(ctx, iprot); err != nil { 50276 return err 50277 } 50278 } else { 50279 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50280 return err 50281 } 50282 } 50283 default: 50284 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50285 return err 50286 } 50287 } 50288 if err := iprot.ReadFieldEnd(ctx); err != nil { 50289 return err 50290 } 50291 } 50292 if err := iprot.ReadStructEnd(ctx); err != nil { 50293 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 50294 } 50295 return nil 50296 } 50297 50298 func (p *ApplyDbIdxLongDoubleFindPrimaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 50299 p.Success = &FindPrimaryReturn{} 50300 if err := p.Success.Read(ctx, iprot); err != nil { 50301 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 50302 } 50303 return nil 50304 } 50305 50306 func (p *ApplyDbIdxLongDoubleFindPrimaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 50307 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_find_primary_result"); err != nil { 50308 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 50309 if p != nil { 50310 if err := p.writeField0(ctx, oprot); err != nil { return err } 50311 } 50312 if err := oprot.WriteFieldStop(ctx); err != nil { 50313 return thrift.PrependError("write field stop error: ", err) } 50314 if err := oprot.WriteStructEnd(ctx); err != nil { 50315 return thrift.PrependError("write struct stop error: ", err) } 50316 return nil 50317 } 50318 50319 func (p *ApplyDbIdxLongDoubleFindPrimaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 50320 if p.IsSetSuccess() { 50321 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 50322 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 50323 if err := p.Success.Write(ctx, oprot); err != nil { 50324 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 50325 } 50326 if err := oprot.WriteFieldEnd(ctx); err != nil { 50327 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 50328 } 50329 return err 50330 } 50331 50332 func (p *ApplyDbIdxLongDoubleFindPrimaryResult) String() string { 50333 if p == nil { 50334 return "<nil>" 50335 } 50336 return fmt.Sprintf("ApplyDbIdxLongDoubleFindPrimaryResult(%+v)", *p) 50337 } 50338 50339 // Attributes: 50340 // - Code 50341 // - Scope 50342 // - Table 50343 // - Secondary 50344 type ApplyDbIdxLongDoubleFindSecondaryArgs struct { 50345 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 50346 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 50347 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 50348 Secondary []byte `thrift:"secondary,4" db:"secondary" json:"secondary"` 50349 } 50350 50351 func NewApplyDbIdxLongDoubleFindSecondaryArgs() *ApplyDbIdxLongDoubleFindSecondaryArgs { 50352 return &ApplyDbIdxLongDoubleFindSecondaryArgs{} 50353 } 50354 50355 var ApplyDbIdxLongDoubleFindSecondaryArgs_Code_DEFAULT *Uint64 50356 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) GetCode() *Uint64 { 50357 if !p.IsSetCode() { 50358 return ApplyDbIdxLongDoubleFindSecondaryArgs_Code_DEFAULT 50359 } 50360 return p.Code 50361 } 50362 var ApplyDbIdxLongDoubleFindSecondaryArgs_Scope_DEFAULT *Uint64 50363 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) GetScope() *Uint64 { 50364 if !p.IsSetScope() { 50365 return ApplyDbIdxLongDoubleFindSecondaryArgs_Scope_DEFAULT 50366 } 50367 return p.Scope 50368 } 50369 var ApplyDbIdxLongDoubleFindSecondaryArgs_Table_DEFAULT *Uint64 50370 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) GetTable() *Uint64 { 50371 if !p.IsSetTable() { 50372 return ApplyDbIdxLongDoubleFindSecondaryArgs_Table_DEFAULT 50373 } 50374 return p.Table 50375 } 50376 50377 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) GetSecondary() []byte { 50378 return p.Secondary 50379 } 50380 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) IsSetCode() bool { 50381 return p.Code != nil 50382 } 50383 50384 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) IsSetScope() bool { 50385 return p.Scope != nil 50386 } 50387 50388 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) IsSetTable() bool { 50389 return p.Table != nil 50390 } 50391 50392 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 50393 if _, err := iprot.ReadStructBegin(ctx); err != nil { 50394 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 50395 } 50396 50397 50398 for { 50399 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 50400 if err != nil { 50401 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 50402 } 50403 if fieldTypeId == thrift.STOP { break; } 50404 switch fieldId { 50405 case 1: 50406 if fieldTypeId == thrift.STRUCT { 50407 if err := p.ReadField1(ctx, iprot); err != nil { 50408 return err 50409 } 50410 } else { 50411 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50412 return err 50413 } 50414 } 50415 case 2: 50416 if fieldTypeId == thrift.STRUCT { 50417 if err := p.ReadField2(ctx, iprot); err != nil { 50418 return err 50419 } 50420 } else { 50421 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50422 return err 50423 } 50424 } 50425 case 3: 50426 if fieldTypeId == thrift.STRUCT { 50427 if err := p.ReadField3(ctx, iprot); err != nil { 50428 return err 50429 } 50430 } else { 50431 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50432 return err 50433 } 50434 } 50435 case 4: 50436 if fieldTypeId == thrift.STRING { 50437 if err := p.ReadField4(ctx, iprot); err != nil { 50438 return err 50439 } 50440 } else { 50441 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50442 return err 50443 } 50444 } 50445 default: 50446 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50447 return err 50448 } 50449 } 50450 if err := iprot.ReadFieldEnd(ctx); err != nil { 50451 return err 50452 } 50453 } 50454 if err := iprot.ReadStructEnd(ctx); err != nil { 50455 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 50456 } 50457 return nil 50458 } 50459 50460 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 50461 p.Code = &Uint64{} 50462 if err := p.Code.Read(ctx, iprot); err != nil { 50463 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 50464 } 50465 return nil 50466 } 50467 50468 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 50469 p.Scope = &Uint64{} 50470 if err := p.Scope.Read(ctx, iprot); err != nil { 50471 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 50472 } 50473 return nil 50474 } 50475 50476 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 50477 p.Table = &Uint64{} 50478 if err := p.Table.Read(ctx, iprot); err != nil { 50479 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 50480 } 50481 return nil 50482 } 50483 50484 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 50485 if v, err := iprot.ReadBinary(ctx); err != nil { 50486 return thrift.PrependError("error reading field 4: ", err) 50487 } else { 50488 p.Secondary = v 50489 } 50490 return nil 50491 } 50492 50493 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 50494 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_find_secondary_args"); err != nil { 50495 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 50496 if p != nil { 50497 if err := p.writeField1(ctx, oprot); err != nil { return err } 50498 if err := p.writeField2(ctx, oprot); err != nil { return err } 50499 if err := p.writeField3(ctx, oprot); err != nil { return err } 50500 if err := p.writeField4(ctx, oprot); err != nil { return err } 50501 } 50502 if err := oprot.WriteFieldStop(ctx); err != nil { 50503 return thrift.PrependError("write field stop error: ", err) } 50504 if err := oprot.WriteStructEnd(ctx); err != nil { 50505 return thrift.PrependError("write struct stop error: ", err) } 50506 return nil 50507 } 50508 50509 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 50510 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 50511 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 50512 if err := p.Code.Write(ctx, oprot); err != nil { 50513 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 50514 } 50515 if err := oprot.WriteFieldEnd(ctx); err != nil { 50516 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 50517 return err 50518 } 50519 50520 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 50521 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 50522 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 50523 if err := p.Scope.Write(ctx, oprot); err != nil { 50524 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 50525 } 50526 if err := oprot.WriteFieldEnd(ctx); err != nil { 50527 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 50528 return err 50529 } 50530 50531 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 50532 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 50533 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 50534 if err := p.Table.Write(ctx, oprot); err != nil { 50535 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 50536 } 50537 if err := oprot.WriteFieldEnd(ctx); err != nil { 50538 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 50539 return err 50540 } 50541 50542 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 50543 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 4); err != nil { 50544 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondary: ", p), err) } 50545 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 50546 return thrift.PrependError(fmt.Sprintf("%T.secondary (4) field write error: ", p), err) } 50547 if err := oprot.WriteFieldEnd(ctx); err != nil { 50548 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondary: ", p), err) } 50549 return err 50550 } 50551 50552 func (p *ApplyDbIdxLongDoubleFindSecondaryArgs) String() string { 50553 if p == nil { 50554 return "<nil>" 50555 } 50556 return fmt.Sprintf("ApplyDbIdxLongDoubleFindSecondaryArgs(%+v)", *p) 50557 } 50558 50559 // Attributes: 50560 // - Success 50561 type ApplyDbIdxLongDoubleFindSecondaryResult struct { 50562 Success *FindSecondaryReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 50563 } 50564 50565 func NewApplyDbIdxLongDoubleFindSecondaryResult() *ApplyDbIdxLongDoubleFindSecondaryResult { 50566 return &ApplyDbIdxLongDoubleFindSecondaryResult{} 50567 } 50568 50569 var ApplyDbIdxLongDoubleFindSecondaryResult_Success_DEFAULT *FindSecondaryReturn 50570 func (p *ApplyDbIdxLongDoubleFindSecondaryResult) GetSuccess() *FindSecondaryReturn { 50571 if !p.IsSetSuccess() { 50572 return ApplyDbIdxLongDoubleFindSecondaryResult_Success_DEFAULT 50573 } 50574 return p.Success 50575 } 50576 func (p *ApplyDbIdxLongDoubleFindSecondaryResult) IsSetSuccess() bool { 50577 return p.Success != nil 50578 } 50579 50580 func (p *ApplyDbIdxLongDoubleFindSecondaryResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 50581 if _, err := iprot.ReadStructBegin(ctx); err != nil { 50582 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 50583 } 50584 50585 50586 for { 50587 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 50588 if err != nil { 50589 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 50590 } 50591 if fieldTypeId == thrift.STOP { break; } 50592 switch fieldId { 50593 case 0: 50594 if fieldTypeId == thrift.STRUCT { 50595 if err := p.ReadField0(ctx, iprot); err != nil { 50596 return err 50597 } 50598 } else { 50599 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50600 return err 50601 } 50602 } 50603 default: 50604 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50605 return err 50606 } 50607 } 50608 if err := iprot.ReadFieldEnd(ctx); err != nil { 50609 return err 50610 } 50611 } 50612 if err := iprot.ReadStructEnd(ctx); err != nil { 50613 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 50614 } 50615 return nil 50616 } 50617 50618 func (p *ApplyDbIdxLongDoubleFindSecondaryResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 50619 p.Success = &FindSecondaryReturn{} 50620 if err := p.Success.Read(ctx, iprot); err != nil { 50621 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 50622 } 50623 return nil 50624 } 50625 50626 func (p *ApplyDbIdxLongDoubleFindSecondaryResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 50627 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_find_secondary_result"); err != nil { 50628 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 50629 if p != nil { 50630 if err := p.writeField0(ctx, oprot); err != nil { return err } 50631 } 50632 if err := oprot.WriteFieldStop(ctx); err != nil { 50633 return thrift.PrependError("write field stop error: ", err) } 50634 if err := oprot.WriteStructEnd(ctx); err != nil { 50635 return thrift.PrependError("write struct stop error: ", err) } 50636 return nil 50637 } 50638 50639 func (p *ApplyDbIdxLongDoubleFindSecondaryResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 50640 if p.IsSetSuccess() { 50641 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 50642 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 50643 if err := p.Success.Write(ctx, oprot); err != nil { 50644 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 50645 } 50646 if err := oprot.WriteFieldEnd(ctx); err != nil { 50647 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 50648 } 50649 return err 50650 } 50651 50652 func (p *ApplyDbIdxLongDoubleFindSecondaryResult) String() string { 50653 if p == nil { 50654 return "<nil>" 50655 } 50656 return fmt.Sprintf("ApplyDbIdxLongDoubleFindSecondaryResult(%+v)", *p) 50657 } 50658 50659 // Attributes: 50660 // - Code 50661 // - Scope 50662 // - Table 50663 // - Secondary 50664 // - Primary 50665 type ApplyDbIdxLongDoubleLowerboundArgs struct { 50666 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 50667 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 50668 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 50669 Secondary []byte `thrift:"secondary,4" db:"secondary" json:"secondary"` 50670 Primary *Uint64 `thrift:"primary,5" db:"primary" json:"primary"` 50671 } 50672 50673 func NewApplyDbIdxLongDoubleLowerboundArgs() *ApplyDbIdxLongDoubleLowerboundArgs { 50674 return &ApplyDbIdxLongDoubleLowerboundArgs{} 50675 } 50676 50677 var ApplyDbIdxLongDoubleLowerboundArgs_Code_DEFAULT *Uint64 50678 func (p *ApplyDbIdxLongDoubleLowerboundArgs) GetCode() *Uint64 { 50679 if !p.IsSetCode() { 50680 return ApplyDbIdxLongDoubleLowerboundArgs_Code_DEFAULT 50681 } 50682 return p.Code 50683 } 50684 var ApplyDbIdxLongDoubleLowerboundArgs_Scope_DEFAULT *Uint64 50685 func (p *ApplyDbIdxLongDoubleLowerboundArgs) GetScope() *Uint64 { 50686 if !p.IsSetScope() { 50687 return ApplyDbIdxLongDoubleLowerboundArgs_Scope_DEFAULT 50688 } 50689 return p.Scope 50690 } 50691 var ApplyDbIdxLongDoubleLowerboundArgs_Table_DEFAULT *Uint64 50692 func (p *ApplyDbIdxLongDoubleLowerboundArgs) GetTable() *Uint64 { 50693 if !p.IsSetTable() { 50694 return ApplyDbIdxLongDoubleLowerboundArgs_Table_DEFAULT 50695 } 50696 return p.Table 50697 } 50698 50699 func (p *ApplyDbIdxLongDoubleLowerboundArgs) GetSecondary() []byte { 50700 return p.Secondary 50701 } 50702 var ApplyDbIdxLongDoubleLowerboundArgs_Primary_DEFAULT *Uint64 50703 func (p *ApplyDbIdxLongDoubleLowerboundArgs) GetPrimary() *Uint64 { 50704 if !p.IsSetPrimary() { 50705 return ApplyDbIdxLongDoubleLowerboundArgs_Primary_DEFAULT 50706 } 50707 return p.Primary 50708 } 50709 func (p *ApplyDbIdxLongDoubleLowerboundArgs) IsSetCode() bool { 50710 return p.Code != nil 50711 } 50712 50713 func (p *ApplyDbIdxLongDoubleLowerboundArgs) IsSetScope() bool { 50714 return p.Scope != nil 50715 } 50716 50717 func (p *ApplyDbIdxLongDoubleLowerboundArgs) IsSetTable() bool { 50718 return p.Table != nil 50719 } 50720 50721 func (p *ApplyDbIdxLongDoubleLowerboundArgs) IsSetPrimary() bool { 50722 return p.Primary != nil 50723 } 50724 50725 func (p *ApplyDbIdxLongDoubleLowerboundArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 50726 if _, err := iprot.ReadStructBegin(ctx); err != nil { 50727 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 50728 } 50729 50730 50731 for { 50732 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 50733 if err != nil { 50734 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 50735 } 50736 if fieldTypeId == thrift.STOP { break; } 50737 switch fieldId { 50738 case 1: 50739 if fieldTypeId == thrift.STRUCT { 50740 if err := p.ReadField1(ctx, iprot); err != nil { 50741 return err 50742 } 50743 } else { 50744 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50745 return err 50746 } 50747 } 50748 case 2: 50749 if fieldTypeId == thrift.STRUCT { 50750 if err := p.ReadField2(ctx, iprot); err != nil { 50751 return err 50752 } 50753 } else { 50754 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50755 return err 50756 } 50757 } 50758 case 3: 50759 if fieldTypeId == thrift.STRUCT { 50760 if err := p.ReadField3(ctx, iprot); err != nil { 50761 return err 50762 } 50763 } else { 50764 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50765 return err 50766 } 50767 } 50768 case 4: 50769 if fieldTypeId == thrift.STRING { 50770 if err := p.ReadField4(ctx, iprot); err != nil { 50771 return err 50772 } 50773 } else { 50774 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50775 return err 50776 } 50777 } 50778 case 5: 50779 if fieldTypeId == thrift.STRUCT { 50780 if err := p.ReadField5(ctx, iprot); err != nil { 50781 return err 50782 } 50783 } else { 50784 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50785 return err 50786 } 50787 } 50788 default: 50789 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50790 return err 50791 } 50792 } 50793 if err := iprot.ReadFieldEnd(ctx); err != nil { 50794 return err 50795 } 50796 } 50797 if err := iprot.ReadStructEnd(ctx); err != nil { 50798 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 50799 } 50800 return nil 50801 } 50802 50803 func (p *ApplyDbIdxLongDoubleLowerboundArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 50804 p.Code = &Uint64{} 50805 if err := p.Code.Read(ctx, iprot); err != nil { 50806 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 50807 } 50808 return nil 50809 } 50810 50811 func (p *ApplyDbIdxLongDoubleLowerboundArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 50812 p.Scope = &Uint64{} 50813 if err := p.Scope.Read(ctx, iprot); err != nil { 50814 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 50815 } 50816 return nil 50817 } 50818 50819 func (p *ApplyDbIdxLongDoubleLowerboundArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 50820 p.Table = &Uint64{} 50821 if err := p.Table.Read(ctx, iprot); err != nil { 50822 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 50823 } 50824 return nil 50825 } 50826 50827 func (p *ApplyDbIdxLongDoubleLowerboundArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 50828 if v, err := iprot.ReadBinary(ctx); err != nil { 50829 return thrift.PrependError("error reading field 4: ", err) 50830 } else { 50831 p.Secondary = v 50832 } 50833 return nil 50834 } 50835 50836 func (p *ApplyDbIdxLongDoubleLowerboundArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 50837 p.Primary = &Uint64{} 50838 if err := p.Primary.Read(ctx, iprot); err != nil { 50839 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 50840 } 50841 return nil 50842 } 50843 50844 func (p *ApplyDbIdxLongDoubleLowerboundArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 50845 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_lowerbound_args"); err != nil { 50846 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 50847 if p != nil { 50848 if err := p.writeField1(ctx, oprot); err != nil { return err } 50849 if err := p.writeField2(ctx, oprot); err != nil { return err } 50850 if err := p.writeField3(ctx, oprot); err != nil { return err } 50851 if err := p.writeField4(ctx, oprot); err != nil { return err } 50852 if err := p.writeField5(ctx, oprot); err != nil { return err } 50853 } 50854 if err := oprot.WriteFieldStop(ctx); err != nil { 50855 return thrift.PrependError("write field stop error: ", err) } 50856 if err := oprot.WriteStructEnd(ctx); err != nil { 50857 return thrift.PrependError("write struct stop error: ", err) } 50858 return nil 50859 } 50860 50861 func (p *ApplyDbIdxLongDoubleLowerboundArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 50862 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 50863 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 50864 if err := p.Code.Write(ctx, oprot); err != nil { 50865 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 50866 } 50867 if err := oprot.WriteFieldEnd(ctx); err != nil { 50868 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 50869 return err 50870 } 50871 50872 func (p *ApplyDbIdxLongDoubleLowerboundArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 50873 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 50874 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 50875 if err := p.Scope.Write(ctx, oprot); err != nil { 50876 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 50877 } 50878 if err := oprot.WriteFieldEnd(ctx); err != nil { 50879 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 50880 return err 50881 } 50882 50883 func (p *ApplyDbIdxLongDoubleLowerboundArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 50884 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 50885 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 50886 if err := p.Table.Write(ctx, oprot); err != nil { 50887 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 50888 } 50889 if err := oprot.WriteFieldEnd(ctx); err != nil { 50890 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 50891 return err 50892 } 50893 50894 func (p *ApplyDbIdxLongDoubleLowerboundArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 50895 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 4); err != nil { 50896 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondary: ", p), err) } 50897 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 50898 return thrift.PrependError(fmt.Sprintf("%T.secondary (4) field write error: ", p), err) } 50899 if err := oprot.WriteFieldEnd(ctx); err != nil { 50900 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondary: ", p), err) } 50901 return err 50902 } 50903 50904 func (p *ApplyDbIdxLongDoubleLowerboundArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 50905 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 5); err != nil { 50906 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:primary: ", p), err) } 50907 if err := p.Primary.Write(ctx, oprot); err != nil { 50908 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 50909 } 50910 if err := oprot.WriteFieldEnd(ctx); err != nil { 50911 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:primary: ", p), err) } 50912 return err 50913 } 50914 50915 func (p *ApplyDbIdxLongDoubleLowerboundArgs) String() string { 50916 if p == nil { 50917 return "<nil>" 50918 } 50919 return fmt.Sprintf("ApplyDbIdxLongDoubleLowerboundArgs(%+v)", *p) 50920 } 50921 50922 // Attributes: 50923 // - Success 50924 type ApplyDbIdxLongDoubleLowerboundResult struct { 50925 Success *LowerBoundUpperBoundReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 50926 } 50927 50928 func NewApplyDbIdxLongDoubleLowerboundResult() *ApplyDbIdxLongDoubleLowerboundResult { 50929 return &ApplyDbIdxLongDoubleLowerboundResult{} 50930 } 50931 50932 var ApplyDbIdxLongDoubleLowerboundResult_Success_DEFAULT *LowerBoundUpperBoundReturn 50933 func (p *ApplyDbIdxLongDoubleLowerboundResult) GetSuccess() *LowerBoundUpperBoundReturn { 50934 if !p.IsSetSuccess() { 50935 return ApplyDbIdxLongDoubleLowerboundResult_Success_DEFAULT 50936 } 50937 return p.Success 50938 } 50939 func (p *ApplyDbIdxLongDoubleLowerboundResult) IsSetSuccess() bool { 50940 return p.Success != nil 50941 } 50942 50943 func (p *ApplyDbIdxLongDoubleLowerboundResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 50944 if _, err := iprot.ReadStructBegin(ctx); err != nil { 50945 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 50946 } 50947 50948 50949 for { 50950 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 50951 if err != nil { 50952 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 50953 } 50954 if fieldTypeId == thrift.STOP { break; } 50955 switch fieldId { 50956 case 0: 50957 if fieldTypeId == thrift.STRUCT { 50958 if err := p.ReadField0(ctx, iprot); err != nil { 50959 return err 50960 } 50961 } else { 50962 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50963 return err 50964 } 50965 } 50966 default: 50967 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 50968 return err 50969 } 50970 } 50971 if err := iprot.ReadFieldEnd(ctx); err != nil { 50972 return err 50973 } 50974 } 50975 if err := iprot.ReadStructEnd(ctx); err != nil { 50976 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 50977 } 50978 return nil 50979 } 50980 50981 func (p *ApplyDbIdxLongDoubleLowerboundResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 50982 p.Success = &LowerBoundUpperBoundReturn{} 50983 if err := p.Success.Read(ctx, iprot); err != nil { 50984 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 50985 } 50986 return nil 50987 } 50988 50989 func (p *ApplyDbIdxLongDoubleLowerboundResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 50990 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_lowerbound_result"); err != nil { 50991 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 50992 if p != nil { 50993 if err := p.writeField0(ctx, oprot); err != nil { return err } 50994 } 50995 if err := oprot.WriteFieldStop(ctx); err != nil { 50996 return thrift.PrependError("write field stop error: ", err) } 50997 if err := oprot.WriteStructEnd(ctx); err != nil { 50998 return thrift.PrependError("write struct stop error: ", err) } 50999 return nil 51000 } 51001 51002 func (p *ApplyDbIdxLongDoubleLowerboundResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 51003 if p.IsSetSuccess() { 51004 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 51005 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 51006 if err := p.Success.Write(ctx, oprot); err != nil { 51007 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 51008 } 51009 if err := oprot.WriteFieldEnd(ctx); err != nil { 51010 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 51011 } 51012 return err 51013 } 51014 51015 func (p *ApplyDbIdxLongDoubleLowerboundResult) String() string { 51016 if p == nil { 51017 return "<nil>" 51018 } 51019 return fmt.Sprintf("ApplyDbIdxLongDoubleLowerboundResult(%+v)", *p) 51020 } 51021 51022 // Attributes: 51023 // - Code 51024 // - Scope 51025 // - Table 51026 // - Secondary 51027 // - Primary 51028 type ApplyDbIdxLongDoubleUpperboundArgs struct { 51029 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 51030 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 51031 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 51032 Secondary []byte `thrift:"secondary,4" db:"secondary" json:"secondary"` 51033 Primary *Uint64 `thrift:"primary,5" db:"primary" json:"primary"` 51034 } 51035 51036 func NewApplyDbIdxLongDoubleUpperboundArgs() *ApplyDbIdxLongDoubleUpperboundArgs { 51037 return &ApplyDbIdxLongDoubleUpperboundArgs{} 51038 } 51039 51040 var ApplyDbIdxLongDoubleUpperboundArgs_Code_DEFAULT *Uint64 51041 func (p *ApplyDbIdxLongDoubleUpperboundArgs) GetCode() *Uint64 { 51042 if !p.IsSetCode() { 51043 return ApplyDbIdxLongDoubleUpperboundArgs_Code_DEFAULT 51044 } 51045 return p.Code 51046 } 51047 var ApplyDbIdxLongDoubleUpperboundArgs_Scope_DEFAULT *Uint64 51048 func (p *ApplyDbIdxLongDoubleUpperboundArgs) GetScope() *Uint64 { 51049 if !p.IsSetScope() { 51050 return ApplyDbIdxLongDoubleUpperboundArgs_Scope_DEFAULT 51051 } 51052 return p.Scope 51053 } 51054 var ApplyDbIdxLongDoubleUpperboundArgs_Table_DEFAULT *Uint64 51055 func (p *ApplyDbIdxLongDoubleUpperboundArgs) GetTable() *Uint64 { 51056 if !p.IsSetTable() { 51057 return ApplyDbIdxLongDoubleUpperboundArgs_Table_DEFAULT 51058 } 51059 return p.Table 51060 } 51061 51062 func (p *ApplyDbIdxLongDoubleUpperboundArgs) GetSecondary() []byte { 51063 return p.Secondary 51064 } 51065 var ApplyDbIdxLongDoubleUpperboundArgs_Primary_DEFAULT *Uint64 51066 func (p *ApplyDbIdxLongDoubleUpperboundArgs) GetPrimary() *Uint64 { 51067 if !p.IsSetPrimary() { 51068 return ApplyDbIdxLongDoubleUpperboundArgs_Primary_DEFAULT 51069 } 51070 return p.Primary 51071 } 51072 func (p *ApplyDbIdxLongDoubleUpperboundArgs) IsSetCode() bool { 51073 return p.Code != nil 51074 } 51075 51076 func (p *ApplyDbIdxLongDoubleUpperboundArgs) IsSetScope() bool { 51077 return p.Scope != nil 51078 } 51079 51080 func (p *ApplyDbIdxLongDoubleUpperboundArgs) IsSetTable() bool { 51081 return p.Table != nil 51082 } 51083 51084 func (p *ApplyDbIdxLongDoubleUpperboundArgs) IsSetPrimary() bool { 51085 return p.Primary != nil 51086 } 51087 51088 func (p *ApplyDbIdxLongDoubleUpperboundArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 51089 if _, err := iprot.ReadStructBegin(ctx); err != nil { 51090 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 51091 } 51092 51093 51094 for { 51095 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 51096 if err != nil { 51097 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 51098 } 51099 if fieldTypeId == thrift.STOP { break; } 51100 switch fieldId { 51101 case 1: 51102 if fieldTypeId == thrift.STRUCT { 51103 if err := p.ReadField1(ctx, iprot); err != nil { 51104 return err 51105 } 51106 } else { 51107 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51108 return err 51109 } 51110 } 51111 case 2: 51112 if fieldTypeId == thrift.STRUCT { 51113 if err := p.ReadField2(ctx, iprot); err != nil { 51114 return err 51115 } 51116 } else { 51117 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51118 return err 51119 } 51120 } 51121 case 3: 51122 if fieldTypeId == thrift.STRUCT { 51123 if err := p.ReadField3(ctx, iprot); err != nil { 51124 return err 51125 } 51126 } else { 51127 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51128 return err 51129 } 51130 } 51131 case 4: 51132 if fieldTypeId == thrift.STRING { 51133 if err := p.ReadField4(ctx, iprot); err != nil { 51134 return err 51135 } 51136 } else { 51137 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51138 return err 51139 } 51140 } 51141 case 5: 51142 if fieldTypeId == thrift.STRUCT { 51143 if err := p.ReadField5(ctx, iprot); err != nil { 51144 return err 51145 } 51146 } else { 51147 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51148 return err 51149 } 51150 } 51151 default: 51152 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51153 return err 51154 } 51155 } 51156 if err := iprot.ReadFieldEnd(ctx); err != nil { 51157 return err 51158 } 51159 } 51160 if err := iprot.ReadStructEnd(ctx); err != nil { 51161 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 51162 } 51163 return nil 51164 } 51165 51166 func (p *ApplyDbIdxLongDoubleUpperboundArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 51167 p.Code = &Uint64{} 51168 if err := p.Code.Read(ctx, iprot); err != nil { 51169 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 51170 } 51171 return nil 51172 } 51173 51174 func (p *ApplyDbIdxLongDoubleUpperboundArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 51175 p.Scope = &Uint64{} 51176 if err := p.Scope.Read(ctx, iprot); err != nil { 51177 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 51178 } 51179 return nil 51180 } 51181 51182 func (p *ApplyDbIdxLongDoubleUpperboundArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 51183 p.Table = &Uint64{} 51184 if err := p.Table.Read(ctx, iprot); err != nil { 51185 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 51186 } 51187 return nil 51188 } 51189 51190 func (p *ApplyDbIdxLongDoubleUpperboundArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 51191 if v, err := iprot.ReadBinary(ctx); err != nil { 51192 return thrift.PrependError("error reading field 4: ", err) 51193 } else { 51194 p.Secondary = v 51195 } 51196 return nil 51197 } 51198 51199 func (p *ApplyDbIdxLongDoubleUpperboundArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 51200 p.Primary = &Uint64{} 51201 if err := p.Primary.Read(ctx, iprot); err != nil { 51202 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Primary), err) 51203 } 51204 return nil 51205 } 51206 51207 func (p *ApplyDbIdxLongDoubleUpperboundArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 51208 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_upperbound_args"); err != nil { 51209 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 51210 if p != nil { 51211 if err := p.writeField1(ctx, oprot); err != nil { return err } 51212 if err := p.writeField2(ctx, oprot); err != nil { return err } 51213 if err := p.writeField3(ctx, oprot); err != nil { return err } 51214 if err := p.writeField4(ctx, oprot); err != nil { return err } 51215 if err := p.writeField5(ctx, oprot); err != nil { return err } 51216 } 51217 if err := oprot.WriteFieldStop(ctx); err != nil { 51218 return thrift.PrependError("write field stop error: ", err) } 51219 if err := oprot.WriteStructEnd(ctx); err != nil { 51220 return thrift.PrependError("write struct stop error: ", err) } 51221 return nil 51222 } 51223 51224 func (p *ApplyDbIdxLongDoubleUpperboundArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 51225 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 51226 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 51227 if err := p.Code.Write(ctx, oprot); err != nil { 51228 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 51229 } 51230 if err := oprot.WriteFieldEnd(ctx); err != nil { 51231 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 51232 return err 51233 } 51234 51235 func (p *ApplyDbIdxLongDoubleUpperboundArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 51236 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 51237 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 51238 if err := p.Scope.Write(ctx, oprot); err != nil { 51239 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 51240 } 51241 if err := oprot.WriteFieldEnd(ctx); err != nil { 51242 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 51243 return err 51244 } 51245 51246 func (p *ApplyDbIdxLongDoubleUpperboundArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 51247 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 51248 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 51249 if err := p.Table.Write(ctx, oprot); err != nil { 51250 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 51251 } 51252 if err := oprot.WriteFieldEnd(ctx); err != nil { 51253 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 51254 return err 51255 } 51256 51257 func (p *ApplyDbIdxLongDoubleUpperboundArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 51258 if err := oprot.WriteFieldBegin(ctx, "secondary", thrift.STRING, 4); err != nil { 51259 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:secondary: ", p), err) } 51260 if err := oprot.WriteBinary(ctx, p.Secondary); err != nil { 51261 return thrift.PrependError(fmt.Sprintf("%T.secondary (4) field write error: ", p), err) } 51262 if err := oprot.WriteFieldEnd(ctx); err != nil { 51263 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:secondary: ", p), err) } 51264 return err 51265 } 51266 51267 func (p *ApplyDbIdxLongDoubleUpperboundArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 51268 if err := oprot.WriteFieldBegin(ctx, "primary", thrift.STRUCT, 5); err != nil { 51269 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:primary: ", p), err) } 51270 if err := p.Primary.Write(ctx, oprot); err != nil { 51271 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Primary), err) 51272 } 51273 if err := oprot.WriteFieldEnd(ctx); err != nil { 51274 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:primary: ", p), err) } 51275 return err 51276 } 51277 51278 func (p *ApplyDbIdxLongDoubleUpperboundArgs) String() string { 51279 if p == nil { 51280 return "<nil>" 51281 } 51282 return fmt.Sprintf("ApplyDbIdxLongDoubleUpperboundArgs(%+v)", *p) 51283 } 51284 51285 // Attributes: 51286 // - Success 51287 type ApplyDbIdxLongDoubleUpperboundResult struct { 51288 Success *LowerBoundUpperBoundReturn `thrift:"success,0" db:"success" json:"success,omitempty"` 51289 } 51290 51291 func NewApplyDbIdxLongDoubleUpperboundResult() *ApplyDbIdxLongDoubleUpperboundResult { 51292 return &ApplyDbIdxLongDoubleUpperboundResult{} 51293 } 51294 51295 var ApplyDbIdxLongDoubleUpperboundResult_Success_DEFAULT *LowerBoundUpperBoundReturn 51296 func (p *ApplyDbIdxLongDoubleUpperboundResult) GetSuccess() *LowerBoundUpperBoundReturn { 51297 if !p.IsSetSuccess() { 51298 return ApplyDbIdxLongDoubleUpperboundResult_Success_DEFAULT 51299 } 51300 return p.Success 51301 } 51302 func (p *ApplyDbIdxLongDoubleUpperboundResult) IsSetSuccess() bool { 51303 return p.Success != nil 51304 } 51305 51306 func (p *ApplyDbIdxLongDoubleUpperboundResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 51307 if _, err := iprot.ReadStructBegin(ctx); err != nil { 51308 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 51309 } 51310 51311 51312 for { 51313 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 51314 if err != nil { 51315 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 51316 } 51317 if fieldTypeId == thrift.STOP { break; } 51318 switch fieldId { 51319 case 0: 51320 if fieldTypeId == thrift.STRUCT { 51321 if err := p.ReadField0(ctx, iprot); err != nil { 51322 return err 51323 } 51324 } else { 51325 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51326 return err 51327 } 51328 } 51329 default: 51330 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51331 return err 51332 } 51333 } 51334 if err := iprot.ReadFieldEnd(ctx); err != nil { 51335 return err 51336 } 51337 } 51338 if err := iprot.ReadStructEnd(ctx); err != nil { 51339 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 51340 } 51341 return nil 51342 } 51343 51344 func (p *ApplyDbIdxLongDoubleUpperboundResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 51345 p.Success = &LowerBoundUpperBoundReturn{} 51346 if err := p.Success.Read(ctx, iprot); err != nil { 51347 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) 51348 } 51349 return nil 51350 } 51351 51352 func (p *ApplyDbIdxLongDoubleUpperboundResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 51353 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_upperbound_result"); err != nil { 51354 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 51355 if p != nil { 51356 if err := p.writeField0(ctx, oprot); err != nil { return err } 51357 } 51358 if err := oprot.WriteFieldStop(ctx); err != nil { 51359 return thrift.PrependError("write field stop error: ", err) } 51360 if err := oprot.WriteStructEnd(ctx); err != nil { 51361 return thrift.PrependError("write struct stop error: ", err) } 51362 return nil 51363 } 51364 51365 func (p *ApplyDbIdxLongDoubleUpperboundResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 51366 if p.IsSetSuccess() { 51367 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { 51368 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 51369 if err := p.Success.Write(ctx, oprot); err != nil { 51370 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) 51371 } 51372 if err := oprot.WriteFieldEnd(ctx); err != nil { 51373 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 51374 } 51375 return err 51376 } 51377 51378 func (p *ApplyDbIdxLongDoubleUpperboundResult) String() string { 51379 if p == nil { 51380 return "<nil>" 51381 } 51382 return fmt.Sprintf("ApplyDbIdxLongDoubleUpperboundResult(%+v)", *p) 51383 } 51384 51385 // Attributes: 51386 // - Code 51387 // - Scope 51388 // - Table 51389 type ApplyDbIdxLongDoubleEndArgs struct { 51390 Code *Uint64 `thrift:"code,1" db:"code" json:"code"` 51391 Scope *Uint64 `thrift:"scope,2" db:"scope" json:"scope"` 51392 Table *Uint64 `thrift:"table,3" db:"table" json:"table"` 51393 } 51394 51395 func NewApplyDbIdxLongDoubleEndArgs() *ApplyDbIdxLongDoubleEndArgs { 51396 return &ApplyDbIdxLongDoubleEndArgs{} 51397 } 51398 51399 var ApplyDbIdxLongDoubleEndArgs_Code_DEFAULT *Uint64 51400 func (p *ApplyDbIdxLongDoubleEndArgs) GetCode() *Uint64 { 51401 if !p.IsSetCode() { 51402 return ApplyDbIdxLongDoubleEndArgs_Code_DEFAULT 51403 } 51404 return p.Code 51405 } 51406 var ApplyDbIdxLongDoubleEndArgs_Scope_DEFAULT *Uint64 51407 func (p *ApplyDbIdxLongDoubleEndArgs) GetScope() *Uint64 { 51408 if !p.IsSetScope() { 51409 return ApplyDbIdxLongDoubleEndArgs_Scope_DEFAULT 51410 } 51411 return p.Scope 51412 } 51413 var ApplyDbIdxLongDoubleEndArgs_Table_DEFAULT *Uint64 51414 func (p *ApplyDbIdxLongDoubleEndArgs) GetTable() *Uint64 { 51415 if !p.IsSetTable() { 51416 return ApplyDbIdxLongDoubleEndArgs_Table_DEFAULT 51417 } 51418 return p.Table 51419 } 51420 func (p *ApplyDbIdxLongDoubleEndArgs) IsSetCode() bool { 51421 return p.Code != nil 51422 } 51423 51424 func (p *ApplyDbIdxLongDoubleEndArgs) IsSetScope() bool { 51425 return p.Scope != nil 51426 } 51427 51428 func (p *ApplyDbIdxLongDoubleEndArgs) IsSetTable() bool { 51429 return p.Table != nil 51430 } 51431 51432 func (p *ApplyDbIdxLongDoubleEndArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 51433 if _, err := iprot.ReadStructBegin(ctx); err != nil { 51434 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 51435 } 51436 51437 51438 for { 51439 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 51440 if err != nil { 51441 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 51442 } 51443 if fieldTypeId == thrift.STOP { break; } 51444 switch fieldId { 51445 case 1: 51446 if fieldTypeId == thrift.STRUCT { 51447 if err := p.ReadField1(ctx, iprot); err != nil { 51448 return err 51449 } 51450 } else { 51451 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51452 return err 51453 } 51454 } 51455 case 2: 51456 if fieldTypeId == thrift.STRUCT { 51457 if err := p.ReadField2(ctx, iprot); err != nil { 51458 return err 51459 } 51460 } else { 51461 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51462 return err 51463 } 51464 } 51465 case 3: 51466 if fieldTypeId == thrift.STRUCT { 51467 if err := p.ReadField3(ctx, iprot); err != nil { 51468 return err 51469 } 51470 } else { 51471 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51472 return err 51473 } 51474 } 51475 default: 51476 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51477 return err 51478 } 51479 } 51480 if err := iprot.ReadFieldEnd(ctx); err != nil { 51481 return err 51482 } 51483 } 51484 if err := iprot.ReadStructEnd(ctx); err != nil { 51485 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 51486 } 51487 return nil 51488 } 51489 51490 func (p *ApplyDbIdxLongDoubleEndArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 51491 p.Code = &Uint64{} 51492 if err := p.Code.Read(ctx, iprot); err != nil { 51493 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Code), err) 51494 } 51495 return nil 51496 } 51497 51498 func (p *ApplyDbIdxLongDoubleEndArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 51499 p.Scope = &Uint64{} 51500 if err := p.Scope.Read(ctx, iprot); err != nil { 51501 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Scope), err) 51502 } 51503 return nil 51504 } 51505 51506 func (p *ApplyDbIdxLongDoubleEndArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 51507 p.Table = &Uint64{} 51508 if err := p.Table.Read(ctx, iprot); err != nil { 51509 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) 51510 } 51511 return nil 51512 } 51513 51514 func (p *ApplyDbIdxLongDoubleEndArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 51515 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_end_args"); err != nil { 51516 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 51517 if p != nil { 51518 if err := p.writeField1(ctx, oprot); err != nil { return err } 51519 if err := p.writeField2(ctx, oprot); err != nil { return err } 51520 if err := p.writeField3(ctx, oprot); err != nil { return err } 51521 } 51522 if err := oprot.WriteFieldStop(ctx); err != nil { 51523 return thrift.PrependError("write field stop error: ", err) } 51524 if err := oprot.WriteStructEnd(ctx); err != nil { 51525 return thrift.PrependError("write struct stop error: ", err) } 51526 return nil 51527 } 51528 51529 func (p *ApplyDbIdxLongDoubleEndArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 51530 if err := oprot.WriteFieldBegin(ctx, "code", thrift.STRUCT, 1); err != nil { 51531 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err) } 51532 if err := p.Code.Write(ctx, oprot); err != nil { 51533 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Code), err) 51534 } 51535 if err := oprot.WriteFieldEnd(ctx); err != nil { 51536 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err) } 51537 return err 51538 } 51539 51540 func (p *ApplyDbIdxLongDoubleEndArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 51541 if err := oprot.WriteFieldBegin(ctx, "scope", thrift.STRUCT, 2); err != nil { 51542 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scope: ", p), err) } 51543 if err := p.Scope.Write(ctx, oprot); err != nil { 51544 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Scope), err) 51545 } 51546 if err := oprot.WriteFieldEnd(ctx); err != nil { 51547 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scope: ", p), err) } 51548 return err 51549 } 51550 51551 func (p *ApplyDbIdxLongDoubleEndArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 51552 if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 3); err != nil { 51553 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:table: ", p), err) } 51554 if err := p.Table.Write(ctx, oprot); err != nil { 51555 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) 51556 } 51557 if err := oprot.WriteFieldEnd(ctx); err != nil { 51558 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:table: ", p), err) } 51559 return err 51560 } 51561 51562 func (p *ApplyDbIdxLongDoubleEndArgs) String() string { 51563 if p == nil { 51564 return "<nil>" 51565 } 51566 return fmt.Sprintf("ApplyDbIdxLongDoubleEndArgs(%+v)", *p) 51567 } 51568 51569 // Attributes: 51570 // - Success 51571 type ApplyDbIdxLongDoubleEndResult struct { 51572 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 51573 } 51574 51575 func NewApplyDbIdxLongDoubleEndResult() *ApplyDbIdxLongDoubleEndResult { 51576 return &ApplyDbIdxLongDoubleEndResult{} 51577 } 51578 51579 var ApplyDbIdxLongDoubleEndResult_Success_DEFAULT int32 51580 func (p *ApplyDbIdxLongDoubleEndResult) GetSuccess() int32 { 51581 if !p.IsSetSuccess() { 51582 return ApplyDbIdxLongDoubleEndResult_Success_DEFAULT 51583 } 51584 return *p.Success 51585 } 51586 func (p *ApplyDbIdxLongDoubleEndResult) IsSetSuccess() bool { 51587 return p.Success != nil 51588 } 51589 51590 func (p *ApplyDbIdxLongDoubleEndResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 51591 if _, err := iprot.ReadStructBegin(ctx); err != nil { 51592 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 51593 } 51594 51595 51596 for { 51597 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 51598 if err != nil { 51599 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 51600 } 51601 if fieldTypeId == thrift.STOP { break; } 51602 switch fieldId { 51603 case 0: 51604 if fieldTypeId == thrift.I32 { 51605 if err := p.ReadField0(ctx, iprot); err != nil { 51606 return err 51607 } 51608 } else { 51609 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51610 return err 51611 } 51612 } 51613 default: 51614 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51615 return err 51616 } 51617 } 51618 if err := iprot.ReadFieldEnd(ctx); err != nil { 51619 return err 51620 } 51621 } 51622 if err := iprot.ReadStructEnd(ctx); err != nil { 51623 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 51624 } 51625 return nil 51626 } 51627 51628 func (p *ApplyDbIdxLongDoubleEndResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 51629 if v, err := iprot.ReadI32(ctx); err != nil { 51630 return thrift.PrependError("error reading field 0: ", err) 51631 } else { 51632 p.Success = &v 51633 } 51634 return nil 51635 } 51636 51637 func (p *ApplyDbIdxLongDoubleEndResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 51638 if err := oprot.WriteStructBegin(ctx, "db_idx_long_double_end_result"); err != nil { 51639 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 51640 if p != nil { 51641 if err := p.writeField0(ctx, oprot); err != nil { return err } 51642 } 51643 if err := oprot.WriteFieldStop(ctx); err != nil { 51644 return thrift.PrependError("write field stop error: ", err) } 51645 if err := oprot.WriteStructEnd(ctx); err != nil { 51646 return thrift.PrependError("write struct stop error: ", err) } 51647 return nil 51648 } 51649 51650 func (p *ApplyDbIdxLongDoubleEndResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 51651 if p.IsSetSuccess() { 51652 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 51653 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 51654 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 51655 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 51656 if err := oprot.WriteFieldEnd(ctx); err != nil { 51657 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 51658 } 51659 return err 51660 } 51661 51662 func (p *ApplyDbIdxLongDoubleEndResult) String() string { 51663 if p == nil { 51664 return "<nil>" 51665 } 51666 return fmt.Sprintf("ApplyDbIdxLongDoubleEndResult(%+v)", *p) 51667 } 51668 51669 // Attributes: 51670 // - Data 51671 type ApplySetActionReturnValueArgs struct { 51672 Data []byte `thrift:"data,1" db:"data" json:"data"` 51673 } 51674 51675 func NewApplySetActionReturnValueArgs() *ApplySetActionReturnValueArgs { 51676 return &ApplySetActionReturnValueArgs{} 51677 } 51678 51679 51680 func (p *ApplySetActionReturnValueArgs) GetData() []byte { 51681 return p.Data 51682 } 51683 func (p *ApplySetActionReturnValueArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 51684 if _, err := iprot.ReadStructBegin(ctx); err != nil { 51685 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 51686 } 51687 51688 51689 for { 51690 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 51691 if err != nil { 51692 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 51693 } 51694 if fieldTypeId == thrift.STOP { break; } 51695 switch fieldId { 51696 case 1: 51697 if fieldTypeId == thrift.STRING { 51698 if err := p.ReadField1(ctx, iprot); err != nil { 51699 return err 51700 } 51701 } else { 51702 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51703 return err 51704 } 51705 } 51706 default: 51707 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51708 return err 51709 } 51710 } 51711 if err := iprot.ReadFieldEnd(ctx); err != nil { 51712 return err 51713 } 51714 } 51715 if err := iprot.ReadStructEnd(ctx); err != nil { 51716 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 51717 } 51718 return nil 51719 } 51720 51721 func (p *ApplySetActionReturnValueArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 51722 if v, err := iprot.ReadBinary(ctx); err != nil { 51723 return thrift.PrependError("error reading field 1: ", err) 51724 } else { 51725 p.Data = v 51726 } 51727 return nil 51728 } 51729 51730 func (p *ApplySetActionReturnValueArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 51731 if err := oprot.WriteStructBegin(ctx, "set_action_return_value_args"); err != nil { 51732 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 51733 if p != nil { 51734 if err := p.writeField1(ctx, oprot); err != nil { return err } 51735 } 51736 if err := oprot.WriteFieldStop(ctx); err != nil { 51737 return thrift.PrependError("write field stop error: ", err) } 51738 if err := oprot.WriteStructEnd(ctx); err != nil { 51739 return thrift.PrependError("write struct stop error: ", err) } 51740 return nil 51741 } 51742 51743 func (p *ApplySetActionReturnValueArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 51744 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 1); err != nil { 51745 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:data: ", p), err) } 51746 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 51747 return thrift.PrependError(fmt.Sprintf("%T.data (1) field write error: ", p), err) } 51748 if err := oprot.WriteFieldEnd(ctx); err != nil { 51749 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:data: ", p), err) } 51750 return err 51751 } 51752 51753 func (p *ApplySetActionReturnValueArgs) String() string { 51754 if p == nil { 51755 return "<nil>" 51756 } 51757 return fmt.Sprintf("ApplySetActionReturnValueArgs(%+v)", *p) 51758 } 51759 51760 type ApplySetActionReturnValueResult struct { 51761 } 51762 51763 func NewApplySetActionReturnValueResult() *ApplySetActionReturnValueResult { 51764 return &ApplySetActionReturnValueResult{} 51765 } 51766 51767 func (p *ApplySetActionReturnValueResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 51768 if _, err := iprot.ReadStructBegin(ctx); err != nil { 51769 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 51770 } 51771 51772 51773 for { 51774 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 51775 if err != nil { 51776 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 51777 } 51778 if fieldTypeId == thrift.STOP { break; } 51779 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51780 return err 51781 } 51782 if err := iprot.ReadFieldEnd(ctx); err != nil { 51783 return err 51784 } 51785 } 51786 if err := iprot.ReadStructEnd(ctx); err != nil { 51787 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 51788 } 51789 return nil 51790 } 51791 51792 func (p *ApplySetActionReturnValueResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 51793 if err := oprot.WriteStructBegin(ctx, "set_action_return_value_result"); err != nil { 51794 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 51795 if p != nil { 51796 } 51797 if err := oprot.WriteFieldStop(ctx); err != nil { 51798 return thrift.PrependError("write field stop error: ", err) } 51799 if err := oprot.WriteStructEnd(ctx); err != nil { 51800 return thrift.PrependError("write struct stop error: ", err) } 51801 return nil 51802 } 51803 51804 func (p *ApplySetActionReturnValueResult) String() string { 51805 if p == nil { 51806 return "<nil>" 51807 } 51808 return fmt.Sprintf("ApplySetActionReturnValueResult(%+v)", *p) 51809 } 51810 51811 // Attributes: 51812 // - Account 51813 // - StructVersion 51814 type ApplyGetCodeHashArgs struct { 51815 Account *Uint64 `thrift:"account,1" db:"account" json:"account"` 51816 StructVersion int64 `thrift:"struct_version,2" db:"struct_version" json:"struct_version"` 51817 } 51818 51819 func NewApplyGetCodeHashArgs() *ApplyGetCodeHashArgs { 51820 return &ApplyGetCodeHashArgs{} 51821 } 51822 51823 var ApplyGetCodeHashArgs_Account_DEFAULT *Uint64 51824 func (p *ApplyGetCodeHashArgs) GetAccount() *Uint64 { 51825 if !p.IsSetAccount() { 51826 return ApplyGetCodeHashArgs_Account_DEFAULT 51827 } 51828 return p.Account 51829 } 51830 51831 func (p *ApplyGetCodeHashArgs) GetStructVersion() int64 { 51832 return p.StructVersion 51833 } 51834 func (p *ApplyGetCodeHashArgs) IsSetAccount() bool { 51835 return p.Account != nil 51836 } 51837 51838 func (p *ApplyGetCodeHashArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 51839 if _, err := iprot.ReadStructBegin(ctx); err != nil { 51840 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 51841 } 51842 51843 51844 for { 51845 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 51846 if err != nil { 51847 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 51848 } 51849 if fieldTypeId == thrift.STOP { break; } 51850 switch fieldId { 51851 case 1: 51852 if fieldTypeId == thrift.STRUCT { 51853 if err := p.ReadField1(ctx, iprot); err != nil { 51854 return err 51855 } 51856 } else { 51857 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51858 return err 51859 } 51860 } 51861 case 2: 51862 if fieldTypeId == thrift.I64 { 51863 if err := p.ReadField2(ctx, iprot); err != nil { 51864 return err 51865 } 51866 } else { 51867 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51868 return err 51869 } 51870 } 51871 default: 51872 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51873 return err 51874 } 51875 } 51876 if err := iprot.ReadFieldEnd(ctx); err != nil { 51877 return err 51878 } 51879 } 51880 if err := iprot.ReadStructEnd(ctx); err != nil { 51881 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 51882 } 51883 return nil 51884 } 51885 51886 func (p *ApplyGetCodeHashArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 51887 p.Account = &Uint64{} 51888 if err := p.Account.Read(ctx, iprot); err != nil { 51889 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Account), err) 51890 } 51891 return nil 51892 } 51893 51894 func (p *ApplyGetCodeHashArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 51895 if v, err := iprot.ReadI64(ctx); err != nil { 51896 return thrift.PrependError("error reading field 2: ", err) 51897 } else { 51898 p.StructVersion = v 51899 } 51900 return nil 51901 } 51902 51903 func (p *ApplyGetCodeHashArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 51904 if err := oprot.WriteStructBegin(ctx, "get_code_hash_args"); err != nil { 51905 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 51906 if p != nil { 51907 if err := p.writeField1(ctx, oprot); err != nil { return err } 51908 if err := p.writeField2(ctx, oprot); err != nil { return err } 51909 } 51910 if err := oprot.WriteFieldStop(ctx); err != nil { 51911 return thrift.PrependError("write field stop error: ", err) } 51912 if err := oprot.WriteStructEnd(ctx); err != nil { 51913 return thrift.PrependError("write struct stop error: ", err) } 51914 return nil 51915 } 51916 51917 func (p *ApplyGetCodeHashArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 51918 if err := oprot.WriteFieldBegin(ctx, "account", thrift.STRUCT, 1); err != nil { 51919 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:account: ", p), err) } 51920 if err := p.Account.Write(ctx, oprot); err != nil { 51921 return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Account), err) 51922 } 51923 if err := oprot.WriteFieldEnd(ctx); err != nil { 51924 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:account: ", p), err) } 51925 return err 51926 } 51927 51928 func (p *ApplyGetCodeHashArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 51929 if err := oprot.WriteFieldBegin(ctx, "struct_version", thrift.I64, 2); err != nil { 51930 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:struct_version: ", p), err) } 51931 if err := oprot.WriteI64(ctx, int64(p.StructVersion)); err != nil { 51932 return thrift.PrependError(fmt.Sprintf("%T.struct_version (2) field write error: ", p), err) } 51933 if err := oprot.WriteFieldEnd(ctx); err != nil { 51934 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:struct_version: ", p), err) } 51935 return err 51936 } 51937 51938 func (p *ApplyGetCodeHashArgs) String() string { 51939 if p == nil { 51940 return "<nil>" 51941 } 51942 return fmt.Sprintf("ApplyGetCodeHashArgs(%+v)", *p) 51943 } 51944 51945 // Attributes: 51946 // - Success 51947 type ApplyGetCodeHashResult struct { 51948 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 51949 } 51950 51951 func NewApplyGetCodeHashResult() *ApplyGetCodeHashResult { 51952 return &ApplyGetCodeHashResult{} 51953 } 51954 51955 var ApplyGetCodeHashResult_Success_DEFAULT []byte 51956 51957 func (p *ApplyGetCodeHashResult) GetSuccess() []byte { 51958 return p.Success 51959 } 51960 func (p *ApplyGetCodeHashResult) IsSetSuccess() bool { 51961 return p.Success != nil 51962 } 51963 51964 func (p *ApplyGetCodeHashResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 51965 if _, err := iprot.ReadStructBegin(ctx); err != nil { 51966 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 51967 } 51968 51969 51970 for { 51971 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 51972 if err != nil { 51973 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 51974 } 51975 if fieldTypeId == thrift.STOP { break; } 51976 switch fieldId { 51977 case 0: 51978 if fieldTypeId == thrift.STRING { 51979 if err := p.ReadField0(ctx, iprot); err != nil { 51980 return err 51981 } 51982 } else { 51983 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51984 return err 51985 } 51986 } 51987 default: 51988 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 51989 return err 51990 } 51991 } 51992 if err := iprot.ReadFieldEnd(ctx); err != nil { 51993 return err 51994 } 51995 } 51996 if err := iprot.ReadStructEnd(ctx); err != nil { 51997 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 51998 } 51999 return nil 52000 } 52001 52002 func (p *ApplyGetCodeHashResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 52003 if v, err := iprot.ReadBinary(ctx); err != nil { 52004 return thrift.PrependError("error reading field 0: ", err) 52005 } else { 52006 p.Success = v 52007 } 52008 return nil 52009 } 52010 52011 func (p *ApplyGetCodeHashResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 52012 if err := oprot.WriteStructBegin(ctx, "get_code_hash_result"); err != nil { 52013 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 52014 if p != nil { 52015 if err := p.writeField0(ctx, oprot); err != nil { return err } 52016 } 52017 if err := oprot.WriteFieldStop(ctx); err != nil { 52018 return thrift.PrependError("write field stop error: ", err) } 52019 if err := oprot.WriteStructEnd(ctx); err != nil { 52020 return thrift.PrependError("write struct stop error: ", err) } 52021 return nil 52022 } 52023 52024 func (p *ApplyGetCodeHashResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 52025 if p.IsSetSuccess() { 52026 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 52027 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 52028 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 52029 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 52030 if err := oprot.WriteFieldEnd(ctx); err != nil { 52031 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 52032 } 52033 return err 52034 } 52035 52036 func (p *ApplyGetCodeHashResult) String() string { 52037 if p == nil { 52038 return "<nil>" 52039 } 52040 return fmt.Sprintf("ApplyGetCodeHashResult(%+v)", *p) 52041 } 52042 52043 type ApplyGetBlockNumArgs struct { 52044 } 52045 52046 func NewApplyGetBlockNumArgs() *ApplyGetBlockNumArgs { 52047 return &ApplyGetBlockNumArgs{} 52048 } 52049 52050 func (p *ApplyGetBlockNumArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 52051 if _, err := iprot.ReadStructBegin(ctx); err != nil { 52052 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 52053 } 52054 52055 52056 for { 52057 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 52058 if err != nil { 52059 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 52060 } 52061 if fieldTypeId == thrift.STOP { break; } 52062 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52063 return err 52064 } 52065 if err := iprot.ReadFieldEnd(ctx); err != nil { 52066 return err 52067 } 52068 } 52069 if err := iprot.ReadStructEnd(ctx); err != nil { 52070 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 52071 } 52072 return nil 52073 } 52074 52075 func (p *ApplyGetBlockNumArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 52076 if err := oprot.WriteStructBegin(ctx, "get_block_num_args"); err != nil { 52077 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 52078 if p != nil { 52079 } 52080 if err := oprot.WriteFieldStop(ctx); err != nil { 52081 return thrift.PrependError("write field stop error: ", err) } 52082 if err := oprot.WriteStructEnd(ctx); err != nil { 52083 return thrift.PrependError("write struct stop error: ", err) } 52084 return nil 52085 } 52086 52087 func (p *ApplyGetBlockNumArgs) String() string { 52088 if p == nil { 52089 return "<nil>" 52090 } 52091 return fmt.Sprintf("ApplyGetBlockNumArgs(%+v)", *p) 52092 } 52093 52094 // Attributes: 52095 // - Success 52096 type ApplyGetBlockNumResult struct { 52097 Success *int64 `thrift:"success,0" db:"success" json:"success,omitempty"` 52098 } 52099 52100 func NewApplyGetBlockNumResult() *ApplyGetBlockNumResult { 52101 return &ApplyGetBlockNumResult{} 52102 } 52103 52104 var ApplyGetBlockNumResult_Success_DEFAULT int64 52105 func (p *ApplyGetBlockNumResult) GetSuccess() int64 { 52106 if !p.IsSetSuccess() { 52107 return ApplyGetBlockNumResult_Success_DEFAULT 52108 } 52109 return *p.Success 52110 } 52111 func (p *ApplyGetBlockNumResult) IsSetSuccess() bool { 52112 return p.Success != nil 52113 } 52114 52115 func (p *ApplyGetBlockNumResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 52116 if _, err := iprot.ReadStructBegin(ctx); err != nil { 52117 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 52118 } 52119 52120 52121 for { 52122 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 52123 if err != nil { 52124 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 52125 } 52126 if fieldTypeId == thrift.STOP { break; } 52127 switch fieldId { 52128 case 0: 52129 if fieldTypeId == thrift.I64 { 52130 if err := p.ReadField0(ctx, iprot); err != nil { 52131 return err 52132 } 52133 } else { 52134 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52135 return err 52136 } 52137 } 52138 default: 52139 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52140 return err 52141 } 52142 } 52143 if err := iprot.ReadFieldEnd(ctx); err != nil { 52144 return err 52145 } 52146 } 52147 if err := iprot.ReadStructEnd(ctx); err != nil { 52148 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 52149 } 52150 return nil 52151 } 52152 52153 func (p *ApplyGetBlockNumResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 52154 if v, err := iprot.ReadI64(ctx); err != nil { 52155 return thrift.PrependError("error reading field 0: ", err) 52156 } else { 52157 p.Success = &v 52158 } 52159 return nil 52160 } 52161 52162 func (p *ApplyGetBlockNumResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 52163 if err := oprot.WriteStructBegin(ctx, "get_block_num_result"); err != nil { 52164 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 52165 if p != nil { 52166 if err := p.writeField0(ctx, oprot); err != nil { return err } 52167 } 52168 if err := oprot.WriteFieldStop(ctx); err != nil { 52169 return thrift.PrependError("write field stop error: ", err) } 52170 if err := oprot.WriteStructEnd(ctx); err != nil { 52171 return thrift.PrependError("write struct stop error: ", err) } 52172 return nil 52173 } 52174 52175 func (p *ApplyGetBlockNumResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 52176 if p.IsSetSuccess() { 52177 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I64, 0); err != nil { 52178 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 52179 if err := oprot.WriteI64(ctx, int64(*p.Success)); err != nil { 52180 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 52181 if err := oprot.WriteFieldEnd(ctx); err != nil { 52182 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 52183 } 52184 return err 52185 } 52186 52187 func (p *ApplyGetBlockNumResult) String() string { 52188 if p == nil { 52189 return "<nil>" 52190 } 52191 return fmt.Sprintf("ApplyGetBlockNumResult(%+v)", *p) 52192 } 52193 52194 // Attributes: 52195 // - Data 52196 // - Keccak 52197 type ApplySha3Args struct { 52198 Data []byte `thrift:"data,1" db:"data" json:"data"` 52199 Keccak int32 `thrift:"keccak,2" db:"keccak" json:"keccak"` 52200 } 52201 52202 func NewApplySha3Args() *ApplySha3Args { 52203 return &ApplySha3Args{} 52204 } 52205 52206 52207 func (p *ApplySha3Args) GetData() []byte { 52208 return p.Data 52209 } 52210 52211 func (p *ApplySha3Args) GetKeccak() int32 { 52212 return p.Keccak 52213 } 52214 func (p *ApplySha3Args) Read(ctx context.Context, iprot thrift.TProtocol) error { 52215 if _, err := iprot.ReadStructBegin(ctx); err != nil { 52216 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 52217 } 52218 52219 52220 for { 52221 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 52222 if err != nil { 52223 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 52224 } 52225 if fieldTypeId == thrift.STOP { break; } 52226 switch fieldId { 52227 case 1: 52228 if fieldTypeId == thrift.STRING { 52229 if err := p.ReadField1(ctx, iprot); err != nil { 52230 return err 52231 } 52232 } else { 52233 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52234 return err 52235 } 52236 } 52237 case 2: 52238 if fieldTypeId == thrift.I32 { 52239 if err := p.ReadField2(ctx, iprot); err != nil { 52240 return err 52241 } 52242 } else { 52243 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52244 return err 52245 } 52246 } 52247 default: 52248 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52249 return err 52250 } 52251 } 52252 if err := iprot.ReadFieldEnd(ctx); err != nil { 52253 return err 52254 } 52255 } 52256 if err := iprot.ReadStructEnd(ctx); err != nil { 52257 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 52258 } 52259 return nil 52260 } 52261 52262 func (p *ApplySha3Args) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 52263 if v, err := iprot.ReadBinary(ctx); err != nil { 52264 return thrift.PrependError("error reading field 1: ", err) 52265 } else { 52266 p.Data = v 52267 } 52268 return nil 52269 } 52270 52271 func (p *ApplySha3Args) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 52272 if v, err := iprot.ReadI32(ctx); err != nil { 52273 return thrift.PrependError("error reading field 2: ", err) 52274 } else { 52275 p.Keccak = v 52276 } 52277 return nil 52278 } 52279 52280 func (p *ApplySha3Args) Write(ctx context.Context, oprot thrift.TProtocol) error { 52281 if err := oprot.WriteStructBegin(ctx, "sha3_args"); err != nil { 52282 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 52283 if p != nil { 52284 if err := p.writeField1(ctx, oprot); err != nil { return err } 52285 if err := p.writeField2(ctx, oprot); err != nil { return err } 52286 } 52287 if err := oprot.WriteFieldStop(ctx); err != nil { 52288 return thrift.PrependError("write field stop error: ", err) } 52289 if err := oprot.WriteStructEnd(ctx); err != nil { 52290 return thrift.PrependError("write struct stop error: ", err) } 52291 return nil 52292 } 52293 52294 func (p *ApplySha3Args) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 52295 if err := oprot.WriteFieldBegin(ctx, "data", thrift.STRING, 1); err != nil { 52296 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:data: ", p), err) } 52297 if err := oprot.WriteBinary(ctx, p.Data); err != nil { 52298 return thrift.PrependError(fmt.Sprintf("%T.data (1) field write error: ", p), err) } 52299 if err := oprot.WriteFieldEnd(ctx); err != nil { 52300 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:data: ", p), err) } 52301 return err 52302 } 52303 52304 func (p *ApplySha3Args) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 52305 if err := oprot.WriteFieldBegin(ctx, "keccak", thrift.I32, 2); err != nil { 52306 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:keccak: ", p), err) } 52307 if err := oprot.WriteI32(ctx, int32(p.Keccak)); err != nil { 52308 return thrift.PrependError(fmt.Sprintf("%T.keccak (2) field write error: ", p), err) } 52309 if err := oprot.WriteFieldEnd(ctx); err != nil { 52310 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:keccak: ", p), err) } 52311 return err 52312 } 52313 52314 func (p *ApplySha3Args) String() string { 52315 if p == nil { 52316 return "<nil>" 52317 } 52318 return fmt.Sprintf("ApplySha3Args(%+v)", *p) 52319 } 52320 52321 // Attributes: 52322 // - Success 52323 type ApplySha3Result struct { 52324 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 52325 } 52326 52327 func NewApplySha3Result() *ApplySha3Result { 52328 return &ApplySha3Result{} 52329 } 52330 52331 var ApplySha3Result_Success_DEFAULT []byte 52332 52333 func (p *ApplySha3Result) GetSuccess() []byte { 52334 return p.Success 52335 } 52336 func (p *ApplySha3Result) IsSetSuccess() bool { 52337 return p.Success != nil 52338 } 52339 52340 func (p *ApplySha3Result) Read(ctx context.Context, iprot thrift.TProtocol) error { 52341 if _, err := iprot.ReadStructBegin(ctx); err != nil { 52342 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 52343 } 52344 52345 52346 for { 52347 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 52348 if err != nil { 52349 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 52350 } 52351 if fieldTypeId == thrift.STOP { break; } 52352 switch fieldId { 52353 case 0: 52354 if fieldTypeId == thrift.STRING { 52355 if err := p.ReadField0(ctx, iprot); err != nil { 52356 return err 52357 } 52358 } else { 52359 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52360 return err 52361 } 52362 } 52363 default: 52364 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52365 return err 52366 } 52367 } 52368 if err := iprot.ReadFieldEnd(ctx); err != nil { 52369 return err 52370 } 52371 } 52372 if err := iprot.ReadStructEnd(ctx); err != nil { 52373 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 52374 } 52375 return nil 52376 } 52377 52378 func (p *ApplySha3Result) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 52379 if v, err := iprot.ReadBinary(ctx); err != nil { 52380 return thrift.PrependError("error reading field 0: ", err) 52381 } else { 52382 p.Success = v 52383 } 52384 return nil 52385 } 52386 52387 func (p *ApplySha3Result) Write(ctx context.Context, oprot thrift.TProtocol) error { 52388 if err := oprot.WriteStructBegin(ctx, "sha3_result"); err != nil { 52389 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 52390 if p != nil { 52391 if err := p.writeField0(ctx, oprot); err != nil { return err } 52392 } 52393 if err := oprot.WriteFieldStop(ctx); err != nil { 52394 return thrift.PrependError("write field stop error: ", err) } 52395 if err := oprot.WriteStructEnd(ctx); err != nil { 52396 return thrift.PrependError("write struct stop error: ", err) } 52397 return nil 52398 } 52399 52400 func (p *ApplySha3Result) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 52401 if p.IsSetSuccess() { 52402 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 52403 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 52404 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 52405 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 52406 if err := oprot.WriteFieldEnd(ctx); err != nil { 52407 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 52408 } 52409 return err 52410 } 52411 52412 func (p *ApplySha3Result) String() string { 52413 if p == nil { 52414 return "<nil>" 52415 } 52416 return fmt.Sprintf("ApplySha3Result(%+v)", *p) 52417 } 52418 52419 // Attributes: 52420 // - Rounds 52421 // - State 52422 // - Msg 52423 // - T0Offset 52424 // - T1Offset 52425 // - Final 52426 type ApplyBlake2FArgs struct { 52427 Rounds int64 `thrift:"rounds,1" db:"rounds" json:"rounds"` 52428 State []byte `thrift:"state,2" db:"state" json:"state"` 52429 Msg []byte `thrift:"msg,3" db:"msg" json:"msg"` 52430 T0Offset []byte `thrift:"t0_offset,4" db:"t0_offset" json:"t0_offset"` 52431 T1Offset []byte `thrift:"t1_offset,5" db:"t1_offset" json:"t1_offset"` 52432 Final int32 `thrift:"final,6" db:"final" json:"final"` 52433 } 52434 52435 func NewApplyBlake2FArgs() *ApplyBlake2FArgs { 52436 return &ApplyBlake2FArgs{} 52437 } 52438 52439 52440 func (p *ApplyBlake2FArgs) GetRounds() int64 { 52441 return p.Rounds 52442 } 52443 52444 func (p *ApplyBlake2FArgs) GetState() []byte { 52445 return p.State 52446 } 52447 52448 func (p *ApplyBlake2FArgs) GetMsg() []byte { 52449 return p.Msg 52450 } 52451 52452 func (p *ApplyBlake2FArgs) GetT0Offset() []byte { 52453 return p.T0Offset 52454 } 52455 52456 func (p *ApplyBlake2FArgs) GetT1Offset() []byte { 52457 return p.T1Offset 52458 } 52459 52460 func (p *ApplyBlake2FArgs) GetFinal() int32 { 52461 return p.Final 52462 } 52463 func (p *ApplyBlake2FArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 52464 if _, err := iprot.ReadStructBegin(ctx); err != nil { 52465 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 52466 } 52467 52468 52469 for { 52470 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 52471 if err != nil { 52472 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 52473 } 52474 if fieldTypeId == thrift.STOP { break; } 52475 switch fieldId { 52476 case 1: 52477 if fieldTypeId == thrift.I64 { 52478 if err := p.ReadField1(ctx, iprot); err != nil { 52479 return err 52480 } 52481 } else { 52482 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52483 return err 52484 } 52485 } 52486 case 2: 52487 if fieldTypeId == thrift.STRING { 52488 if err := p.ReadField2(ctx, iprot); err != nil { 52489 return err 52490 } 52491 } else { 52492 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52493 return err 52494 } 52495 } 52496 case 3: 52497 if fieldTypeId == thrift.STRING { 52498 if err := p.ReadField3(ctx, iprot); err != nil { 52499 return err 52500 } 52501 } else { 52502 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52503 return err 52504 } 52505 } 52506 case 4: 52507 if fieldTypeId == thrift.STRING { 52508 if err := p.ReadField4(ctx, iprot); err != nil { 52509 return err 52510 } 52511 } else { 52512 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52513 return err 52514 } 52515 } 52516 case 5: 52517 if fieldTypeId == thrift.STRING { 52518 if err := p.ReadField5(ctx, iprot); err != nil { 52519 return err 52520 } 52521 } else { 52522 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52523 return err 52524 } 52525 } 52526 case 6: 52527 if fieldTypeId == thrift.I32 { 52528 if err := p.ReadField6(ctx, iprot); err != nil { 52529 return err 52530 } 52531 } else { 52532 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52533 return err 52534 } 52535 } 52536 default: 52537 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52538 return err 52539 } 52540 } 52541 if err := iprot.ReadFieldEnd(ctx); err != nil { 52542 return err 52543 } 52544 } 52545 if err := iprot.ReadStructEnd(ctx); err != nil { 52546 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 52547 } 52548 return nil 52549 } 52550 52551 func (p *ApplyBlake2FArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 52552 if v, err := iprot.ReadI64(ctx); err != nil { 52553 return thrift.PrependError("error reading field 1: ", err) 52554 } else { 52555 p.Rounds = v 52556 } 52557 return nil 52558 } 52559 52560 func (p *ApplyBlake2FArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 52561 if v, err := iprot.ReadBinary(ctx); err != nil { 52562 return thrift.PrependError("error reading field 2: ", err) 52563 } else { 52564 p.State = v 52565 } 52566 return nil 52567 } 52568 52569 func (p *ApplyBlake2FArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 52570 if v, err := iprot.ReadBinary(ctx); err != nil { 52571 return thrift.PrependError("error reading field 3: ", err) 52572 } else { 52573 p.Msg = v 52574 } 52575 return nil 52576 } 52577 52578 func (p *ApplyBlake2FArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { 52579 if v, err := iprot.ReadBinary(ctx); err != nil { 52580 return thrift.PrependError("error reading field 4: ", err) 52581 } else { 52582 p.T0Offset = v 52583 } 52584 return nil 52585 } 52586 52587 func (p *ApplyBlake2FArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { 52588 if v, err := iprot.ReadBinary(ctx); err != nil { 52589 return thrift.PrependError("error reading field 5: ", err) 52590 } else { 52591 p.T1Offset = v 52592 } 52593 return nil 52594 } 52595 52596 func (p *ApplyBlake2FArgs) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { 52597 if v, err := iprot.ReadI32(ctx); err != nil { 52598 return thrift.PrependError("error reading field 6: ", err) 52599 } else { 52600 p.Final = v 52601 } 52602 return nil 52603 } 52604 52605 func (p *ApplyBlake2FArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 52606 if err := oprot.WriteStructBegin(ctx, "blake2_f_args"); err != nil { 52607 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 52608 if p != nil { 52609 if err := p.writeField1(ctx, oprot); err != nil { return err } 52610 if err := p.writeField2(ctx, oprot); err != nil { return err } 52611 if err := p.writeField3(ctx, oprot); err != nil { return err } 52612 if err := p.writeField4(ctx, oprot); err != nil { return err } 52613 if err := p.writeField5(ctx, oprot); err != nil { return err } 52614 if err := p.writeField6(ctx, oprot); err != nil { return err } 52615 } 52616 if err := oprot.WriteFieldStop(ctx); err != nil { 52617 return thrift.PrependError("write field stop error: ", err) } 52618 if err := oprot.WriteStructEnd(ctx); err != nil { 52619 return thrift.PrependError("write struct stop error: ", err) } 52620 return nil 52621 } 52622 52623 func (p *ApplyBlake2FArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 52624 if err := oprot.WriteFieldBegin(ctx, "rounds", thrift.I64, 1); err != nil { 52625 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:rounds: ", p), err) } 52626 if err := oprot.WriteI64(ctx, int64(p.Rounds)); err != nil { 52627 return thrift.PrependError(fmt.Sprintf("%T.rounds (1) field write error: ", p), err) } 52628 if err := oprot.WriteFieldEnd(ctx); err != nil { 52629 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:rounds: ", p), err) } 52630 return err 52631 } 52632 52633 func (p *ApplyBlake2FArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 52634 if err := oprot.WriteFieldBegin(ctx, "state", thrift.STRING, 2); err != nil { 52635 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:state: ", p), err) } 52636 if err := oprot.WriteBinary(ctx, p.State); err != nil { 52637 return thrift.PrependError(fmt.Sprintf("%T.state (2) field write error: ", p), err) } 52638 if err := oprot.WriteFieldEnd(ctx); err != nil { 52639 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:state: ", p), err) } 52640 return err 52641 } 52642 52643 func (p *ApplyBlake2FArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 52644 if err := oprot.WriteFieldBegin(ctx, "msg", thrift.STRING, 3); err != nil { 52645 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:msg: ", p), err) } 52646 if err := oprot.WriteBinary(ctx, p.Msg); err != nil { 52647 return thrift.PrependError(fmt.Sprintf("%T.msg (3) field write error: ", p), err) } 52648 if err := oprot.WriteFieldEnd(ctx); err != nil { 52649 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:msg: ", p), err) } 52650 return err 52651 } 52652 52653 func (p *ApplyBlake2FArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { 52654 if err := oprot.WriteFieldBegin(ctx, "t0_offset", thrift.STRING, 4); err != nil { 52655 return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:t0_offset: ", p), err) } 52656 if err := oprot.WriteBinary(ctx, p.T0Offset); err != nil { 52657 return thrift.PrependError(fmt.Sprintf("%T.t0_offset (4) field write error: ", p), err) } 52658 if err := oprot.WriteFieldEnd(ctx); err != nil { 52659 return thrift.PrependError(fmt.Sprintf("%T write field end error 4:t0_offset: ", p), err) } 52660 return err 52661 } 52662 52663 func (p *ApplyBlake2FArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { 52664 if err := oprot.WriteFieldBegin(ctx, "t1_offset", thrift.STRING, 5); err != nil { 52665 return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:t1_offset: ", p), err) } 52666 if err := oprot.WriteBinary(ctx, p.T1Offset); err != nil { 52667 return thrift.PrependError(fmt.Sprintf("%T.t1_offset (5) field write error: ", p), err) } 52668 if err := oprot.WriteFieldEnd(ctx); err != nil { 52669 return thrift.PrependError(fmt.Sprintf("%T write field end error 5:t1_offset: ", p), err) } 52670 return err 52671 } 52672 52673 func (p *ApplyBlake2FArgs) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { 52674 if err := oprot.WriteFieldBegin(ctx, "final", thrift.I32, 6); err != nil { 52675 return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:final: ", p), err) } 52676 if err := oprot.WriteI32(ctx, int32(p.Final)); err != nil { 52677 return thrift.PrependError(fmt.Sprintf("%T.final (6) field write error: ", p), err) } 52678 if err := oprot.WriteFieldEnd(ctx); err != nil { 52679 return thrift.PrependError(fmt.Sprintf("%T write field end error 6:final: ", p), err) } 52680 return err 52681 } 52682 52683 func (p *ApplyBlake2FArgs) String() string { 52684 if p == nil { 52685 return "<nil>" 52686 } 52687 return fmt.Sprintf("ApplyBlake2FArgs(%+v)", *p) 52688 } 52689 52690 // Attributes: 52691 // - Success 52692 type ApplyBlake2FResult struct { 52693 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 52694 } 52695 52696 func NewApplyBlake2FResult() *ApplyBlake2FResult { 52697 return &ApplyBlake2FResult{} 52698 } 52699 52700 var ApplyBlake2FResult_Success_DEFAULT []byte 52701 52702 func (p *ApplyBlake2FResult) GetSuccess() []byte { 52703 return p.Success 52704 } 52705 func (p *ApplyBlake2FResult) IsSetSuccess() bool { 52706 return p.Success != nil 52707 } 52708 52709 func (p *ApplyBlake2FResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 52710 if _, err := iprot.ReadStructBegin(ctx); err != nil { 52711 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 52712 } 52713 52714 52715 for { 52716 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 52717 if err != nil { 52718 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 52719 } 52720 if fieldTypeId == thrift.STOP { break; } 52721 switch fieldId { 52722 case 0: 52723 if fieldTypeId == thrift.STRING { 52724 if err := p.ReadField0(ctx, iprot); err != nil { 52725 return err 52726 } 52727 } else { 52728 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52729 return err 52730 } 52731 } 52732 default: 52733 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52734 return err 52735 } 52736 } 52737 if err := iprot.ReadFieldEnd(ctx); err != nil { 52738 return err 52739 } 52740 } 52741 if err := iprot.ReadStructEnd(ctx); err != nil { 52742 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 52743 } 52744 return nil 52745 } 52746 52747 func (p *ApplyBlake2FResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 52748 if v, err := iprot.ReadBinary(ctx); err != nil { 52749 return thrift.PrependError("error reading field 0: ", err) 52750 } else { 52751 p.Success = v 52752 } 52753 return nil 52754 } 52755 52756 func (p *ApplyBlake2FResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 52757 if err := oprot.WriteStructBegin(ctx, "blake2_f_result"); err != nil { 52758 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 52759 if p != nil { 52760 if err := p.writeField0(ctx, oprot); err != nil { return err } 52761 } 52762 if err := oprot.WriteFieldStop(ctx); err != nil { 52763 return thrift.PrependError("write field stop error: ", err) } 52764 if err := oprot.WriteStructEnd(ctx); err != nil { 52765 return thrift.PrependError("write struct stop error: ", err) } 52766 return nil 52767 } 52768 52769 func (p *ApplyBlake2FResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 52770 if p.IsSetSuccess() { 52771 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 52772 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 52773 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 52774 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 52775 if err := oprot.WriteFieldEnd(ctx); err != nil { 52776 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 52777 } 52778 return err 52779 } 52780 52781 func (p *ApplyBlake2FResult) String() string { 52782 if p == nil { 52783 return "<nil>" 52784 } 52785 return fmt.Sprintf("ApplyBlake2FResult(%+v)", *p) 52786 } 52787 52788 // Attributes: 52789 // - Sig 52790 // - Dig 52791 type ApplyK1RecoverArgs struct { 52792 Sig []byte `thrift:"sig,1" db:"sig" json:"sig"` 52793 Dig []byte `thrift:"dig,2" db:"dig" json:"dig"` 52794 } 52795 52796 func NewApplyK1RecoverArgs() *ApplyK1RecoverArgs { 52797 return &ApplyK1RecoverArgs{} 52798 } 52799 52800 52801 func (p *ApplyK1RecoverArgs) GetSig() []byte { 52802 return p.Sig 52803 } 52804 52805 func (p *ApplyK1RecoverArgs) GetDig() []byte { 52806 return p.Dig 52807 } 52808 func (p *ApplyK1RecoverArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 52809 if _, err := iprot.ReadStructBegin(ctx); err != nil { 52810 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 52811 } 52812 52813 52814 for { 52815 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 52816 if err != nil { 52817 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 52818 } 52819 if fieldTypeId == thrift.STOP { break; } 52820 switch fieldId { 52821 case 1: 52822 if fieldTypeId == thrift.STRING { 52823 if err := p.ReadField1(ctx, iprot); err != nil { 52824 return err 52825 } 52826 } else { 52827 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52828 return err 52829 } 52830 } 52831 case 2: 52832 if fieldTypeId == thrift.STRING { 52833 if err := p.ReadField2(ctx, iprot); err != nil { 52834 return err 52835 } 52836 } else { 52837 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52838 return err 52839 } 52840 } 52841 default: 52842 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52843 return err 52844 } 52845 } 52846 if err := iprot.ReadFieldEnd(ctx); err != nil { 52847 return err 52848 } 52849 } 52850 if err := iprot.ReadStructEnd(ctx); err != nil { 52851 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 52852 } 52853 return nil 52854 } 52855 52856 func (p *ApplyK1RecoverArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 52857 if v, err := iprot.ReadBinary(ctx); err != nil { 52858 return thrift.PrependError("error reading field 1: ", err) 52859 } else { 52860 p.Sig = v 52861 } 52862 return nil 52863 } 52864 52865 func (p *ApplyK1RecoverArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 52866 if v, err := iprot.ReadBinary(ctx); err != nil { 52867 return thrift.PrependError("error reading field 2: ", err) 52868 } else { 52869 p.Dig = v 52870 } 52871 return nil 52872 } 52873 52874 func (p *ApplyK1RecoverArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 52875 if err := oprot.WriteStructBegin(ctx, "k1_recover_args"); err != nil { 52876 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 52877 if p != nil { 52878 if err := p.writeField1(ctx, oprot); err != nil { return err } 52879 if err := p.writeField2(ctx, oprot); err != nil { return err } 52880 } 52881 if err := oprot.WriteFieldStop(ctx); err != nil { 52882 return thrift.PrependError("write field stop error: ", err) } 52883 if err := oprot.WriteStructEnd(ctx); err != nil { 52884 return thrift.PrependError("write struct stop error: ", err) } 52885 return nil 52886 } 52887 52888 func (p *ApplyK1RecoverArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 52889 if err := oprot.WriteFieldBegin(ctx, "sig", thrift.STRING, 1); err != nil { 52890 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:sig: ", p), err) } 52891 if err := oprot.WriteBinary(ctx, p.Sig); err != nil { 52892 return thrift.PrependError(fmt.Sprintf("%T.sig (1) field write error: ", p), err) } 52893 if err := oprot.WriteFieldEnd(ctx); err != nil { 52894 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:sig: ", p), err) } 52895 return err 52896 } 52897 52898 func (p *ApplyK1RecoverArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 52899 if err := oprot.WriteFieldBegin(ctx, "dig", thrift.STRING, 2); err != nil { 52900 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:dig: ", p), err) } 52901 if err := oprot.WriteBinary(ctx, p.Dig); err != nil { 52902 return thrift.PrependError(fmt.Sprintf("%T.dig (2) field write error: ", p), err) } 52903 if err := oprot.WriteFieldEnd(ctx); err != nil { 52904 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:dig: ", p), err) } 52905 return err 52906 } 52907 52908 func (p *ApplyK1RecoverArgs) String() string { 52909 if p == nil { 52910 return "<nil>" 52911 } 52912 return fmt.Sprintf("ApplyK1RecoverArgs(%+v)", *p) 52913 } 52914 52915 // Attributes: 52916 // - Success 52917 type ApplyK1RecoverResult struct { 52918 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 52919 } 52920 52921 func NewApplyK1RecoverResult() *ApplyK1RecoverResult { 52922 return &ApplyK1RecoverResult{} 52923 } 52924 52925 var ApplyK1RecoverResult_Success_DEFAULT []byte 52926 52927 func (p *ApplyK1RecoverResult) GetSuccess() []byte { 52928 return p.Success 52929 } 52930 func (p *ApplyK1RecoverResult) IsSetSuccess() bool { 52931 return p.Success != nil 52932 } 52933 52934 func (p *ApplyK1RecoverResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 52935 if _, err := iprot.ReadStructBegin(ctx); err != nil { 52936 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 52937 } 52938 52939 52940 for { 52941 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 52942 if err != nil { 52943 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 52944 } 52945 if fieldTypeId == thrift.STOP { break; } 52946 switch fieldId { 52947 case 0: 52948 if fieldTypeId == thrift.STRING { 52949 if err := p.ReadField0(ctx, iprot); err != nil { 52950 return err 52951 } 52952 } else { 52953 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52954 return err 52955 } 52956 } 52957 default: 52958 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 52959 return err 52960 } 52961 } 52962 if err := iprot.ReadFieldEnd(ctx); err != nil { 52963 return err 52964 } 52965 } 52966 if err := iprot.ReadStructEnd(ctx); err != nil { 52967 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 52968 } 52969 return nil 52970 } 52971 52972 func (p *ApplyK1RecoverResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 52973 if v, err := iprot.ReadBinary(ctx); err != nil { 52974 return thrift.PrependError("error reading field 0: ", err) 52975 } else { 52976 p.Success = v 52977 } 52978 return nil 52979 } 52980 52981 func (p *ApplyK1RecoverResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 52982 if err := oprot.WriteStructBegin(ctx, "k1_recover_result"); err != nil { 52983 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 52984 if p != nil { 52985 if err := p.writeField0(ctx, oprot); err != nil { return err } 52986 } 52987 if err := oprot.WriteFieldStop(ctx); err != nil { 52988 return thrift.PrependError("write field stop error: ", err) } 52989 if err := oprot.WriteStructEnd(ctx); err != nil { 52990 return thrift.PrependError("write struct stop error: ", err) } 52991 return nil 52992 } 52993 52994 func (p *ApplyK1RecoverResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 52995 if p.IsSetSuccess() { 52996 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 52997 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 52998 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 52999 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 53000 if err := oprot.WriteFieldEnd(ctx); err != nil { 53001 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 53002 } 53003 return err 53004 } 53005 53006 func (p *ApplyK1RecoverResult) String() string { 53007 if p == nil { 53008 return "<nil>" 53009 } 53010 return fmt.Sprintf("ApplyK1RecoverResult(%+v)", *p) 53011 } 53012 53013 // Attributes: 53014 // - Op1 53015 // - Op2 53016 type ApplyAltBn128AddArgs struct { 53017 Op1 []byte `thrift:"op1,1" db:"op1" json:"op1"` 53018 Op2 []byte `thrift:"op2,2" db:"op2" json:"op2"` 53019 } 53020 53021 func NewApplyAltBn128AddArgs() *ApplyAltBn128AddArgs { 53022 return &ApplyAltBn128AddArgs{} 53023 } 53024 53025 53026 func (p *ApplyAltBn128AddArgs) GetOp1() []byte { 53027 return p.Op1 53028 } 53029 53030 func (p *ApplyAltBn128AddArgs) GetOp2() []byte { 53031 return p.Op2 53032 } 53033 func (p *ApplyAltBn128AddArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 53034 if _, err := iprot.ReadStructBegin(ctx); err != nil { 53035 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 53036 } 53037 53038 53039 for { 53040 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 53041 if err != nil { 53042 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 53043 } 53044 if fieldTypeId == thrift.STOP { break; } 53045 switch fieldId { 53046 case 1: 53047 if fieldTypeId == thrift.STRING { 53048 if err := p.ReadField1(ctx, iprot); err != nil { 53049 return err 53050 } 53051 } else { 53052 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53053 return err 53054 } 53055 } 53056 case 2: 53057 if fieldTypeId == thrift.STRING { 53058 if err := p.ReadField2(ctx, iprot); err != nil { 53059 return err 53060 } 53061 } else { 53062 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53063 return err 53064 } 53065 } 53066 default: 53067 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53068 return err 53069 } 53070 } 53071 if err := iprot.ReadFieldEnd(ctx); err != nil { 53072 return err 53073 } 53074 } 53075 if err := iprot.ReadStructEnd(ctx); err != nil { 53076 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 53077 } 53078 return nil 53079 } 53080 53081 func (p *ApplyAltBn128AddArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 53082 if v, err := iprot.ReadBinary(ctx); err != nil { 53083 return thrift.PrependError("error reading field 1: ", err) 53084 } else { 53085 p.Op1 = v 53086 } 53087 return nil 53088 } 53089 53090 func (p *ApplyAltBn128AddArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 53091 if v, err := iprot.ReadBinary(ctx); err != nil { 53092 return thrift.PrependError("error reading field 2: ", err) 53093 } else { 53094 p.Op2 = v 53095 } 53096 return nil 53097 } 53098 53099 func (p *ApplyAltBn128AddArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 53100 if err := oprot.WriteStructBegin(ctx, "alt_bn128_add_args"); err != nil { 53101 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 53102 if p != nil { 53103 if err := p.writeField1(ctx, oprot); err != nil { return err } 53104 if err := p.writeField2(ctx, oprot); err != nil { return err } 53105 } 53106 if err := oprot.WriteFieldStop(ctx); err != nil { 53107 return thrift.PrependError("write field stop error: ", err) } 53108 if err := oprot.WriteStructEnd(ctx); err != nil { 53109 return thrift.PrependError("write struct stop error: ", err) } 53110 return nil 53111 } 53112 53113 func (p *ApplyAltBn128AddArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 53114 if err := oprot.WriteFieldBegin(ctx, "op1", thrift.STRING, 1); err != nil { 53115 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:op1: ", p), err) } 53116 if err := oprot.WriteBinary(ctx, p.Op1); err != nil { 53117 return thrift.PrependError(fmt.Sprintf("%T.op1 (1) field write error: ", p), err) } 53118 if err := oprot.WriteFieldEnd(ctx); err != nil { 53119 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:op1: ", p), err) } 53120 return err 53121 } 53122 53123 func (p *ApplyAltBn128AddArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 53124 if err := oprot.WriteFieldBegin(ctx, "op2", thrift.STRING, 2); err != nil { 53125 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:op2: ", p), err) } 53126 if err := oprot.WriteBinary(ctx, p.Op2); err != nil { 53127 return thrift.PrependError(fmt.Sprintf("%T.op2 (2) field write error: ", p), err) } 53128 if err := oprot.WriteFieldEnd(ctx); err != nil { 53129 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:op2: ", p), err) } 53130 return err 53131 } 53132 53133 func (p *ApplyAltBn128AddArgs) String() string { 53134 if p == nil { 53135 return "<nil>" 53136 } 53137 return fmt.Sprintf("ApplyAltBn128AddArgs(%+v)", *p) 53138 } 53139 53140 // Attributes: 53141 // - Success 53142 type ApplyAltBn128AddResult struct { 53143 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 53144 } 53145 53146 func NewApplyAltBn128AddResult() *ApplyAltBn128AddResult { 53147 return &ApplyAltBn128AddResult{} 53148 } 53149 53150 var ApplyAltBn128AddResult_Success_DEFAULT []byte 53151 53152 func (p *ApplyAltBn128AddResult) GetSuccess() []byte { 53153 return p.Success 53154 } 53155 func (p *ApplyAltBn128AddResult) IsSetSuccess() bool { 53156 return p.Success != nil 53157 } 53158 53159 func (p *ApplyAltBn128AddResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 53160 if _, err := iprot.ReadStructBegin(ctx); err != nil { 53161 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 53162 } 53163 53164 53165 for { 53166 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 53167 if err != nil { 53168 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 53169 } 53170 if fieldTypeId == thrift.STOP { break; } 53171 switch fieldId { 53172 case 0: 53173 if fieldTypeId == thrift.STRING { 53174 if err := p.ReadField0(ctx, iprot); err != nil { 53175 return err 53176 } 53177 } else { 53178 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53179 return err 53180 } 53181 } 53182 default: 53183 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53184 return err 53185 } 53186 } 53187 if err := iprot.ReadFieldEnd(ctx); err != nil { 53188 return err 53189 } 53190 } 53191 if err := iprot.ReadStructEnd(ctx); err != nil { 53192 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 53193 } 53194 return nil 53195 } 53196 53197 func (p *ApplyAltBn128AddResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 53198 if v, err := iprot.ReadBinary(ctx); err != nil { 53199 return thrift.PrependError("error reading field 0: ", err) 53200 } else { 53201 p.Success = v 53202 } 53203 return nil 53204 } 53205 53206 func (p *ApplyAltBn128AddResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 53207 if err := oprot.WriteStructBegin(ctx, "alt_bn128_add_result"); err != nil { 53208 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 53209 if p != nil { 53210 if err := p.writeField0(ctx, oprot); err != nil { return err } 53211 } 53212 if err := oprot.WriteFieldStop(ctx); err != nil { 53213 return thrift.PrependError("write field stop error: ", err) } 53214 if err := oprot.WriteStructEnd(ctx); err != nil { 53215 return thrift.PrependError("write struct stop error: ", err) } 53216 return nil 53217 } 53218 53219 func (p *ApplyAltBn128AddResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 53220 if p.IsSetSuccess() { 53221 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 53222 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 53223 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 53224 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 53225 if err := oprot.WriteFieldEnd(ctx); err != nil { 53226 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 53227 } 53228 return err 53229 } 53230 53231 func (p *ApplyAltBn128AddResult) String() string { 53232 if p == nil { 53233 return "<nil>" 53234 } 53235 return fmt.Sprintf("ApplyAltBn128AddResult(%+v)", *p) 53236 } 53237 53238 // Attributes: 53239 // - G1 53240 // - Scalar 53241 type ApplyAltBn128MulArgs struct { 53242 G1 []byte `thrift:"g1,1" db:"g1" json:"g1"` 53243 Scalar []byte `thrift:"scalar,2" db:"scalar" json:"scalar"` 53244 } 53245 53246 func NewApplyAltBn128MulArgs() *ApplyAltBn128MulArgs { 53247 return &ApplyAltBn128MulArgs{} 53248 } 53249 53250 53251 func (p *ApplyAltBn128MulArgs) GetG1() []byte { 53252 return p.G1 53253 } 53254 53255 func (p *ApplyAltBn128MulArgs) GetScalar() []byte { 53256 return p.Scalar 53257 } 53258 func (p *ApplyAltBn128MulArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 53259 if _, err := iprot.ReadStructBegin(ctx); err != nil { 53260 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 53261 } 53262 53263 53264 for { 53265 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 53266 if err != nil { 53267 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 53268 } 53269 if fieldTypeId == thrift.STOP { break; } 53270 switch fieldId { 53271 case 1: 53272 if fieldTypeId == thrift.STRING { 53273 if err := p.ReadField1(ctx, iprot); err != nil { 53274 return err 53275 } 53276 } else { 53277 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53278 return err 53279 } 53280 } 53281 case 2: 53282 if fieldTypeId == thrift.STRING { 53283 if err := p.ReadField2(ctx, iprot); err != nil { 53284 return err 53285 } 53286 } else { 53287 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53288 return err 53289 } 53290 } 53291 default: 53292 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53293 return err 53294 } 53295 } 53296 if err := iprot.ReadFieldEnd(ctx); err != nil { 53297 return err 53298 } 53299 } 53300 if err := iprot.ReadStructEnd(ctx); err != nil { 53301 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 53302 } 53303 return nil 53304 } 53305 53306 func (p *ApplyAltBn128MulArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 53307 if v, err := iprot.ReadBinary(ctx); err != nil { 53308 return thrift.PrependError("error reading field 1: ", err) 53309 } else { 53310 p.G1 = v 53311 } 53312 return nil 53313 } 53314 53315 func (p *ApplyAltBn128MulArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 53316 if v, err := iprot.ReadBinary(ctx); err != nil { 53317 return thrift.PrependError("error reading field 2: ", err) 53318 } else { 53319 p.Scalar = v 53320 } 53321 return nil 53322 } 53323 53324 func (p *ApplyAltBn128MulArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 53325 if err := oprot.WriteStructBegin(ctx, "alt_bn128_mul_args"); err != nil { 53326 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 53327 if p != nil { 53328 if err := p.writeField1(ctx, oprot); err != nil { return err } 53329 if err := p.writeField2(ctx, oprot); err != nil { return err } 53330 } 53331 if err := oprot.WriteFieldStop(ctx); err != nil { 53332 return thrift.PrependError("write field stop error: ", err) } 53333 if err := oprot.WriteStructEnd(ctx); err != nil { 53334 return thrift.PrependError("write struct stop error: ", err) } 53335 return nil 53336 } 53337 53338 func (p *ApplyAltBn128MulArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 53339 if err := oprot.WriteFieldBegin(ctx, "g1", thrift.STRING, 1); err != nil { 53340 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:g1: ", p), err) } 53341 if err := oprot.WriteBinary(ctx, p.G1); err != nil { 53342 return thrift.PrependError(fmt.Sprintf("%T.g1 (1) field write error: ", p), err) } 53343 if err := oprot.WriteFieldEnd(ctx); err != nil { 53344 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:g1: ", p), err) } 53345 return err 53346 } 53347 53348 func (p *ApplyAltBn128MulArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 53349 if err := oprot.WriteFieldBegin(ctx, "scalar", thrift.STRING, 2); err != nil { 53350 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:scalar: ", p), err) } 53351 if err := oprot.WriteBinary(ctx, p.Scalar); err != nil { 53352 return thrift.PrependError(fmt.Sprintf("%T.scalar (2) field write error: ", p), err) } 53353 if err := oprot.WriteFieldEnd(ctx); err != nil { 53354 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:scalar: ", p), err) } 53355 return err 53356 } 53357 53358 func (p *ApplyAltBn128MulArgs) String() string { 53359 if p == nil { 53360 return "<nil>" 53361 } 53362 return fmt.Sprintf("ApplyAltBn128MulArgs(%+v)", *p) 53363 } 53364 53365 // Attributes: 53366 // - Success 53367 type ApplyAltBn128MulResult struct { 53368 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 53369 } 53370 53371 func NewApplyAltBn128MulResult() *ApplyAltBn128MulResult { 53372 return &ApplyAltBn128MulResult{} 53373 } 53374 53375 var ApplyAltBn128MulResult_Success_DEFAULT []byte 53376 53377 func (p *ApplyAltBn128MulResult) GetSuccess() []byte { 53378 return p.Success 53379 } 53380 func (p *ApplyAltBn128MulResult) IsSetSuccess() bool { 53381 return p.Success != nil 53382 } 53383 53384 func (p *ApplyAltBn128MulResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 53385 if _, err := iprot.ReadStructBegin(ctx); err != nil { 53386 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 53387 } 53388 53389 53390 for { 53391 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 53392 if err != nil { 53393 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 53394 } 53395 if fieldTypeId == thrift.STOP { break; } 53396 switch fieldId { 53397 case 0: 53398 if fieldTypeId == thrift.STRING { 53399 if err := p.ReadField0(ctx, iprot); err != nil { 53400 return err 53401 } 53402 } else { 53403 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53404 return err 53405 } 53406 } 53407 default: 53408 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53409 return err 53410 } 53411 } 53412 if err := iprot.ReadFieldEnd(ctx); err != nil { 53413 return err 53414 } 53415 } 53416 if err := iprot.ReadStructEnd(ctx); err != nil { 53417 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 53418 } 53419 return nil 53420 } 53421 53422 func (p *ApplyAltBn128MulResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 53423 if v, err := iprot.ReadBinary(ctx); err != nil { 53424 return thrift.PrependError("error reading field 0: ", err) 53425 } else { 53426 p.Success = v 53427 } 53428 return nil 53429 } 53430 53431 func (p *ApplyAltBn128MulResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 53432 if err := oprot.WriteStructBegin(ctx, "alt_bn128_mul_result"); err != nil { 53433 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 53434 if p != nil { 53435 if err := p.writeField0(ctx, oprot); err != nil { return err } 53436 } 53437 if err := oprot.WriteFieldStop(ctx); err != nil { 53438 return thrift.PrependError("write field stop error: ", err) } 53439 if err := oprot.WriteStructEnd(ctx); err != nil { 53440 return thrift.PrependError("write struct stop error: ", err) } 53441 return nil 53442 } 53443 53444 func (p *ApplyAltBn128MulResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 53445 if p.IsSetSuccess() { 53446 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 53447 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 53448 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 53449 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 53450 if err := oprot.WriteFieldEnd(ctx); err != nil { 53451 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 53452 } 53453 return err 53454 } 53455 53456 func (p *ApplyAltBn128MulResult) String() string { 53457 if p == nil { 53458 return "<nil>" 53459 } 53460 return fmt.Sprintf("ApplyAltBn128MulResult(%+v)", *p) 53461 } 53462 53463 // Attributes: 53464 // - Pairs 53465 type ApplyAltBn128PairArgs struct { 53466 Pairs []byte `thrift:"pairs,1" db:"pairs" json:"pairs"` 53467 } 53468 53469 func NewApplyAltBn128PairArgs() *ApplyAltBn128PairArgs { 53470 return &ApplyAltBn128PairArgs{} 53471 } 53472 53473 53474 func (p *ApplyAltBn128PairArgs) GetPairs() []byte { 53475 return p.Pairs 53476 } 53477 func (p *ApplyAltBn128PairArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 53478 if _, err := iprot.ReadStructBegin(ctx); err != nil { 53479 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 53480 } 53481 53482 53483 for { 53484 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 53485 if err != nil { 53486 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 53487 } 53488 if fieldTypeId == thrift.STOP { break; } 53489 switch fieldId { 53490 case 1: 53491 if fieldTypeId == thrift.STRING { 53492 if err := p.ReadField1(ctx, iprot); err != nil { 53493 return err 53494 } 53495 } else { 53496 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53497 return err 53498 } 53499 } 53500 default: 53501 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53502 return err 53503 } 53504 } 53505 if err := iprot.ReadFieldEnd(ctx); err != nil { 53506 return err 53507 } 53508 } 53509 if err := iprot.ReadStructEnd(ctx); err != nil { 53510 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 53511 } 53512 return nil 53513 } 53514 53515 func (p *ApplyAltBn128PairArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 53516 if v, err := iprot.ReadBinary(ctx); err != nil { 53517 return thrift.PrependError("error reading field 1: ", err) 53518 } else { 53519 p.Pairs = v 53520 } 53521 return nil 53522 } 53523 53524 func (p *ApplyAltBn128PairArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 53525 if err := oprot.WriteStructBegin(ctx, "alt_bn128_pair_args"); err != nil { 53526 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 53527 if p != nil { 53528 if err := p.writeField1(ctx, oprot); err != nil { return err } 53529 } 53530 if err := oprot.WriteFieldStop(ctx); err != nil { 53531 return thrift.PrependError("write field stop error: ", err) } 53532 if err := oprot.WriteStructEnd(ctx); err != nil { 53533 return thrift.PrependError("write struct stop error: ", err) } 53534 return nil 53535 } 53536 53537 func (p *ApplyAltBn128PairArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 53538 if err := oprot.WriteFieldBegin(ctx, "pairs", thrift.STRING, 1); err != nil { 53539 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pairs: ", p), err) } 53540 if err := oprot.WriteBinary(ctx, p.Pairs); err != nil { 53541 return thrift.PrependError(fmt.Sprintf("%T.pairs (1) field write error: ", p), err) } 53542 if err := oprot.WriteFieldEnd(ctx); err != nil { 53543 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pairs: ", p), err) } 53544 return err 53545 } 53546 53547 func (p *ApplyAltBn128PairArgs) String() string { 53548 if p == nil { 53549 return "<nil>" 53550 } 53551 return fmt.Sprintf("ApplyAltBn128PairArgs(%+v)", *p) 53552 } 53553 53554 // Attributes: 53555 // - Success 53556 type ApplyAltBn128PairResult struct { 53557 Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` 53558 } 53559 53560 func NewApplyAltBn128PairResult() *ApplyAltBn128PairResult { 53561 return &ApplyAltBn128PairResult{} 53562 } 53563 53564 var ApplyAltBn128PairResult_Success_DEFAULT int32 53565 func (p *ApplyAltBn128PairResult) GetSuccess() int32 { 53566 if !p.IsSetSuccess() { 53567 return ApplyAltBn128PairResult_Success_DEFAULT 53568 } 53569 return *p.Success 53570 } 53571 func (p *ApplyAltBn128PairResult) IsSetSuccess() bool { 53572 return p.Success != nil 53573 } 53574 53575 func (p *ApplyAltBn128PairResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 53576 if _, err := iprot.ReadStructBegin(ctx); err != nil { 53577 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 53578 } 53579 53580 53581 for { 53582 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 53583 if err != nil { 53584 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 53585 } 53586 if fieldTypeId == thrift.STOP { break; } 53587 switch fieldId { 53588 case 0: 53589 if fieldTypeId == thrift.I32 { 53590 if err := p.ReadField0(ctx, iprot); err != nil { 53591 return err 53592 } 53593 } else { 53594 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53595 return err 53596 } 53597 } 53598 default: 53599 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53600 return err 53601 } 53602 } 53603 if err := iprot.ReadFieldEnd(ctx); err != nil { 53604 return err 53605 } 53606 } 53607 if err := iprot.ReadStructEnd(ctx); err != nil { 53608 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 53609 } 53610 return nil 53611 } 53612 53613 func (p *ApplyAltBn128PairResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 53614 if v, err := iprot.ReadI32(ctx); err != nil { 53615 return thrift.PrependError("error reading field 0: ", err) 53616 } else { 53617 p.Success = &v 53618 } 53619 return nil 53620 } 53621 53622 func (p *ApplyAltBn128PairResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 53623 if err := oprot.WriteStructBegin(ctx, "alt_bn128_pair_result"); err != nil { 53624 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 53625 if p != nil { 53626 if err := p.writeField0(ctx, oprot); err != nil { return err } 53627 } 53628 if err := oprot.WriteFieldStop(ctx); err != nil { 53629 return thrift.PrependError("write field stop error: ", err) } 53630 if err := oprot.WriteStructEnd(ctx); err != nil { 53631 return thrift.PrependError("write struct stop error: ", err) } 53632 return nil 53633 } 53634 53635 func (p *ApplyAltBn128PairResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 53636 if p.IsSetSuccess() { 53637 if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { 53638 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 53639 if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { 53640 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 53641 if err := oprot.WriteFieldEnd(ctx); err != nil { 53642 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 53643 } 53644 return err 53645 } 53646 53647 func (p *ApplyAltBn128PairResult) String() string { 53648 if p == nil { 53649 return "<nil>" 53650 } 53651 return fmt.Sprintf("ApplyAltBn128PairResult(%+v)", *p) 53652 } 53653 53654 // Attributes: 53655 // - Base 53656 // - Exp 53657 // - Mod 53658 type ApplyModExpArgs struct { 53659 Base []byte `thrift:"base,1" db:"base" json:"base"` 53660 Exp []byte `thrift:"exp,2" db:"exp" json:"exp"` 53661 Mod []byte `thrift:"mod,3" db:"mod" json:"mod"` 53662 } 53663 53664 func NewApplyModExpArgs() *ApplyModExpArgs { 53665 return &ApplyModExpArgs{} 53666 } 53667 53668 53669 func (p *ApplyModExpArgs) GetBase() []byte { 53670 return p.Base 53671 } 53672 53673 func (p *ApplyModExpArgs) GetExp() []byte { 53674 return p.Exp 53675 } 53676 53677 func (p *ApplyModExpArgs) GetMod() []byte { 53678 return p.Mod 53679 } 53680 func (p *ApplyModExpArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { 53681 if _, err := iprot.ReadStructBegin(ctx); err != nil { 53682 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 53683 } 53684 53685 53686 for { 53687 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 53688 if err != nil { 53689 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 53690 } 53691 if fieldTypeId == thrift.STOP { break; } 53692 switch fieldId { 53693 case 1: 53694 if fieldTypeId == thrift.STRING { 53695 if err := p.ReadField1(ctx, iprot); err != nil { 53696 return err 53697 } 53698 } else { 53699 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53700 return err 53701 } 53702 } 53703 case 2: 53704 if fieldTypeId == thrift.STRING { 53705 if err := p.ReadField2(ctx, iprot); err != nil { 53706 return err 53707 } 53708 } else { 53709 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53710 return err 53711 } 53712 } 53713 case 3: 53714 if fieldTypeId == thrift.STRING { 53715 if err := p.ReadField3(ctx, iprot); err != nil { 53716 return err 53717 } 53718 } else { 53719 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53720 return err 53721 } 53722 } 53723 default: 53724 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53725 return err 53726 } 53727 } 53728 if err := iprot.ReadFieldEnd(ctx); err != nil { 53729 return err 53730 } 53731 } 53732 if err := iprot.ReadStructEnd(ctx); err != nil { 53733 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 53734 } 53735 return nil 53736 } 53737 53738 func (p *ApplyModExpArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { 53739 if v, err := iprot.ReadBinary(ctx); err != nil { 53740 return thrift.PrependError("error reading field 1: ", err) 53741 } else { 53742 p.Base = v 53743 } 53744 return nil 53745 } 53746 53747 func (p *ApplyModExpArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { 53748 if v, err := iprot.ReadBinary(ctx); err != nil { 53749 return thrift.PrependError("error reading field 2: ", err) 53750 } else { 53751 p.Exp = v 53752 } 53753 return nil 53754 } 53755 53756 func (p *ApplyModExpArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { 53757 if v, err := iprot.ReadBinary(ctx); err != nil { 53758 return thrift.PrependError("error reading field 3: ", err) 53759 } else { 53760 p.Mod = v 53761 } 53762 return nil 53763 } 53764 53765 func (p *ApplyModExpArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { 53766 if err := oprot.WriteStructBegin(ctx, "mod_exp_args"); err != nil { 53767 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 53768 if p != nil { 53769 if err := p.writeField1(ctx, oprot); err != nil { return err } 53770 if err := p.writeField2(ctx, oprot); err != nil { return err } 53771 if err := p.writeField3(ctx, oprot); err != nil { return err } 53772 } 53773 if err := oprot.WriteFieldStop(ctx); err != nil { 53774 return thrift.PrependError("write field stop error: ", err) } 53775 if err := oprot.WriteStructEnd(ctx); err != nil { 53776 return thrift.PrependError("write struct stop error: ", err) } 53777 return nil 53778 } 53779 53780 func (p *ApplyModExpArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { 53781 if err := oprot.WriteFieldBegin(ctx, "base", thrift.STRING, 1); err != nil { 53782 return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:base: ", p), err) } 53783 if err := oprot.WriteBinary(ctx, p.Base); err != nil { 53784 return thrift.PrependError(fmt.Sprintf("%T.base (1) field write error: ", p), err) } 53785 if err := oprot.WriteFieldEnd(ctx); err != nil { 53786 return thrift.PrependError(fmt.Sprintf("%T write field end error 1:base: ", p), err) } 53787 return err 53788 } 53789 53790 func (p *ApplyModExpArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { 53791 if err := oprot.WriteFieldBegin(ctx, "exp", thrift.STRING, 2); err != nil { 53792 return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:exp: ", p), err) } 53793 if err := oprot.WriteBinary(ctx, p.Exp); err != nil { 53794 return thrift.PrependError(fmt.Sprintf("%T.exp (2) field write error: ", p), err) } 53795 if err := oprot.WriteFieldEnd(ctx); err != nil { 53796 return thrift.PrependError(fmt.Sprintf("%T write field end error 2:exp: ", p), err) } 53797 return err 53798 } 53799 53800 func (p *ApplyModExpArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { 53801 if err := oprot.WriteFieldBegin(ctx, "mod", thrift.STRING, 3); err != nil { 53802 return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:mod: ", p), err) } 53803 if err := oprot.WriteBinary(ctx, p.Mod); err != nil { 53804 return thrift.PrependError(fmt.Sprintf("%T.mod (3) field write error: ", p), err) } 53805 if err := oprot.WriteFieldEnd(ctx); err != nil { 53806 return thrift.PrependError(fmt.Sprintf("%T write field end error 3:mod: ", p), err) } 53807 return err 53808 } 53809 53810 func (p *ApplyModExpArgs) String() string { 53811 if p == nil { 53812 return "<nil>" 53813 } 53814 return fmt.Sprintf("ApplyModExpArgs(%+v)", *p) 53815 } 53816 53817 // Attributes: 53818 // - Success 53819 type ApplyModExpResult struct { 53820 Success []byte `thrift:"success,0" db:"success" json:"success,omitempty"` 53821 } 53822 53823 func NewApplyModExpResult() *ApplyModExpResult { 53824 return &ApplyModExpResult{} 53825 } 53826 53827 var ApplyModExpResult_Success_DEFAULT []byte 53828 53829 func (p *ApplyModExpResult) GetSuccess() []byte { 53830 return p.Success 53831 } 53832 func (p *ApplyModExpResult) IsSetSuccess() bool { 53833 return p.Success != nil 53834 } 53835 53836 func (p *ApplyModExpResult) Read(ctx context.Context, iprot thrift.TProtocol) error { 53837 if _, err := iprot.ReadStructBegin(ctx); err != nil { 53838 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) 53839 } 53840 53841 53842 for { 53843 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) 53844 if err != nil { 53845 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) 53846 } 53847 if fieldTypeId == thrift.STOP { break; } 53848 switch fieldId { 53849 case 0: 53850 if fieldTypeId == thrift.STRING { 53851 if err := p.ReadField0(ctx, iprot); err != nil { 53852 return err 53853 } 53854 } else { 53855 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53856 return err 53857 } 53858 } 53859 default: 53860 if err := iprot.Skip(ctx, fieldTypeId); err != nil { 53861 return err 53862 } 53863 } 53864 if err := iprot.ReadFieldEnd(ctx); err != nil { 53865 return err 53866 } 53867 } 53868 if err := iprot.ReadStructEnd(ctx); err != nil { 53869 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) 53870 } 53871 return nil 53872 } 53873 53874 func (p *ApplyModExpResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { 53875 if v, err := iprot.ReadBinary(ctx); err != nil { 53876 return thrift.PrependError("error reading field 0: ", err) 53877 } else { 53878 p.Success = v 53879 } 53880 return nil 53881 } 53882 53883 func (p *ApplyModExpResult) Write(ctx context.Context, oprot thrift.TProtocol) error { 53884 if err := oprot.WriteStructBegin(ctx, "mod_exp_result"); err != nil { 53885 return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } 53886 if p != nil { 53887 if err := p.writeField0(ctx, oprot); err != nil { return err } 53888 } 53889 if err := oprot.WriteFieldStop(ctx); err != nil { 53890 return thrift.PrependError("write field stop error: ", err) } 53891 if err := oprot.WriteStructEnd(ctx); err != nil { 53892 return thrift.PrependError("write struct stop error: ", err) } 53893 return nil 53894 } 53895 53896 func (p *ApplyModExpResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { 53897 if p.IsSetSuccess() { 53898 if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { 53899 return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } 53900 if err := oprot.WriteBinary(ctx, p.Success); err != nil { 53901 return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } 53902 if err := oprot.WriteFieldEnd(ctx); err != nil { 53903 return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } 53904 } 53905 return err 53906 } 53907 53908 func (p *ApplyModExpResult) String() string { 53909 if p == nil { 53910 return "<nil>" 53911 } 53912 return fmt.Sprintf("ApplyModExpResult(%+v)", *p) 53913 } 53914 53915