github.com/lologarithm/mattermost-server@v5.3.2-0.20181002060438-c82a84ed765b+incompatible/store/storetest/mocks/SqlStore.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 // Regenerate this file using `make store-mocks`. 4 5 package mocks 6 7 import gorp "github.com/mattermost/gorp" 8 import mock "github.com/stretchr/testify/mock" 9 10 import store "github.com/mattermost/mattermost-server/store" 11 12 // SqlStore is an autogenerated mock type for the SqlStore type 13 type SqlStore struct { 14 mock.Mock 15 } 16 17 // AlterColumnTypeIfExists provides a mock function with given fields: tableName, columnName, mySqlColType, postgresColType 18 func (_m *SqlStore) AlterColumnTypeIfExists(tableName string, columnName string, mySqlColType string, postgresColType string) bool { 19 ret := _m.Called(tableName, columnName, mySqlColType, postgresColType) 20 21 var r0 bool 22 if rf, ok := ret.Get(0).(func(string, string, string, string) bool); ok { 23 r0 = rf(tableName, columnName, mySqlColType, postgresColType) 24 } else { 25 r0 = ret.Get(0).(bool) 26 } 27 28 return r0 29 } 30 31 // Audit provides a mock function with given fields: 32 func (_m *SqlStore) Audit() store.AuditStore { 33 ret := _m.Called() 34 35 var r0 store.AuditStore 36 if rf, ok := ret.Get(0).(func() store.AuditStore); ok { 37 r0 = rf() 38 } else { 39 if ret.Get(0) != nil { 40 r0 = ret.Get(0).(store.AuditStore) 41 } 42 } 43 44 return r0 45 } 46 47 // Channel provides a mock function with given fields: 48 func (_m *SqlStore) Channel() store.ChannelStore { 49 ret := _m.Called() 50 51 var r0 store.ChannelStore 52 if rf, ok := ret.Get(0).(func() store.ChannelStore); ok { 53 r0 = rf() 54 } else { 55 if ret.Get(0) != nil { 56 r0 = ret.Get(0).(store.ChannelStore) 57 } 58 } 59 60 return r0 61 } 62 63 // Close provides a mock function with given fields: 64 func (_m *SqlStore) Close() { 65 _m.Called() 66 } 67 68 // ClusterDiscovery provides a mock function with given fields: 69 func (_m *SqlStore) ClusterDiscovery() store.ClusterDiscoveryStore { 70 ret := _m.Called() 71 72 var r0 store.ClusterDiscoveryStore 73 if rf, ok := ret.Get(0).(func() store.ClusterDiscoveryStore); ok { 74 r0 = rf() 75 } else { 76 if ret.Get(0) != nil { 77 r0 = ret.Get(0).(store.ClusterDiscoveryStore) 78 } 79 } 80 81 return r0 82 } 83 84 // Command provides a mock function with given fields: 85 func (_m *SqlStore) Command() store.CommandStore { 86 ret := _m.Called() 87 88 var r0 store.CommandStore 89 if rf, ok := ret.Get(0).(func() store.CommandStore); ok { 90 r0 = rf() 91 } else { 92 if ret.Get(0) != nil { 93 r0 = ret.Get(0).(store.CommandStore) 94 } 95 } 96 97 return r0 98 } 99 100 // CommandWebhook provides a mock function with given fields: 101 func (_m *SqlStore) CommandWebhook() store.CommandWebhookStore { 102 ret := _m.Called() 103 104 var r0 store.CommandWebhookStore 105 if rf, ok := ret.Get(0).(func() store.CommandWebhookStore); ok { 106 r0 = rf() 107 } else { 108 if ret.Get(0) != nil { 109 r0 = ret.Get(0).(store.CommandWebhookStore) 110 } 111 } 112 113 return r0 114 } 115 116 // Compliance provides a mock function with given fields: 117 func (_m *SqlStore) Compliance() store.ComplianceStore { 118 ret := _m.Called() 119 120 var r0 store.ComplianceStore 121 if rf, ok := ret.Get(0).(func() store.ComplianceStore); ok { 122 r0 = rf() 123 } else { 124 if ret.Get(0) != nil { 125 r0 = ret.Get(0).(store.ComplianceStore) 126 } 127 } 128 129 return r0 130 } 131 132 // CreateColumnIfNotExists provides a mock function with given fields: tableName, columnName, mySqlColType, postgresColType, defaultValue 133 func (_m *SqlStore) CreateColumnIfNotExists(tableName string, columnName string, mySqlColType string, postgresColType string, defaultValue string) bool { 134 ret := _m.Called(tableName, columnName, mySqlColType, postgresColType, defaultValue) 135 136 var r0 bool 137 if rf, ok := ret.Get(0).(func(string, string, string, string, string) bool); ok { 138 r0 = rf(tableName, columnName, mySqlColType, postgresColType, defaultValue) 139 } else { 140 r0 = ret.Get(0).(bool) 141 } 142 143 return r0 144 } 145 146 // CreateColumnIfNotExistsNoDefault provides a mock function with given fields: tableName, columnName, mySqlColType, postgresColType 147 func (_m *SqlStore) CreateColumnIfNotExistsNoDefault(tableName string, columnName string, mySqlColType string, postgresColType string) bool { 148 ret := _m.Called(tableName, columnName, mySqlColType, postgresColType) 149 150 var r0 bool 151 if rf, ok := ret.Get(0).(func(string, string, string, string) bool); ok { 152 r0 = rf(tableName, columnName, mySqlColType, postgresColType) 153 } else { 154 r0 = ret.Get(0).(bool) 155 } 156 157 return r0 158 } 159 160 // CreateCompositeIndexIfNotExists provides a mock function with given fields: indexName, tableName, columnNames 161 func (_m *SqlStore) CreateCompositeIndexIfNotExists(indexName string, tableName string, columnNames []string) bool { 162 ret := _m.Called(indexName, tableName, columnNames) 163 164 var r0 bool 165 if rf, ok := ret.Get(0).(func(string, string, []string) bool); ok { 166 r0 = rf(indexName, tableName, columnNames) 167 } else { 168 r0 = ret.Get(0).(bool) 169 } 170 171 return r0 172 } 173 174 // CreateFullTextIndexIfNotExists provides a mock function with given fields: indexName, tableName, columnName 175 func (_m *SqlStore) CreateFullTextIndexIfNotExists(indexName string, tableName string, columnName string) bool { 176 ret := _m.Called(indexName, tableName, columnName) 177 178 var r0 bool 179 if rf, ok := ret.Get(0).(func(string, string, string) bool); ok { 180 r0 = rf(indexName, tableName, columnName) 181 } else { 182 r0 = ret.Get(0).(bool) 183 } 184 185 return r0 186 } 187 188 // CreateIndexIfNotExists provides a mock function with given fields: indexName, tableName, columnName 189 func (_m *SqlStore) CreateIndexIfNotExists(indexName string, tableName string, columnName string) bool { 190 ret := _m.Called(indexName, tableName, columnName) 191 192 var r0 bool 193 if rf, ok := ret.Get(0).(func(string, string, string) bool); ok { 194 r0 = rf(indexName, tableName, columnName) 195 } else { 196 r0 = ret.Get(0).(bool) 197 } 198 199 return r0 200 } 201 202 // CreateUniqueIndexIfNotExists provides a mock function with given fields: indexName, tableName, columnName 203 func (_m *SqlStore) CreateUniqueIndexIfNotExists(indexName string, tableName string, columnName string) bool { 204 ret := _m.Called(indexName, tableName, columnName) 205 206 var r0 bool 207 if rf, ok := ret.Get(0).(func(string, string, string) bool); ok { 208 r0 = rf(indexName, tableName, columnName) 209 } else { 210 r0 = ret.Get(0).(bool) 211 } 212 213 return r0 214 } 215 216 // DoesColumnExist provides a mock function with given fields: tableName, columName 217 func (_m *SqlStore) DoesColumnExist(tableName string, columName string) bool { 218 ret := _m.Called(tableName, columName) 219 220 var r0 bool 221 if rf, ok := ret.Get(0).(func(string, string) bool); ok { 222 r0 = rf(tableName, columName) 223 } else { 224 r0 = ret.Get(0).(bool) 225 } 226 227 return r0 228 } 229 230 // DoesTableExist provides a mock function with given fields: tablename 231 func (_m *SqlStore) DoesTableExist(tablename string) bool { 232 ret := _m.Called(tablename) 233 234 var r0 bool 235 if rf, ok := ret.Get(0).(func(string) bool); ok { 236 r0 = rf(tablename) 237 } else { 238 r0 = ret.Get(0).(bool) 239 } 240 241 return r0 242 } 243 244 // DoesTriggerExist provides a mock function with given fields: triggerName 245 func (_m *SqlStore) DoesTriggerExist(triggerName string) bool { 246 ret := _m.Called(triggerName) 247 248 var r0 bool 249 if rf, ok := ret.Get(0).(func(string) bool); ok { 250 r0 = rf(triggerName) 251 } else { 252 r0 = ret.Get(0).(bool) 253 } 254 255 return r0 256 } 257 258 // DriverName provides a mock function with given fields: 259 func (_m *SqlStore) DriverName() string { 260 ret := _m.Called() 261 262 var r0 string 263 if rf, ok := ret.Get(0).(func() string); ok { 264 r0 = rf() 265 } else { 266 r0 = ret.Get(0).(string) 267 } 268 269 return r0 270 } 271 272 // Emoji provides a mock function with given fields: 273 func (_m *SqlStore) Emoji() store.EmojiStore { 274 ret := _m.Called() 275 276 var r0 store.EmojiStore 277 if rf, ok := ret.Get(0).(func() store.EmojiStore); ok { 278 r0 = rf() 279 } else { 280 if ret.Get(0) != nil { 281 r0 = ret.Get(0).(store.EmojiStore) 282 } 283 } 284 285 return r0 286 } 287 288 // FileInfo provides a mock function with given fields: 289 func (_m *SqlStore) FileInfo() store.FileInfoStore { 290 ret := _m.Called() 291 292 var r0 store.FileInfoStore 293 if rf, ok := ret.Get(0).(func() store.FileInfoStore); ok { 294 r0 = rf() 295 } else { 296 if ret.Get(0) != nil { 297 r0 = ret.Get(0).(store.FileInfoStore) 298 } 299 } 300 301 return r0 302 } 303 304 // GetAllConns provides a mock function with given fields: 305 func (_m *SqlStore) GetAllConns() []*gorp.DbMap { 306 ret := _m.Called() 307 308 var r0 []*gorp.DbMap 309 if rf, ok := ret.Get(0).(func() []*gorp.DbMap); ok { 310 r0 = rf() 311 } else { 312 if ret.Get(0) != nil { 313 r0 = ret.Get(0).([]*gorp.DbMap) 314 } 315 } 316 317 return r0 318 } 319 320 // GetCurrentSchemaVersion provides a mock function with given fields: 321 func (_m *SqlStore) GetCurrentSchemaVersion() string { 322 ret := _m.Called() 323 324 var r0 string 325 if rf, ok := ret.Get(0).(func() string); ok { 326 r0 = rf() 327 } else { 328 r0 = ret.Get(0).(string) 329 } 330 331 return r0 332 } 333 334 // GetMaster provides a mock function with given fields: 335 func (_m *SqlStore) GetMaster() *gorp.DbMap { 336 ret := _m.Called() 337 338 var r0 *gorp.DbMap 339 if rf, ok := ret.Get(0).(func() *gorp.DbMap); ok { 340 r0 = rf() 341 } else { 342 if ret.Get(0) != nil { 343 r0 = ret.Get(0).(*gorp.DbMap) 344 } 345 } 346 347 return r0 348 } 349 350 // GetMaxLengthOfColumnIfExists provides a mock function with given fields: tableName, columnName 351 func (_m *SqlStore) GetMaxLengthOfColumnIfExists(tableName string, columnName string) string { 352 ret := _m.Called(tableName, columnName) 353 354 var r0 string 355 if rf, ok := ret.Get(0).(func(string, string) string); ok { 356 r0 = rf(tableName, columnName) 357 } else { 358 r0 = ret.Get(0).(string) 359 } 360 361 return r0 362 } 363 364 // GetReplica provides a mock function with given fields: 365 func (_m *SqlStore) GetReplica() *gorp.DbMap { 366 ret := _m.Called() 367 368 var r0 *gorp.DbMap 369 if rf, ok := ret.Get(0).(func() *gorp.DbMap); ok { 370 r0 = rf() 371 } else { 372 if ret.Get(0) != nil { 373 r0 = ret.Get(0).(*gorp.DbMap) 374 } 375 } 376 377 return r0 378 } 379 380 // GetSearchReplica provides a mock function with given fields: 381 func (_m *SqlStore) GetSearchReplica() *gorp.DbMap { 382 ret := _m.Called() 383 384 var r0 *gorp.DbMap 385 if rf, ok := ret.Get(0).(func() *gorp.DbMap); ok { 386 r0 = rf() 387 } else { 388 if ret.Get(0) != nil { 389 r0 = ret.Get(0).(*gorp.DbMap) 390 } 391 } 392 393 return r0 394 } 395 396 // Job provides a mock function with given fields: 397 func (_m *SqlStore) Job() store.JobStore { 398 ret := _m.Called() 399 400 var r0 store.JobStore 401 if rf, ok := ret.Get(0).(func() store.JobStore); ok { 402 r0 = rf() 403 } else { 404 if ret.Get(0) != nil { 405 r0 = ret.Get(0).(store.JobStore) 406 } 407 } 408 409 return r0 410 } 411 412 // License provides a mock function with given fields: 413 func (_m *SqlStore) License() store.LicenseStore { 414 ret := _m.Called() 415 416 var r0 store.LicenseStore 417 if rf, ok := ret.Get(0).(func() store.LicenseStore); ok { 418 r0 = rf() 419 } else { 420 if ret.Get(0) != nil { 421 r0 = ret.Get(0).(store.LicenseStore) 422 } 423 } 424 425 return r0 426 } 427 428 // LockToMaster provides a mock function with given fields: 429 func (_m *SqlStore) LockToMaster() { 430 _m.Called() 431 } 432 433 // MarkSystemRanUnitTests provides a mock function with given fields: 434 func (_m *SqlStore) MarkSystemRanUnitTests() { 435 _m.Called() 436 } 437 438 // OAuth provides a mock function with given fields: 439 func (_m *SqlStore) OAuth() store.OAuthStore { 440 ret := _m.Called() 441 442 var r0 store.OAuthStore 443 if rf, ok := ret.Get(0).(func() store.OAuthStore); ok { 444 r0 = rf() 445 } else { 446 if ret.Get(0) != nil { 447 r0 = ret.Get(0).(store.OAuthStore) 448 } 449 } 450 451 return r0 452 } 453 454 // Plugin provides a mock function with given fields: 455 func (_m *SqlStore) Plugin() store.PluginStore { 456 ret := _m.Called() 457 458 var r0 store.PluginStore 459 if rf, ok := ret.Get(0).(func() store.PluginStore); ok { 460 r0 = rf() 461 } else { 462 if ret.Get(0) != nil { 463 r0 = ret.Get(0).(store.PluginStore) 464 } 465 } 466 467 return r0 468 } 469 470 // Post provides a mock function with given fields: 471 func (_m *SqlStore) Post() store.PostStore { 472 ret := _m.Called() 473 474 var r0 store.PostStore 475 if rf, ok := ret.Get(0).(func() store.PostStore); ok { 476 r0 = rf() 477 } else { 478 if ret.Get(0) != nil { 479 r0 = ret.Get(0).(store.PostStore) 480 } 481 } 482 483 return r0 484 } 485 486 // Preference provides a mock function with given fields: 487 func (_m *SqlStore) Preference() store.PreferenceStore { 488 ret := _m.Called() 489 490 var r0 store.PreferenceStore 491 if rf, ok := ret.Get(0).(func() store.PreferenceStore); ok { 492 r0 = rf() 493 } else { 494 if ret.Get(0) != nil { 495 r0 = ret.Get(0).(store.PreferenceStore) 496 } 497 } 498 499 return r0 500 } 501 502 // Reaction provides a mock function with given fields: 503 func (_m *SqlStore) Reaction() store.ReactionStore { 504 ret := _m.Called() 505 506 var r0 store.ReactionStore 507 if rf, ok := ret.Get(0).(func() store.ReactionStore); ok { 508 r0 = rf() 509 } else { 510 if ret.Get(0) != nil { 511 r0 = ret.Get(0).(store.ReactionStore) 512 } 513 } 514 515 return r0 516 } 517 518 // RemoveColumnIfExists provides a mock function with given fields: tableName, columnName 519 func (_m *SqlStore) RemoveColumnIfExists(tableName string, columnName string) bool { 520 ret := _m.Called(tableName, columnName) 521 522 var r0 bool 523 if rf, ok := ret.Get(0).(func(string, string) bool); ok { 524 r0 = rf(tableName, columnName) 525 } else { 526 r0 = ret.Get(0).(bool) 527 } 528 529 return r0 530 } 531 532 // RemoveIndexIfExists provides a mock function with given fields: indexName, tableName 533 func (_m *SqlStore) RemoveIndexIfExists(indexName string, tableName string) bool { 534 ret := _m.Called(indexName, tableName) 535 536 var r0 bool 537 if rf, ok := ret.Get(0).(func(string, string) bool); ok { 538 r0 = rf(indexName, tableName) 539 } else { 540 r0 = ret.Get(0).(bool) 541 } 542 543 return r0 544 } 545 546 // RemoveTableIfExists provides a mock function with given fields: tableName 547 func (_m *SqlStore) RemoveTableIfExists(tableName string) bool { 548 ret := _m.Called(tableName) 549 550 var r0 bool 551 if rf, ok := ret.Get(0).(func(string) bool); ok { 552 r0 = rf(tableName) 553 } else { 554 r0 = ret.Get(0).(bool) 555 } 556 557 return r0 558 } 559 560 // RenameColumnIfExists provides a mock function with given fields: tableName, oldColumnName, newColumnName, colType 561 func (_m *SqlStore) RenameColumnIfExists(tableName string, oldColumnName string, newColumnName string, colType string) bool { 562 ret := _m.Called(tableName, oldColumnName, newColumnName, colType) 563 564 var r0 bool 565 if rf, ok := ret.Get(0).(func(string, string, string, string) bool); ok { 566 r0 = rf(tableName, oldColumnName, newColumnName, colType) 567 } else { 568 r0 = ret.Get(0).(bool) 569 } 570 571 return r0 572 } 573 574 // Role provides a mock function with given fields: 575 func (_m *SqlStore) Role() store.RoleStore { 576 ret := _m.Called() 577 578 var r0 store.RoleStore 579 if rf, ok := ret.Get(0).(func() store.RoleStore); ok { 580 r0 = rf() 581 } else { 582 if ret.Get(0) != nil { 583 r0 = ret.Get(0).(store.RoleStore) 584 } 585 } 586 587 return r0 588 } 589 590 // Scheme provides a mock function with given fields: 591 func (_m *SqlStore) Scheme() store.SchemeStore { 592 ret := _m.Called() 593 594 var r0 store.SchemeStore 595 if rf, ok := ret.Get(0).(func() store.SchemeStore); ok { 596 r0 = rf() 597 } else { 598 if ret.Get(0) != nil { 599 r0 = ret.Get(0).(store.SchemeStore) 600 } 601 } 602 603 return r0 604 } 605 606 // ServiceTerms provides a mock function with given fields: 607 func (_m *SqlStore) ServiceTerms() store.ServiceTermsStore { 608 ret := _m.Called() 609 610 var r0 store.ServiceTermsStore 611 if rf, ok := ret.Get(0).(func() store.ServiceTermsStore); ok { 612 r0 = rf() 613 } else { 614 if ret.Get(0) != nil { 615 r0 = ret.Get(0).(store.ServiceTermsStore) 616 } 617 } 618 619 return r0 620 } 621 622 // Session provides a mock function with given fields: 623 func (_m *SqlStore) Session() store.SessionStore { 624 ret := _m.Called() 625 626 var r0 store.SessionStore 627 if rf, ok := ret.Get(0).(func() store.SessionStore); ok { 628 r0 = rf() 629 } else { 630 if ret.Get(0) != nil { 631 r0 = ret.Get(0).(store.SessionStore) 632 } 633 } 634 635 return r0 636 } 637 638 // Status provides a mock function with given fields: 639 func (_m *SqlStore) Status() store.StatusStore { 640 ret := _m.Called() 641 642 var r0 store.StatusStore 643 if rf, ok := ret.Get(0).(func() store.StatusStore); ok { 644 r0 = rf() 645 } else { 646 if ret.Get(0) != nil { 647 r0 = ret.Get(0).(store.StatusStore) 648 } 649 } 650 651 return r0 652 } 653 654 // System provides a mock function with given fields: 655 func (_m *SqlStore) System() store.SystemStore { 656 ret := _m.Called() 657 658 var r0 store.SystemStore 659 if rf, ok := ret.Get(0).(func() store.SystemStore); ok { 660 r0 = rf() 661 } else { 662 if ret.Get(0) != nil { 663 r0 = ret.Get(0).(store.SystemStore) 664 } 665 } 666 667 return r0 668 } 669 670 // Team provides a mock function with given fields: 671 func (_m *SqlStore) Team() store.TeamStore { 672 ret := _m.Called() 673 674 var r0 store.TeamStore 675 if rf, ok := ret.Get(0).(func() store.TeamStore); ok { 676 r0 = rf() 677 } else { 678 if ret.Get(0) != nil { 679 r0 = ret.Get(0).(store.TeamStore) 680 } 681 } 682 683 return r0 684 } 685 686 // Token provides a mock function with given fields: 687 func (_m *SqlStore) Token() store.TokenStore { 688 ret := _m.Called() 689 690 var r0 store.TokenStore 691 if rf, ok := ret.Get(0).(func() store.TokenStore); ok { 692 r0 = rf() 693 } else { 694 if ret.Get(0) != nil { 695 r0 = ret.Get(0).(store.TokenStore) 696 } 697 } 698 699 return r0 700 } 701 702 // TotalMasterDbConnections provides a mock function with given fields: 703 func (_m *SqlStore) TotalMasterDbConnections() int { 704 ret := _m.Called() 705 706 var r0 int 707 if rf, ok := ret.Get(0).(func() int); ok { 708 r0 = rf() 709 } else { 710 r0 = ret.Get(0).(int) 711 } 712 713 return r0 714 } 715 716 // TotalReadDbConnections provides a mock function with given fields: 717 func (_m *SqlStore) TotalReadDbConnections() int { 718 ret := _m.Called() 719 720 var r0 int 721 if rf, ok := ret.Get(0).(func() int); ok { 722 r0 = rf() 723 } else { 724 r0 = ret.Get(0).(int) 725 } 726 727 return r0 728 } 729 730 // TotalSearchDbConnections provides a mock function with given fields: 731 func (_m *SqlStore) TotalSearchDbConnections() int { 732 ret := _m.Called() 733 734 var r0 int 735 if rf, ok := ret.Get(0).(func() int); ok { 736 r0 = rf() 737 } else { 738 r0 = ret.Get(0).(int) 739 } 740 741 return r0 742 } 743 744 // UnlockFromMaster provides a mock function with given fields: 745 func (_m *SqlStore) UnlockFromMaster() { 746 _m.Called() 747 } 748 749 // User provides a mock function with given fields: 750 func (_m *SqlStore) User() store.UserStore { 751 ret := _m.Called() 752 753 var r0 store.UserStore 754 if rf, ok := ret.Get(0).(func() store.UserStore); ok { 755 r0 = rf() 756 } else { 757 if ret.Get(0) != nil { 758 r0 = ret.Get(0).(store.UserStore) 759 } 760 } 761 762 return r0 763 } 764 765 // UserAccessToken provides a mock function with given fields: 766 func (_m *SqlStore) UserAccessToken() store.UserAccessTokenStore { 767 ret := _m.Called() 768 769 var r0 store.UserAccessTokenStore 770 if rf, ok := ret.Get(0).(func() store.UserAccessTokenStore); ok { 771 r0 = rf() 772 } else { 773 if ret.Get(0) != nil { 774 r0 = ret.Get(0).(store.UserAccessTokenStore) 775 } 776 } 777 778 return r0 779 } 780 781 // Webhook provides a mock function with given fields: 782 func (_m *SqlStore) Webhook() store.WebhookStore { 783 ret := _m.Called() 784 785 var r0 store.WebhookStore 786 if rf, ok := ret.Get(0).(func() store.WebhookStore); ok { 787 r0 = rf() 788 } else { 789 if ret.Get(0) != nil { 790 r0 = ret.Get(0).(store.WebhookStore) 791 } 792 } 793 794 return r0 795 }