github.com/kaleido-io/firefly@v0.0.0-20210622132723-8b4b6aacb971/mocks/databasemocks/plugin.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 package databasemocks 4 5 import ( 6 context "context" 7 8 config "github.com/kaleido-io/firefly/internal/config" 9 10 database "github.com/kaleido-io/firefly/pkg/database" 11 12 fftypes "github.com/kaleido-io/firefly/pkg/fftypes" 13 14 mock "github.com/stretchr/testify/mock" 15 ) 16 17 // Plugin is an autogenerated mock type for the Plugin type 18 type Plugin struct { 19 mock.Mock 20 } 21 22 // Capabilities provides a mock function with given fields: 23 func (_m *Plugin) Capabilities() *database.Capabilities { 24 ret := _m.Called() 25 26 var r0 *database.Capabilities 27 if rf, ok := ret.Get(0).(func() *database.Capabilities); ok { 28 r0 = rf() 29 } else { 30 if ret.Get(0) != nil { 31 r0 = ret.Get(0).(*database.Capabilities) 32 } 33 } 34 35 return r0 36 } 37 38 // DeleteNamespace provides a mock function with given fields: ctx, id 39 func (_m *Plugin) DeleteNamespace(ctx context.Context, id *fftypes.UUID) error { 40 ret := _m.Called(ctx, id) 41 42 var r0 error 43 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) error); ok { 44 r0 = rf(ctx, id) 45 } else { 46 r0 = ret.Error(0) 47 } 48 49 return r0 50 } 51 52 // DeleteNextPin provides a mock function with given fields: ctx, sequence 53 func (_m *Plugin) DeleteNextPin(ctx context.Context, sequence int64) error { 54 ret := _m.Called(ctx, sequence) 55 56 var r0 error 57 if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { 58 r0 = rf(ctx, sequence) 59 } else { 60 r0 = ret.Error(0) 61 } 62 63 return r0 64 } 65 66 // DeleteNonce provides a mock function with given fields: ctx, hash 67 func (_m *Plugin) DeleteNonce(ctx context.Context, hash *fftypes.Bytes32) error { 68 ret := _m.Called(ctx, hash) 69 70 var r0 error 71 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Bytes32) error); ok { 72 r0 = rf(ctx, hash) 73 } else { 74 r0 = ret.Error(0) 75 } 76 77 return r0 78 } 79 80 // DeleteOffset provides a mock function with given fields: ctx, t, ns, name 81 func (_m *Plugin) DeleteOffset(ctx context.Context, t fftypes.LowerCasedType, ns string, name string) error { 82 ret := _m.Called(ctx, t, ns, name) 83 84 var r0 error 85 if rf, ok := ret.Get(0).(func(context.Context, fftypes.LowerCasedType, string, string) error); ok { 86 r0 = rf(ctx, t, ns, name) 87 } else { 88 r0 = ret.Error(0) 89 } 90 91 return r0 92 } 93 94 // DeletePin provides a mock function with given fields: ctx, sequence 95 func (_m *Plugin) DeletePin(ctx context.Context, sequence int64) error { 96 ret := _m.Called(ctx, sequence) 97 98 var r0 error 99 if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { 100 r0 = rf(ctx, sequence) 101 } else { 102 r0 = ret.Error(0) 103 } 104 105 return r0 106 } 107 108 // DeleteSubscriptionByID provides a mock function with given fields: ctx, id 109 func (_m *Plugin) DeleteSubscriptionByID(ctx context.Context, id *fftypes.UUID) error { 110 ret := _m.Called(ctx, id) 111 112 var r0 error 113 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) error); ok { 114 r0 = rf(ctx, id) 115 } else { 116 r0 = ret.Error(0) 117 } 118 119 return r0 120 } 121 122 // GetBatchByID provides a mock function with given fields: ctx, id 123 func (_m *Plugin) GetBatchByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Batch, error) { 124 ret := _m.Called(ctx, id) 125 126 var r0 *fftypes.Batch 127 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) *fftypes.Batch); ok { 128 r0 = rf(ctx, id) 129 } else { 130 if ret.Get(0) != nil { 131 r0 = ret.Get(0).(*fftypes.Batch) 132 } 133 } 134 135 var r1 error 136 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID) error); ok { 137 r1 = rf(ctx, id) 138 } else { 139 r1 = ret.Error(1) 140 } 141 142 return r0, r1 143 } 144 145 // GetBatches provides a mock function with given fields: ctx, filter 146 func (_m *Plugin) GetBatches(ctx context.Context, filter database.Filter) ([]*fftypes.Batch, error) { 147 ret := _m.Called(ctx, filter) 148 149 var r0 []*fftypes.Batch 150 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Batch); ok { 151 r0 = rf(ctx, filter) 152 } else { 153 if ret.Get(0) != nil { 154 r0 = ret.Get(0).([]*fftypes.Batch) 155 } 156 } 157 158 var r1 error 159 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 160 r1 = rf(ctx, filter) 161 } else { 162 r1 = ret.Error(1) 163 } 164 165 return r0, r1 166 } 167 168 // GetData provides a mock function with given fields: ctx, filter 169 func (_m *Plugin) GetData(ctx context.Context, filter database.Filter) ([]*fftypes.Data, error) { 170 ret := _m.Called(ctx, filter) 171 172 var r0 []*fftypes.Data 173 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Data); ok { 174 r0 = rf(ctx, filter) 175 } else { 176 if ret.Get(0) != nil { 177 r0 = ret.Get(0).([]*fftypes.Data) 178 } 179 } 180 181 var r1 error 182 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 183 r1 = rf(ctx, filter) 184 } else { 185 r1 = ret.Error(1) 186 } 187 188 return r0, r1 189 } 190 191 // GetDataByID provides a mock function with given fields: ctx, id, withValue 192 func (_m *Plugin) GetDataByID(ctx context.Context, id *fftypes.UUID, withValue bool) (*fftypes.Data, error) { 193 ret := _m.Called(ctx, id, withValue) 194 195 var r0 *fftypes.Data 196 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, bool) *fftypes.Data); ok { 197 r0 = rf(ctx, id, withValue) 198 } else { 199 if ret.Get(0) != nil { 200 r0 = ret.Get(0).(*fftypes.Data) 201 } 202 } 203 204 var r1 error 205 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID, bool) error); ok { 206 r1 = rf(ctx, id, withValue) 207 } else { 208 r1 = ret.Error(1) 209 } 210 211 return r0, r1 212 } 213 214 // GetDataRefs provides a mock function with given fields: ctx, filter 215 func (_m *Plugin) GetDataRefs(ctx context.Context, filter database.Filter) (fftypes.DataRefs, error) { 216 ret := _m.Called(ctx, filter) 217 218 var r0 fftypes.DataRefs 219 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) fftypes.DataRefs); ok { 220 r0 = rf(ctx, filter) 221 } else { 222 if ret.Get(0) != nil { 223 r0 = ret.Get(0).(fftypes.DataRefs) 224 } 225 } 226 227 var r1 error 228 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 229 r1 = rf(ctx, filter) 230 } else { 231 r1 = ret.Error(1) 232 } 233 234 return r0, r1 235 } 236 237 // GetDatatypeByID provides a mock function with given fields: ctx, id 238 func (_m *Plugin) GetDatatypeByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Datatype, error) { 239 ret := _m.Called(ctx, id) 240 241 var r0 *fftypes.Datatype 242 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) *fftypes.Datatype); ok { 243 r0 = rf(ctx, id) 244 } else { 245 if ret.Get(0) != nil { 246 r0 = ret.Get(0).(*fftypes.Datatype) 247 } 248 } 249 250 var r1 error 251 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID) error); ok { 252 r1 = rf(ctx, id) 253 } else { 254 r1 = ret.Error(1) 255 } 256 257 return r0, r1 258 } 259 260 // GetDatatypeByName provides a mock function with given fields: ctx, ns, name, version 261 func (_m *Plugin) GetDatatypeByName(ctx context.Context, ns string, name string, version string) (*fftypes.Datatype, error) { 262 ret := _m.Called(ctx, ns, name, version) 263 264 var r0 *fftypes.Datatype 265 if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *fftypes.Datatype); ok { 266 r0 = rf(ctx, ns, name, version) 267 } else { 268 if ret.Get(0) != nil { 269 r0 = ret.Get(0).(*fftypes.Datatype) 270 } 271 } 272 273 var r1 error 274 if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { 275 r1 = rf(ctx, ns, name, version) 276 } else { 277 r1 = ret.Error(1) 278 } 279 280 return r0, r1 281 } 282 283 // GetDatatypes provides a mock function with given fields: ctx, filter 284 func (_m *Plugin) GetDatatypes(ctx context.Context, filter database.Filter) ([]*fftypes.Datatype, error) { 285 ret := _m.Called(ctx, filter) 286 287 var r0 []*fftypes.Datatype 288 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Datatype); ok { 289 r0 = rf(ctx, filter) 290 } else { 291 if ret.Get(0) != nil { 292 r0 = ret.Get(0).([]*fftypes.Datatype) 293 } 294 } 295 296 var r1 error 297 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 298 r1 = rf(ctx, filter) 299 } else { 300 r1 = ret.Error(1) 301 } 302 303 return r0, r1 304 } 305 306 // GetEventByID provides a mock function with given fields: ctx, id 307 func (_m *Plugin) GetEventByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Event, error) { 308 ret := _m.Called(ctx, id) 309 310 var r0 *fftypes.Event 311 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) *fftypes.Event); ok { 312 r0 = rf(ctx, id) 313 } else { 314 if ret.Get(0) != nil { 315 r0 = ret.Get(0).(*fftypes.Event) 316 } 317 } 318 319 var r1 error 320 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID) error); ok { 321 r1 = rf(ctx, id) 322 } else { 323 r1 = ret.Error(1) 324 } 325 326 return r0, r1 327 } 328 329 // GetEvents provides a mock function with given fields: ctx, filter 330 func (_m *Plugin) GetEvents(ctx context.Context, filter database.Filter) ([]*fftypes.Event, error) { 331 ret := _m.Called(ctx, filter) 332 333 var r0 []*fftypes.Event 334 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Event); ok { 335 r0 = rf(ctx, filter) 336 } else { 337 if ret.Get(0) != nil { 338 r0 = ret.Get(0).([]*fftypes.Event) 339 } 340 } 341 342 var r1 error 343 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 344 r1 = rf(ctx, filter) 345 } else { 346 r1 = ret.Error(1) 347 } 348 349 return r0, r1 350 } 351 352 // GetGroupByHash provides a mock function with given fields: ctx, hash 353 func (_m *Plugin) GetGroupByHash(ctx context.Context, hash *fftypes.Bytes32) (*fftypes.Group, error) { 354 ret := _m.Called(ctx, hash) 355 356 var r0 *fftypes.Group 357 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Bytes32) *fftypes.Group); ok { 358 r0 = rf(ctx, hash) 359 } else { 360 if ret.Get(0) != nil { 361 r0 = ret.Get(0).(*fftypes.Group) 362 } 363 } 364 365 var r1 error 366 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Bytes32) error); ok { 367 r1 = rf(ctx, hash) 368 } else { 369 r1 = ret.Error(1) 370 } 371 372 return r0, r1 373 } 374 375 // GetGroups provides a mock function with given fields: ctx, filter 376 func (_m *Plugin) GetGroups(ctx context.Context, filter database.Filter) ([]*fftypes.Group, error) { 377 ret := _m.Called(ctx, filter) 378 379 var r0 []*fftypes.Group 380 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Group); ok { 381 r0 = rf(ctx, filter) 382 } else { 383 if ret.Get(0) != nil { 384 r0 = ret.Get(0).([]*fftypes.Group) 385 } 386 } 387 388 var r1 error 389 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 390 r1 = rf(ctx, filter) 391 } else { 392 r1 = ret.Error(1) 393 } 394 395 return r0, r1 396 } 397 398 // GetMessageByID provides a mock function with given fields: ctx, id 399 func (_m *Plugin) GetMessageByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Message, error) { 400 ret := _m.Called(ctx, id) 401 402 var r0 *fftypes.Message 403 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) *fftypes.Message); ok { 404 r0 = rf(ctx, id) 405 } else { 406 if ret.Get(0) != nil { 407 r0 = ret.Get(0).(*fftypes.Message) 408 } 409 } 410 411 var r1 error 412 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID) error); ok { 413 r1 = rf(ctx, id) 414 } else { 415 r1 = ret.Error(1) 416 } 417 418 return r0, r1 419 } 420 421 // GetMessageRefs provides a mock function with given fields: ctx, filter 422 func (_m *Plugin) GetMessageRefs(ctx context.Context, filter database.Filter) ([]*fftypes.MessageRef, error) { 423 ret := _m.Called(ctx, filter) 424 425 var r0 []*fftypes.MessageRef 426 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.MessageRef); ok { 427 r0 = rf(ctx, filter) 428 } else { 429 if ret.Get(0) != nil { 430 r0 = ret.Get(0).([]*fftypes.MessageRef) 431 } 432 } 433 434 var r1 error 435 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 436 r1 = rf(ctx, filter) 437 } else { 438 r1 = ret.Error(1) 439 } 440 441 return r0, r1 442 } 443 444 // GetMessages provides a mock function with given fields: ctx, filter 445 func (_m *Plugin) GetMessages(ctx context.Context, filter database.Filter) ([]*fftypes.Message, error) { 446 ret := _m.Called(ctx, filter) 447 448 var r0 []*fftypes.Message 449 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Message); ok { 450 r0 = rf(ctx, filter) 451 } else { 452 if ret.Get(0) != nil { 453 r0 = ret.Get(0).([]*fftypes.Message) 454 } 455 } 456 457 var r1 error 458 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 459 r1 = rf(ctx, filter) 460 } else { 461 r1 = ret.Error(1) 462 } 463 464 return r0, r1 465 } 466 467 // GetMessagesForData provides a mock function with given fields: ctx, dataID, filter 468 func (_m *Plugin) GetMessagesForData(ctx context.Context, dataID *fftypes.UUID, filter database.Filter) ([]*fftypes.Message, error) { 469 ret := _m.Called(ctx, dataID, filter) 470 471 var r0 []*fftypes.Message 472 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, database.Filter) []*fftypes.Message); ok { 473 r0 = rf(ctx, dataID, filter) 474 } else { 475 if ret.Get(0) != nil { 476 r0 = ret.Get(0).([]*fftypes.Message) 477 } 478 } 479 480 var r1 error 481 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID, database.Filter) error); ok { 482 r1 = rf(ctx, dataID, filter) 483 } else { 484 r1 = ret.Error(1) 485 } 486 487 return r0, r1 488 } 489 490 // GetNamespace provides a mock function with given fields: ctx, name 491 func (_m *Plugin) GetNamespace(ctx context.Context, name string) (*fftypes.Namespace, error) { 492 ret := _m.Called(ctx, name) 493 494 var r0 *fftypes.Namespace 495 if rf, ok := ret.Get(0).(func(context.Context, string) *fftypes.Namespace); ok { 496 r0 = rf(ctx, name) 497 } else { 498 if ret.Get(0) != nil { 499 r0 = ret.Get(0).(*fftypes.Namespace) 500 } 501 } 502 503 var r1 error 504 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 505 r1 = rf(ctx, name) 506 } else { 507 r1 = ret.Error(1) 508 } 509 510 return r0, r1 511 } 512 513 // GetNamespaces provides a mock function with given fields: ctx, filter 514 func (_m *Plugin) GetNamespaces(ctx context.Context, filter database.Filter) ([]*fftypes.Namespace, error) { 515 ret := _m.Called(ctx, filter) 516 517 var r0 []*fftypes.Namespace 518 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Namespace); ok { 519 r0 = rf(ctx, filter) 520 } else { 521 if ret.Get(0) != nil { 522 r0 = ret.Get(0).([]*fftypes.Namespace) 523 } 524 } 525 526 var r1 error 527 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 528 r1 = rf(ctx, filter) 529 } else { 530 r1 = ret.Error(1) 531 } 532 533 return r0, r1 534 } 535 536 // GetNextPinByContextAndIdentity provides a mock function with given fields: ctx, _a1, identity 537 func (_m *Plugin) GetNextPinByContextAndIdentity(ctx context.Context, _a1 *fftypes.Bytes32, identity string) (*fftypes.NextPin, error) { 538 ret := _m.Called(ctx, _a1, identity) 539 540 var r0 *fftypes.NextPin 541 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Bytes32, string) *fftypes.NextPin); ok { 542 r0 = rf(ctx, _a1, identity) 543 } else { 544 if ret.Get(0) != nil { 545 r0 = ret.Get(0).(*fftypes.NextPin) 546 } 547 } 548 549 var r1 error 550 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Bytes32, string) error); ok { 551 r1 = rf(ctx, _a1, identity) 552 } else { 553 r1 = ret.Error(1) 554 } 555 556 return r0, r1 557 } 558 559 // GetNextPinByHash provides a mock function with given fields: ctx, hash 560 func (_m *Plugin) GetNextPinByHash(ctx context.Context, hash *fftypes.Bytes32) (*fftypes.NextPin, error) { 561 ret := _m.Called(ctx, hash) 562 563 var r0 *fftypes.NextPin 564 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Bytes32) *fftypes.NextPin); ok { 565 r0 = rf(ctx, hash) 566 } else { 567 if ret.Get(0) != nil { 568 r0 = ret.Get(0).(*fftypes.NextPin) 569 } 570 } 571 572 var r1 error 573 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Bytes32) error); ok { 574 r1 = rf(ctx, hash) 575 } else { 576 r1 = ret.Error(1) 577 } 578 579 return r0, r1 580 } 581 582 // GetNextPins provides a mock function with given fields: ctx, filter 583 func (_m *Plugin) GetNextPins(ctx context.Context, filter database.Filter) ([]*fftypes.NextPin, error) { 584 ret := _m.Called(ctx, filter) 585 586 var r0 []*fftypes.NextPin 587 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.NextPin); ok { 588 r0 = rf(ctx, filter) 589 } else { 590 if ret.Get(0) != nil { 591 r0 = ret.Get(0).([]*fftypes.NextPin) 592 } 593 } 594 595 var r1 error 596 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 597 r1 = rf(ctx, filter) 598 } else { 599 r1 = ret.Error(1) 600 } 601 602 return r0, r1 603 } 604 605 // GetNode provides a mock function with given fields: ctx, owner, name 606 func (_m *Plugin) GetNode(ctx context.Context, owner string, name string) (*fftypes.Node, error) { 607 ret := _m.Called(ctx, owner, name) 608 609 var r0 *fftypes.Node 610 if rf, ok := ret.Get(0).(func(context.Context, string, string) *fftypes.Node); ok { 611 r0 = rf(ctx, owner, name) 612 } else { 613 if ret.Get(0) != nil { 614 r0 = ret.Get(0).(*fftypes.Node) 615 } 616 } 617 618 var r1 error 619 if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { 620 r1 = rf(ctx, owner, name) 621 } else { 622 r1 = ret.Error(1) 623 } 624 625 return r0, r1 626 } 627 628 // GetNodeByID provides a mock function with given fields: ctx, id 629 func (_m *Plugin) GetNodeByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Node, error) { 630 ret := _m.Called(ctx, id) 631 632 var r0 *fftypes.Node 633 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) *fftypes.Node); ok { 634 r0 = rf(ctx, id) 635 } else { 636 if ret.Get(0) != nil { 637 r0 = ret.Get(0).(*fftypes.Node) 638 } 639 } 640 641 var r1 error 642 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID) error); ok { 643 r1 = rf(ctx, id) 644 } else { 645 r1 = ret.Error(1) 646 } 647 648 return r0, r1 649 } 650 651 // GetNodes provides a mock function with given fields: ctx, filter 652 func (_m *Plugin) GetNodes(ctx context.Context, filter database.Filter) ([]*fftypes.Node, error) { 653 ret := _m.Called(ctx, filter) 654 655 var r0 []*fftypes.Node 656 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Node); ok { 657 r0 = rf(ctx, filter) 658 } else { 659 if ret.Get(0) != nil { 660 r0 = ret.Get(0).([]*fftypes.Node) 661 } 662 } 663 664 var r1 error 665 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 666 r1 = rf(ctx, filter) 667 } else { 668 r1 = ret.Error(1) 669 } 670 671 return r0, r1 672 } 673 674 // GetNonce provides a mock function with given fields: ctx, hash 675 func (_m *Plugin) GetNonce(ctx context.Context, hash *fftypes.Bytes32) (*fftypes.Nonce, error) { 676 ret := _m.Called(ctx, hash) 677 678 var r0 *fftypes.Nonce 679 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Bytes32) *fftypes.Nonce); ok { 680 r0 = rf(ctx, hash) 681 } else { 682 if ret.Get(0) != nil { 683 r0 = ret.Get(0).(*fftypes.Nonce) 684 } 685 } 686 687 var r1 error 688 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.Bytes32) error); ok { 689 r1 = rf(ctx, hash) 690 } else { 691 r1 = ret.Error(1) 692 } 693 694 return r0, r1 695 } 696 697 // GetNonces provides a mock function with given fields: ctx, filter 698 func (_m *Plugin) GetNonces(ctx context.Context, filter database.Filter) ([]*fftypes.Nonce, error) { 699 ret := _m.Called(ctx, filter) 700 701 var r0 []*fftypes.Nonce 702 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Nonce); ok { 703 r0 = rf(ctx, filter) 704 } else { 705 if ret.Get(0) != nil { 706 r0 = ret.Get(0).([]*fftypes.Nonce) 707 } 708 } 709 710 var r1 error 711 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 712 r1 = rf(ctx, filter) 713 } else { 714 r1 = ret.Error(1) 715 } 716 717 return r0, r1 718 } 719 720 // GetOffset provides a mock function with given fields: ctx, t, ns, name 721 func (_m *Plugin) GetOffset(ctx context.Context, t fftypes.LowerCasedType, ns string, name string) (*fftypes.Offset, error) { 722 ret := _m.Called(ctx, t, ns, name) 723 724 var r0 *fftypes.Offset 725 if rf, ok := ret.Get(0).(func(context.Context, fftypes.LowerCasedType, string, string) *fftypes.Offset); ok { 726 r0 = rf(ctx, t, ns, name) 727 } else { 728 if ret.Get(0) != nil { 729 r0 = ret.Get(0).(*fftypes.Offset) 730 } 731 } 732 733 var r1 error 734 if rf, ok := ret.Get(1).(func(context.Context, fftypes.LowerCasedType, string, string) error); ok { 735 r1 = rf(ctx, t, ns, name) 736 } else { 737 r1 = ret.Error(1) 738 } 739 740 return r0, r1 741 } 742 743 // GetOffsets provides a mock function with given fields: ctx, filter 744 func (_m *Plugin) GetOffsets(ctx context.Context, filter database.Filter) ([]*fftypes.Offset, error) { 745 ret := _m.Called(ctx, filter) 746 747 var r0 []*fftypes.Offset 748 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Offset); ok { 749 r0 = rf(ctx, filter) 750 } else { 751 if ret.Get(0) != nil { 752 r0 = ret.Get(0).([]*fftypes.Offset) 753 } 754 } 755 756 var r1 error 757 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 758 r1 = rf(ctx, filter) 759 } else { 760 r1 = ret.Error(1) 761 } 762 763 return r0, r1 764 } 765 766 // GetOperationByID provides a mock function with given fields: ctx, id 767 func (_m *Plugin) GetOperationByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Operation, error) { 768 ret := _m.Called(ctx, id) 769 770 var r0 *fftypes.Operation 771 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) *fftypes.Operation); ok { 772 r0 = rf(ctx, id) 773 } else { 774 if ret.Get(0) != nil { 775 r0 = ret.Get(0).(*fftypes.Operation) 776 } 777 } 778 779 var r1 error 780 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID) error); ok { 781 r1 = rf(ctx, id) 782 } else { 783 r1 = ret.Error(1) 784 } 785 786 return r0, r1 787 } 788 789 // GetOperations provides a mock function with given fields: ctx, filter 790 func (_m *Plugin) GetOperations(ctx context.Context, filter database.Filter) ([]*fftypes.Operation, error) { 791 ret := _m.Called(ctx, filter) 792 793 var r0 []*fftypes.Operation 794 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Operation); ok { 795 r0 = rf(ctx, filter) 796 } else { 797 if ret.Get(0) != nil { 798 r0 = ret.Get(0).([]*fftypes.Operation) 799 } 800 } 801 802 var r1 error 803 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 804 r1 = rf(ctx, filter) 805 } else { 806 r1 = ret.Error(1) 807 } 808 809 return r0, r1 810 } 811 812 // GetOrganizationByID provides a mock function with given fields: ctx, id 813 func (_m *Plugin) GetOrganizationByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Organization, error) { 814 ret := _m.Called(ctx, id) 815 816 var r0 *fftypes.Organization 817 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) *fftypes.Organization); ok { 818 r0 = rf(ctx, id) 819 } else { 820 if ret.Get(0) != nil { 821 r0 = ret.Get(0).(*fftypes.Organization) 822 } 823 } 824 825 var r1 error 826 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID) error); ok { 827 r1 = rf(ctx, id) 828 } else { 829 r1 = ret.Error(1) 830 } 831 832 return r0, r1 833 } 834 835 // GetOrganizationByIdentity provides a mock function with given fields: ctx, identity 836 func (_m *Plugin) GetOrganizationByIdentity(ctx context.Context, identity string) (*fftypes.Organization, error) { 837 ret := _m.Called(ctx, identity) 838 839 var r0 *fftypes.Organization 840 if rf, ok := ret.Get(0).(func(context.Context, string) *fftypes.Organization); ok { 841 r0 = rf(ctx, identity) 842 } else { 843 if ret.Get(0) != nil { 844 r0 = ret.Get(0).(*fftypes.Organization) 845 } 846 } 847 848 var r1 error 849 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 850 r1 = rf(ctx, identity) 851 } else { 852 r1 = ret.Error(1) 853 } 854 855 return r0, r1 856 } 857 858 // GetOrganizationByName provides a mock function with given fields: ctx, name 859 func (_m *Plugin) GetOrganizationByName(ctx context.Context, name string) (*fftypes.Organization, error) { 860 ret := _m.Called(ctx, name) 861 862 var r0 *fftypes.Organization 863 if rf, ok := ret.Get(0).(func(context.Context, string) *fftypes.Organization); ok { 864 r0 = rf(ctx, name) 865 } else { 866 if ret.Get(0) != nil { 867 r0 = ret.Get(0).(*fftypes.Organization) 868 } 869 } 870 871 var r1 error 872 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 873 r1 = rf(ctx, name) 874 } else { 875 r1 = ret.Error(1) 876 } 877 878 return r0, r1 879 } 880 881 // GetOrganizations provides a mock function with given fields: ctx, filter 882 func (_m *Plugin) GetOrganizations(ctx context.Context, filter database.Filter) ([]*fftypes.Organization, error) { 883 ret := _m.Called(ctx, filter) 884 885 var r0 []*fftypes.Organization 886 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Organization); ok { 887 r0 = rf(ctx, filter) 888 } else { 889 if ret.Get(0) != nil { 890 r0 = ret.Get(0).([]*fftypes.Organization) 891 } 892 } 893 894 var r1 error 895 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 896 r1 = rf(ctx, filter) 897 } else { 898 r1 = ret.Error(1) 899 } 900 901 return r0, r1 902 } 903 904 // GetPins provides a mock function with given fields: ctx, filter 905 func (_m *Plugin) GetPins(ctx context.Context, filter database.Filter) ([]*fftypes.Pin, error) { 906 ret := _m.Called(ctx, filter) 907 908 var r0 []*fftypes.Pin 909 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Pin); ok { 910 r0 = rf(ctx, filter) 911 } else { 912 if ret.Get(0) != nil { 913 r0 = ret.Get(0).([]*fftypes.Pin) 914 } 915 } 916 917 var r1 error 918 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 919 r1 = rf(ctx, filter) 920 } else { 921 r1 = ret.Error(1) 922 } 923 924 return r0, r1 925 } 926 927 // GetSubscriptionByID provides a mock function with given fields: ctx, id 928 func (_m *Plugin) GetSubscriptionByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Subscription, error) { 929 ret := _m.Called(ctx, id) 930 931 var r0 *fftypes.Subscription 932 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) *fftypes.Subscription); ok { 933 r0 = rf(ctx, id) 934 } else { 935 if ret.Get(0) != nil { 936 r0 = ret.Get(0).(*fftypes.Subscription) 937 } 938 } 939 940 var r1 error 941 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID) error); ok { 942 r1 = rf(ctx, id) 943 } else { 944 r1 = ret.Error(1) 945 } 946 947 return r0, r1 948 } 949 950 // GetSubscriptionByName provides a mock function with given fields: ctx, ns, name 951 func (_m *Plugin) GetSubscriptionByName(ctx context.Context, ns string, name string) (*fftypes.Subscription, error) { 952 ret := _m.Called(ctx, ns, name) 953 954 var r0 *fftypes.Subscription 955 if rf, ok := ret.Get(0).(func(context.Context, string, string) *fftypes.Subscription); ok { 956 r0 = rf(ctx, ns, name) 957 } else { 958 if ret.Get(0) != nil { 959 r0 = ret.Get(0).(*fftypes.Subscription) 960 } 961 } 962 963 var r1 error 964 if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { 965 r1 = rf(ctx, ns, name) 966 } else { 967 r1 = ret.Error(1) 968 } 969 970 return r0, r1 971 } 972 973 // GetSubscriptions provides a mock function with given fields: ctx, filter 974 func (_m *Plugin) GetSubscriptions(ctx context.Context, filter database.Filter) ([]*fftypes.Subscription, error) { 975 ret := _m.Called(ctx, filter) 976 977 var r0 []*fftypes.Subscription 978 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Subscription); ok { 979 r0 = rf(ctx, filter) 980 } else { 981 if ret.Get(0) != nil { 982 r0 = ret.Get(0).([]*fftypes.Subscription) 983 } 984 } 985 986 var r1 error 987 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 988 r1 = rf(ctx, filter) 989 } else { 990 r1 = ret.Error(1) 991 } 992 993 return r0, r1 994 } 995 996 // GetTransactionByID provides a mock function with given fields: ctx, id 997 func (_m *Plugin) GetTransactionByID(ctx context.Context, id *fftypes.UUID) (*fftypes.Transaction, error) { 998 ret := _m.Called(ctx, id) 999 1000 var r0 *fftypes.Transaction 1001 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) *fftypes.Transaction); ok { 1002 r0 = rf(ctx, id) 1003 } else { 1004 if ret.Get(0) != nil { 1005 r0 = ret.Get(0).(*fftypes.Transaction) 1006 } 1007 } 1008 1009 var r1 error 1010 if rf, ok := ret.Get(1).(func(context.Context, *fftypes.UUID) error); ok { 1011 r1 = rf(ctx, id) 1012 } else { 1013 r1 = ret.Error(1) 1014 } 1015 1016 return r0, r1 1017 } 1018 1019 // GetTransactions provides a mock function with given fields: ctx, filter 1020 func (_m *Plugin) GetTransactions(ctx context.Context, filter database.Filter) ([]*fftypes.Transaction, error) { 1021 ret := _m.Called(ctx, filter) 1022 1023 var r0 []*fftypes.Transaction 1024 if rf, ok := ret.Get(0).(func(context.Context, database.Filter) []*fftypes.Transaction); ok { 1025 r0 = rf(ctx, filter) 1026 } else { 1027 if ret.Get(0) != nil { 1028 r0 = ret.Get(0).([]*fftypes.Transaction) 1029 } 1030 } 1031 1032 var r1 error 1033 if rf, ok := ret.Get(1).(func(context.Context, database.Filter) error); ok { 1034 r1 = rf(ctx, filter) 1035 } else { 1036 r1 = ret.Error(1) 1037 } 1038 1039 return r0, r1 1040 } 1041 1042 // Init provides a mock function with given fields: ctx, prefix, callbacks 1043 func (_m *Plugin) Init(ctx context.Context, prefix config.Prefix, callbacks database.Callbacks) error { 1044 ret := _m.Called(ctx, prefix, callbacks) 1045 1046 var r0 error 1047 if rf, ok := ret.Get(0).(func(context.Context, config.Prefix, database.Callbacks) error); ok { 1048 r0 = rf(ctx, prefix, callbacks) 1049 } else { 1050 r0 = ret.Error(0) 1051 } 1052 1053 return r0 1054 } 1055 1056 // InitPrefix provides a mock function with given fields: prefix 1057 func (_m *Plugin) InitPrefix(prefix config.Prefix) { 1058 _m.Called(prefix) 1059 } 1060 1061 // InsertMessageLocal provides a mock function with given fields: ctx, message 1062 func (_m *Plugin) InsertMessageLocal(ctx context.Context, message *fftypes.Message) error { 1063 ret := _m.Called(ctx, message) 1064 1065 var r0 error 1066 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Message) error); ok { 1067 r0 = rf(ctx, message) 1068 } else { 1069 r0 = ret.Error(0) 1070 } 1071 1072 return r0 1073 } 1074 1075 // InsertNextPin provides a mock function with given fields: ctx, nextpin 1076 func (_m *Plugin) InsertNextPin(ctx context.Context, nextpin *fftypes.NextPin) error { 1077 ret := _m.Called(ctx, nextpin) 1078 1079 var r0 error 1080 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.NextPin) error); ok { 1081 r0 = rf(ctx, nextpin) 1082 } else { 1083 r0 = ret.Error(0) 1084 } 1085 1086 return r0 1087 } 1088 1089 // Name provides a mock function with given fields: 1090 func (_m *Plugin) Name() string { 1091 ret := _m.Called() 1092 1093 var r0 string 1094 if rf, ok := ret.Get(0).(func() string); ok { 1095 r0 = rf() 1096 } else { 1097 r0 = ret.Get(0).(string) 1098 } 1099 1100 return r0 1101 } 1102 1103 // RunAsGroup provides a mock function with given fields: ctx, fn 1104 func (_m *Plugin) RunAsGroup(ctx context.Context, fn func(context.Context) error) error { 1105 ret := _m.Called(ctx, fn) 1106 1107 var r0 error 1108 if rf, ok := ret.Get(0).(func(context.Context, func(context.Context) error) error); ok { 1109 r0 = rf(ctx, fn) 1110 } else { 1111 r0 = ret.Error(0) 1112 } 1113 1114 return r0 1115 } 1116 1117 // SetPinDispatched provides a mock function with given fields: ctx, sequence 1118 func (_m *Plugin) SetPinDispatched(ctx context.Context, sequence int64) error { 1119 ret := _m.Called(ctx, sequence) 1120 1121 var r0 error 1122 if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { 1123 r0 = rf(ctx, sequence) 1124 } else { 1125 r0 = ret.Error(0) 1126 } 1127 1128 return r0 1129 } 1130 1131 // UpdateBatch provides a mock function with given fields: ctx, id, update 1132 func (_m *Plugin) UpdateBatch(ctx context.Context, id *fftypes.UUID, update database.Update) error { 1133 ret := _m.Called(ctx, id, update) 1134 1135 var r0 error 1136 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, database.Update) error); ok { 1137 r0 = rf(ctx, id, update) 1138 } else { 1139 r0 = ret.Error(0) 1140 } 1141 1142 return r0 1143 } 1144 1145 // UpdateData provides a mock function with given fields: ctx, id, update 1146 func (_m *Plugin) UpdateData(ctx context.Context, id *fftypes.UUID, update database.Update) error { 1147 ret := _m.Called(ctx, id, update) 1148 1149 var r0 error 1150 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, database.Update) error); ok { 1151 r0 = rf(ctx, id, update) 1152 } else { 1153 r0 = ret.Error(0) 1154 } 1155 1156 return r0 1157 } 1158 1159 // UpdateDatatype provides a mock function with given fields: ctx, id, update 1160 func (_m *Plugin) UpdateDatatype(ctx context.Context, id *fftypes.UUID, update database.Update) error { 1161 ret := _m.Called(ctx, id, update) 1162 1163 var r0 error 1164 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, database.Update) error); ok { 1165 r0 = rf(ctx, id, update) 1166 } else { 1167 r0 = ret.Error(0) 1168 } 1169 1170 return r0 1171 } 1172 1173 // UpdateEvent provides a mock function with given fields: ctx, id, update 1174 func (_m *Plugin) UpdateEvent(ctx context.Context, id *fftypes.UUID, update database.Update) error { 1175 ret := _m.Called(ctx, id, update) 1176 1177 var r0 error 1178 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, database.Update) error); ok { 1179 r0 = rf(ctx, id, update) 1180 } else { 1181 r0 = ret.Error(0) 1182 } 1183 1184 return r0 1185 } 1186 1187 // UpdateGroup provides a mock function with given fields: ctx, hash, update 1188 func (_m *Plugin) UpdateGroup(ctx context.Context, hash *fftypes.Bytes32, update database.Update) error { 1189 ret := _m.Called(ctx, hash, update) 1190 1191 var r0 error 1192 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Bytes32, database.Update) error); ok { 1193 r0 = rf(ctx, hash, update) 1194 } else { 1195 r0 = ret.Error(0) 1196 } 1197 1198 return r0 1199 } 1200 1201 // UpdateMessage provides a mock function with given fields: ctx, id, update 1202 func (_m *Plugin) UpdateMessage(ctx context.Context, id *fftypes.UUID, update database.Update) error { 1203 ret := _m.Called(ctx, id, update) 1204 1205 var r0 error 1206 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, database.Update) error); ok { 1207 r0 = rf(ctx, id, update) 1208 } else { 1209 r0 = ret.Error(0) 1210 } 1211 1212 return r0 1213 } 1214 1215 // UpdateMessages provides a mock function with given fields: ctx, filter, update 1216 func (_m *Plugin) UpdateMessages(ctx context.Context, filter database.Filter, update database.Update) error { 1217 ret := _m.Called(ctx, filter, update) 1218 1219 var r0 error 1220 if rf, ok := ret.Get(0).(func(context.Context, database.Filter, database.Update) error); ok { 1221 r0 = rf(ctx, filter, update) 1222 } else { 1223 r0 = ret.Error(0) 1224 } 1225 1226 return r0 1227 } 1228 1229 // UpdateNamespace provides a mock function with given fields: ctx, id, update 1230 func (_m *Plugin) UpdateNamespace(ctx context.Context, id *fftypes.UUID, update database.Update) error { 1231 ret := _m.Called(ctx, id, update) 1232 1233 var r0 error 1234 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, database.Update) error); ok { 1235 r0 = rf(ctx, id, update) 1236 } else { 1237 r0 = ret.Error(0) 1238 } 1239 1240 return r0 1241 } 1242 1243 // UpdateNextPin provides a mock function with given fields: ctx, sequence, update 1244 func (_m *Plugin) UpdateNextPin(ctx context.Context, sequence int64, update database.Update) error { 1245 ret := _m.Called(ctx, sequence, update) 1246 1247 var r0 error 1248 if rf, ok := ret.Get(0).(func(context.Context, int64, database.Update) error); ok { 1249 r0 = rf(ctx, sequence, update) 1250 } else { 1251 r0 = ret.Error(0) 1252 } 1253 1254 return r0 1255 } 1256 1257 // UpdateNode provides a mock function with given fields: ctx, id, update 1258 func (_m *Plugin) UpdateNode(ctx context.Context, id *fftypes.UUID, update database.Update) error { 1259 ret := _m.Called(ctx, id, update) 1260 1261 var r0 error 1262 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, database.Update) error); ok { 1263 r0 = rf(ctx, id, update) 1264 } else { 1265 r0 = ret.Error(0) 1266 } 1267 1268 return r0 1269 } 1270 1271 // UpdateOffset provides a mock function with given fields: ctx, id, update 1272 func (_m *Plugin) UpdateOffset(ctx context.Context, id *fftypes.UUID, update database.Update) error { 1273 ret := _m.Called(ctx, id, update) 1274 1275 var r0 error 1276 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, database.Update) error); ok { 1277 r0 = rf(ctx, id, update) 1278 } else { 1279 r0 = ret.Error(0) 1280 } 1281 1282 return r0 1283 } 1284 1285 // UpdateOperation provides a mock function with given fields: ctx, id, update 1286 func (_m *Plugin) UpdateOperation(ctx context.Context, id *fftypes.UUID, update database.Update) error { 1287 ret := _m.Called(ctx, id, update) 1288 1289 var r0 error 1290 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, database.Update) error); ok { 1291 r0 = rf(ctx, id, update) 1292 } else { 1293 r0 = ret.Error(0) 1294 } 1295 1296 return r0 1297 } 1298 1299 // UpdateOrganization provides a mock function with given fields: ctx, id, update 1300 func (_m *Plugin) UpdateOrganization(ctx context.Context, id *fftypes.UUID, update database.Update) error { 1301 ret := _m.Called(ctx, id, update) 1302 1303 var r0 error 1304 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, database.Update) error); ok { 1305 r0 = rf(ctx, id, update) 1306 } else { 1307 r0 = ret.Error(0) 1308 } 1309 1310 return r0 1311 } 1312 1313 // UpdateSubscription provides a mock function with given fields: ctx, ns, name, update 1314 func (_m *Plugin) UpdateSubscription(ctx context.Context, ns string, name string, update database.Update) error { 1315 ret := _m.Called(ctx, ns, name, update) 1316 1317 var r0 error 1318 if rf, ok := ret.Get(0).(func(context.Context, string, string, database.Update) error); ok { 1319 r0 = rf(ctx, ns, name, update) 1320 } else { 1321 r0 = ret.Error(0) 1322 } 1323 1324 return r0 1325 } 1326 1327 // UpdateTransaction provides a mock function with given fields: ctx, id, update 1328 func (_m *Plugin) UpdateTransaction(ctx context.Context, id *fftypes.UUID, update database.Update) error { 1329 ret := _m.Called(ctx, id, update) 1330 1331 var r0 error 1332 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, database.Update) error); ok { 1333 r0 = rf(ctx, id, update) 1334 } else { 1335 r0 = ret.Error(0) 1336 } 1337 1338 return r0 1339 } 1340 1341 // UpsertBatch provides a mock function with given fields: ctx, data, allowExisting, allowHashUpdate 1342 func (_m *Plugin) UpsertBatch(ctx context.Context, data *fftypes.Batch, allowExisting bool, allowHashUpdate bool) error { 1343 ret := _m.Called(ctx, data, allowExisting, allowHashUpdate) 1344 1345 var r0 error 1346 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Batch, bool, bool) error); ok { 1347 r0 = rf(ctx, data, allowExisting, allowHashUpdate) 1348 } else { 1349 r0 = ret.Error(0) 1350 } 1351 1352 return r0 1353 } 1354 1355 // UpsertData provides a mock function with given fields: ctx, data, allowExisting, allowHashUpdate 1356 func (_m *Plugin) UpsertData(ctx context.Context, data *fftypes.Data, allowExisting bool, allowHashUpdate bool) error { 1357 ret := _m.Called(ctx, data, allowExisting, allowHashUpdate) 1358 1359 var r0 error 1360 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Data, bool, bool) error); ok { 1361 r0 = rf(ctx, data, allowExisting, allowHashUpdate) 1362 } else { 1363 r0 = ret.Error(0) 1364 } 1365 1366 return r0 1367 } 1368 1369 // UpsertDatatype provides a mock function with given fields: ctx, datadef, allowExisting 1370 func (_m *Plugin) UpsertDatatype(ctx context.Context, datadef *fftypes.Datatype, allowExisting bool) error { 1371 ret := _m.Called(ctx, datadef, allowExisting) 1372 1373 var r0 error 1374 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Datatype, bool) error); ok { 1375 r0 = rf(ctx, datadef, allowExisting) 1376 } else { 1377 r0 = ret.Error(0) 1378 } 1379 1380 return r0 1381 } 1382 1383 // UpsertEvent provides a mock function with given fields: ctx, data, allowExisting 1384 func (_m *Plugin) UpsertEvent(ctx context.Context, data *fftypes.Event, allowExisting bool) error { 1385 ret := _m.Called(ctx, data, allowExisting) 1386 1387 var r0 error 1388 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Event, bool) error); ok { 1389 r0 = rf(ctx, data, allowExisting) 1390 } else { 1391 r0 = ret.Error(0) 1392 } 1393 1394 return r0 1395 } 1396 1397 // UpsertGroup provides a mock function with given fields: ctx, data, allowExisting 1398 func (_m *Plugin) UpsertGroup(ctx context.Context, data *fftypes.Group, allowExisting bool) error { 1399 ret := _m.Called(ctx, data, allowExisting) 1400 1401 var r0 error 1402 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Group, bool) error); ok { 1403 r0 = rf(ctx, data, allowExisting) 1404 } else { 1405 r0 = ret.Error(0) 1406 } 1407 1408 return r0 1409 } 1410 1411 // UpsertMessage provides a mock function with given fields: ctx, message, allowExisting, allowHashUpdate 1412 func (_m *Plugin) UpsertMessage(ctx context.Context, message *fftypes.Message, allowExisting bool, allowHashUpdate bool) error { 1413 ret := _m.Called(ctx, message, allowExisting, allowHashUpdate) 1414 1415 var r0 error 1416 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Message, bool, bool) error); ok { 1417 r0 = rf(ctx, message, allowExisting, allowHashUpdate) 1418 } else { 1419 r0 = ret.Error(0) 1420 } 1421 1422 return r0 1423 } 1424 1425 // UpsertNamespace provides a mock function with given fields: ctx, data, allowExisting 1426 func (_m *Plugin) UpsertNamespace(ctx context.Context, data *fftypes.Namespace, allowExisting bool) error { 1427 ret := _m.Called(ctx, data, allowExisting) 1428 1429 var r0 error 1430 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Namespace, bool) error); ok { 1431 r0 = rf(ctx, data, allowExisting) 1432 } else { 1433 r0 = ret.Error(0) 1434 } 1435 1436 return r0 1437 } 1438 1439 // UpsertNode provides a mock function with given fields: ctx, data, allowExisting 1440 func (_m *Plugin) UpsertNode(ctx context.Context, data *fftypes.Node, allowExisting bool) error { 1441 ret := _m.Called(ctx, data, allowExisting) 1442 1443 var r0 error 1444 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Node, bool) error); ok { 1445 r0 = rf(ctx, data, allowExisting) 1446 } else { 1447 r0 = ret.Error(0) 1448 } 1449 1450 return r0 1451 } 1452 1453 // UpsertNonceNext provides a mock function with given fields: ctx, _a1 1454 func (_m *Plugin) UpsertNonceNext(ctx context.Context, _a1 *fftypes.Nonce) error { 1455 ret := _m.Called(ctx, _a1) 1456 1457 var r0 error 1458 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Nonce) error); ok { 1459 r0 = rf(ctx, _a1) 1460 } else { 1461 r0 = ret.Error(0) 1462 } 1463 1464 return r0 1465 } 1466 1467 // UpsertOffset provides a mock function with given fields: ctx, data, allowExisting 1468 func (_m *Plugin) UpsertOffset(ctx context.Context, data *fftypes.Offset, allowExisting bool) error { 1469 ret := _m.Called(ctx, data, allowExisting) 1470 1471 var r0 error 1472 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Offset, bool) error); ok { 1473 r0 = rf(ctx, data, allowExisting) 1474 } else { 1475 r0 = ret.Error(0) 1476 } 1477 1478 return r0 1479 } 1480 1481 // UpsertOperation provides a mock function with given fields: ctx, operation, allowExisting 1482 func (_m *Plugin) UpsertOperation(ctx context.Context, operation *fftypes.Operation, allowExisting bool) error { 1483 ret := _m.Called(ctx, operation, allowExisting) 1484 1485 var r0 error 1486 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Operation, bool) error); ok { 1487 r0 = rf(ctx, operation, allowExisting) 1488 } else { 1489 r0 = ret.Error(0) 1490 } 1491 1492 return r0 1493 } 1494 1495 // UpsertOrganization provides a mock function with given fields: ctx, data, allowExisting 1496 func (_m *Plugin) UpsertOrganization(ctx context.Context, data *fftypes.Organization, allowExisting bool) error { 1497 ret := _m.Called(ctx, data, allowExisting) 1498 1499 var r0 error 1500 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Organization, bool) error); ok { 1501 r0 = rf(ctx, data, allowExisting) 1502 } else { 1503 r0 = ret.Error(0) 1504 } 1505 1506 return r0 1507 } 1508 1509 // UpsertPin provides a mock function with given fields: ctx, parked 1510 func (_m *Plugin) UpsertPin(ctx context.Context, parked *fftypes.Pin) error { 1511 ret := _m.Called(ctx, parked) 1512 1513 var r0 error 1514 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Pin) error); ok { 1515 r0 = rf(ctx, parked) 1516 } else { 1517 r0 = ret.Error(0) 1518 } 1519 1520 return r0 1521 } 1522 1523 // UpsertSubscription provides a mock function with given fields: ctx, data, allowExisting 1524 func (_m *Plugin) UpsertSubscription(ctx context.Context, data *fftypes.Subscription, allowExisting bool) error { 1525 ret := _m.Called(ctx, data, allowExisting) 1526 1527 var r0 error 1528 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Subscription, bool) error); ok { 1529 r0 = rf(ctx, data, allowExisting) 1530 } else { 1531 r0 = ret.Error(0) 1532 } 1533 1534 return r0 1535 } 1536 1537 // UpsertTransaction provides a mock function with given fields: ctx, data, allowExisting, allowHashUpdate 1538 func (_m *Plugin) UpsertTransaction(ctx context.Context, data *fftypes.Transaction, allowExisting bool, allowHashUpdate bool) error { 1539 ret := _m.Called(ctx, data, allowExisting, allowHashUpdate) 1540 1541 var r0 error 1542 if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Transaction, bool, bool) error); ok { 1543 r0 = rf(ctx, data, allowExisting, allowHashUpdate) 1544 } else { 1545 r0 = ret.Error(0) 1546 } 1547 1548 return r0 1549 }