github.com/qichengzx/mattermost-server@v4.5.1-0.20180604164826-2c75247c97d0+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 // DriverName provides a mock function with given fields: 245 func (_m *SqlStore) DriverName() string { 246 ret := _m.Called() 247 248 var r0 string 249 if rf, ok := ret.Get(0).(func() string); ok { 250 r0 = rf() 251 } else { 252 r0 = ret.Get(0).(string) 253 } 254 255 return r0 256 } 257 258 // Emoji provides a mock function with given fields: 259 func (_m *SqlStore) Emoji() store.EmojiStore { 260 ret := _m.Called() 261 262 var r0 store.EmojiStore 263 if rf, ok := ret.Get(0).(func() store.EmojiStore); ok { 264 r0 = rf() 265 } else { 266 if ret.Get(0) != nil { 267 r0 = ret.Get(0).(store.EmojiStore) 268 } 269 } 270 271 return r0 272 } 273 274 // FileInfo provides a mock function with given fields: 275 func (_m *SqlStore) FileInfo() store.FileInfoStore { 276 ret := _m.Called() 277 278 var r0 store.FileInfoStore 279 if rf, ok := ret.Get(0).(func() store.FileInfoStore); ok { 280 r0 = rf() 281 } else { 282 if ret.Get(0) != nil { 283 r0 = ret.Get(0).(store.FileInfoStore) 284 } 285 } 286 287 return r0 288 } 289 290 // GetAllConns provides a mock function with given fields: 291 func (_m *SqlStore) GetAllConns() []*gorp.DbMap { 292 ret := _m.Called() 293 294 var r0 []*gorp.DbMap 295 if rf, ok := ret.Get(0).(func() []*gorp.DbMap); ok { 296 r0 = rf() 297 } else { 298 if ret.Get(0) != nil { 299 r0 = ret.Get(0).([]*gorp.DbMap) 300 } 301 } 302 303 return r0 304 } 305 306 // GetCurrentSchemaVersion provides a mock function with given fields: 307 func (_m *SqlStore) GetCurrentSchemaVersion() string { 308 ret := _m.Called() 309 310 var r0 string 311 if rf, ok := ret.Get(0).(func() string); ok { 312 r0 = rf() 313 } else { 314 r0 = ret.Get(0).(string) 315 } 316 317 return r0 318 } 319 320 // GetMaster provides a mock function with given fields: 321 func (_m *SqlStore) GetMaster() *gorp.DbMap { 322 ret := _m.Called() 323 324 var r0 *gorp.DbMap 325 if rf, ok := ret.Get(0).(func() *gorp.DbMap); ok { 326 r0 = rf() 327 } else { 328 if ret.Get(0) != nil { 329 r0 = ret.Get(0).(*gorp.DbMap) 330 } 331 } 332 333 return r0 334 } 335 336 // GetMaxLengthOfColumnIfExists provides a mock function with given fields: tableName, columnName 337 func (_m *SqlStore) GetMaxLengthOfColumnIfExists(tableName string, columnName string) string { 338 ret := _m.Called(tableName, columnName) 339 340 var r0 string 341 if rf, ok := ret.Get(0).(func(string, string) string); ok { 342 r0 = rf(tableName, columnName) 343 } else { 344 r0 = ret.Get(0).(string) 345 } 346 347 return r0 348 } 349 350 // GetReplica provides a mock function with given fields: 351 func (_m *SqlStore) GetReplica() *gorp.DbMap { 352 ret := _m.Called() 353 354 var r0 *gorp.DbMap 355 if rf, ok := ret.Get(0).(func() *gorp.DbMap); ok { 356 r0 = rf() 357 } else { 358 if ret.Get(0) != nil { 359 r0 = ret.Get(0).(*gorp.DbMap) 360 } 361 } 362 363 return r0 364 } 365 366 // GetSearchReplica provides a mock function with given fields: 367 func (_m *SqlStore) GetSearchReplica() *gorp.DbMap { 368 ret := _m.Called() 369 370 var r0 *gorp.DbMap 371 if rf, ok := ret.Get(0).(func() *gorp.DbMap); ok { 372 r0 = rf() 373 } else { 374 if ret.Get(0) != nil { 375 r0 = ret.Get(0).(*gorp.DbMap) 376 } 377 } 378 379 return r0 380 } 381 382 // Job provides a mock function with given fields: 383 func (_m *SqlStore) Job() store.JobStore { 384 ret := _m.Called() 385 386 var r0 store.JobStore 387 if rf, ok := ret.Get(0).(func() store.JobStore); ok { 388 r0 = rf() 389 } else { 390 if ret.Get(0) != nil { 391 r0 = ret.Get(0).(store.JobStore) 392 } 393 } 394 395 return r0 396 } 397 398 // License provides a mock function with given fields: 399 func (_m *SqlStore) License() store.LicenseStore { 400 ret := _m.Called() 401 402 var r0 store.LicenseStore 403 if rf, ok := ret.Get(0).(func() store.LicenseStore); ok { 404 r0 = rf() 405 } else { 406 if ret.Get(0) != nil { 407 r0 = ret.Get(0).(store.LicenseStore) 408 } 409 } 410 411 return r0 412 } 413 414 // MarkSystemRanUnitTests provides a mock function with given fields: 415 func (_m *SqlStore) MarkSystemRanUnitTests() { 416 _m.Called() 417 } 418 419 // OAuth provides a mock function with given fields: 420 func (_m *SqlStore) OAuth() store.OAuthStore { 421 ret := _m.Called() 422 423 var r0 store.OAuthStore 424 if rf, ok := ret.Get(0).(func() store.OAuthStore); ok { 425 r0 = rf() 426 } else { 427 if ret.Get(0) != nil { 428 r0 = ret.Get(0).(store.OAuthStore) 429 } 430 } 431 432 return r0 433 } 434 435 // Plugin provides a mock function with given fields: 436 func (_m *SqlStore) Plugin() store.PluginStore { 437 ret := _m.Called() 438 439 var r0 store.PluginStore 440 if rf, ok := ret.Get(0).(func() store.PluginStore); ok { 441 r0 = rf() 442 } else { 443 if ret.Get(0) != nil { 444 r0 = ret.Get(0).(store.PluginStore) 445 } 446 } 447 448 return r0 449 } 450 451 // Post provides a mock function with given fields: 452 func (_m *SqlStore) Post() store.PostStore { 453 ret := _m.Called() 454 455 var r0 store.PostStore 456 if rf, ok := ret.Get(0).(func() store.PostStore); ok { 457 r0 = rf() 458 } else { 459 if ret.Get(0) != nil { 460 r0 = ret.Get(0).(store.PostStore) 461 } 462 } 463 464 return r0 465 } 466 467 // Preference provides a mock function with given fields: 468 func (_m *SqlStore) Preference() store.PreferenceStore { 469 ret := _m.Called() 470 471 var r0 store.PreferenceStore 472 if rf, ok := ret.Get(0).(func() store.PreferenceStore); ok { 473 r0 = rf() 474 } else { 475 if ret.Get(0) != nil { 476 r0 = ret.Get(0).(store.PreferenceStore) 477 } 478 } 479 480 return r0 481 } 482 483 // Reaction provides a mock function with given fields: 484 func (_m *SqlStore) Reaction() store.ReactionStore { 485 ret := _m.Called() 486 487 var r0 store.ReactionStore 488 if rf, ok := ret.Get(0).(func() store.ReactionStore); ok { 489 r0 = rf() 490 } else { 491 if ret.Get(0) != nil { 492 r0 = ret.Get(0).(store.ReactionStore) 493 } 494 } 495 496 return r0 497 } 498 499 // RemoveColumnIfExists provides a mock function with given fields: tableName, columnName 500 func (_m *SqlStore) RemoveColumnIfExists(tableName string, columnName string) bool { 501 ret := _m.Called(tableName, columnName) 502 503 var r0 bool 504 if rf, ok := ret.Get(0).(func(string, string) bool); ok { 505 r0 = rf(tableName, columnName) 506 } else { 507 r0 = ret.Get(0).(bool) 508 } 509 510 return r0 511 } 512 513 // RemoveIndexIfExists provides a mock function with given fields: indexName, tableName 514 func (_m *SqlStore) RemoveIndexIfExists(indexName string, tableName string) bool { 515 ret := _m.Called(indexName, tableName) 516 517 var r0 bool 518 if rf, ok := ret.Get(0).(func(string, string) bool); ok { 519 r0 = rf(indexName, tableName) 520 } else { 521 r0 = ret.Get(0).(bool) 522 } 523 524 return r0 525 } 526 527 // RemoveTableIfExists provides a mock function with given fields: tableName 528 func (_m *SqlStore) RemoveTableIfExists(tableName string) bool { 529 ret := _m.Called(tableName) 530 531 var r0 bool 532 if rf, ok := ret.Get(0).(func(string) bool); ok { 533 r0 = rf(tableName) 534 } else { 535 r0 = ret.Get(0).(bool) 536 } 537 538 return r0 539 } 540 541 // RenameColumnIfExists provides a mock function with given fields: tableName, oldColumnName, newColumnName, colType 542 func (_m *SqlStore) RenameColumnIfExists(tableName string, oldColumnName string, newColumnName string, colType string) bool { 543 ret := _m.Called(tableName, oldColumnName, newColumnName, colType) 544 545 var r0 bool 546 if rf, ok := ret.Get(0).(func(string, string, string, string) bool); ok { 547 r0 = rf(tableName, oldColumnName, newColumnName, colType) 548 } else { 549 r0 = ret.Get(0).(bool) 550 } 551 552 return r0 553 } 554 555 // Role provides a mock function with given fields: 556 func (_m *SqlStore) Role() store.RoleStore { 557 ret := _m.Called() 558 559 var r0 store.RoleStore 560 if rf, ok := ret.Get(0).(func() store.RoleStore); ok { 561 r0 = rf() 562 } else { 563 if ret.Get(0) != nil { 564 r0 = ret.Get(0).(store.RoleStore) 565 } 566 } 567 568 return r0 569 } 570 571 // Scheme provides a mock function with given fields: 572 func (_m *SqlStore) Scheme() store.SchemeStore { 573 ret := _m.Called() 574 575 var r0 store.SchemeStore 576 if rf, ok := ret.Get(0).(func() store.SchemeStore); ok { 577 r0 = rf() 578 } else { 579 if ret.Get(0) != nil { 580 r0 = ret.Get(0).(store.SchemeStore) 581 } 582 } 583 584 return r0 585 } 586 587 // Session provides a mock function with given fields: 588 func (_m *SqlStore) Session() store.SessionStore { 589 ret := _m.Called() 590 591 var r0 store.SessionStore 592 if rf, ok := ret.Get(0).(func() store.SessionStore); ok { 593 r0 = rf() 594 } else { 595 if ret.Get(0) != nil { 596 r0 = ret.Get(0).(store.SessionStore) 597 } 598 } 599 600 return r0 601 } 602 603 // Status provides a mock function with given fields: 604 func (_m *SqlStore) Status() store.StatusStore { 605 ret := _m.Called() 606 607 var r0 store.StatusStore 608 if rf, ok := ret.Get(0).(func() store.StatusStore); ok { 609 r0 = rf() 610 } else { 611 if ret.Get(0) != nil { 612 r0 = ret.Get(0).(store.StatusStore) 613 } 614 } 615 616 return r0 617 } 618 619 // System provides a mock function with given fields: 620 func (_m *SqlStore) System() store.SystemStore { 621 ret := _m.Called() 622 623 var r0 store.SystemStore 624 if rf, ok := ret.Get(0).(func() store.SystemStore); ok { 625 r0 = rf() 626 } else { 627 if ret.Get(0) != nil { 628 r0 = ret.Get(0).(store.SystemStore) 629 } 630 } 631 632 return r0 633 } 634 635 // Team provides a mock function with given fields: 636 func (_m *SqlStore) Team() store.TeamStore { 637 ret := _m.Called() 638 639 var r0 store.TeamStore 640 if rf, ok := ret.Get(0).(func() store.TeamStore); ok { 641 r0 = rf() 642 } else { 643 if ret.Get(0) != nil { 644 r0 = ret.Get(0).(store.TeamStore) 645 } 646 } 647 648 return r0 649 } 650 651 // Token provides a mock function with given fields: 652 func (_m *SqlStore) Token() store.TokenStore { 653 ret := _m.Called() 654 655 var r0 store.TokenStore 656 if rf, ok := ret.Get(0).(func() store.TokenStore); ok { 657 r0 = rf() 658 } else { 659 if ret.Get(0) != nil { 660 r0 = ret.Get(0).(store.TokenStore) 661 } 662 } 663 664 return r0 665 } 666 667 // TotalMasterDbConnections provides a mock function with given fields: 668 func (_m *SqlStore) TotalMasterDbConnections() int { 669 ret := _m.Called() 670 671 var r0 int 672 if rf, ok := ret.Get(0).(func() int); ok { 673 r0 = rf() 674 } else { 675 r0 = ret.Get(0).(int) 676 } 677 678 return r0 679 } 680 681 // TotalReadDbConnections provides a mock function with given fields: 682 func (_m *SqlStore) TotalReadDbConnections() int { 683 ret := _m.Called() 684 685 var r0 int 686 if rf, ok := ret.Get(0).(func() int); ok { 687 r0 = rf() 688 } else { 689 r0 = ret.Get(0).(int) 690 } 691 692 return r0 693 } 694 695 // TotalSearchDbConnections provides a mock function with given fields: 696 func (_m *SqlStore) TotalSearchDbConnections() int { 697 ret := _m.Called() 698 699 var r0 int 700 if rf, ok := ret.Get(0).(func() int); ok { 701 r0 = rf() 702 } else { 703 r0 = ret.Get(0).(int) 704 } 705 706 return r0 707 } 708 709 // User provides a mock function with given fields: 710 func (_m *SqlStore) User() store.UserStore { 711 ret := _m.Called() 712 713 var r0 store.UserStore 714 if rf, ok := ret.Get(0).(func() store.UserStore); ok { 715 r0 = rf() 716 } else { 717 if ret.Get(0) != nil { 718 r0 = ret.Get(0).(store.UserStore) 719 } 720 } 721 722 return r0 723 } 724 725 // UserAccessToken provides a mock function with given fields: 726 func (_m *SqlStore) UserAccessToken() store.UserAccessTokenStore { 727 ret := _m.Called() 728 729 var r0 store.UserAccessTokenStore 730 if rf, ok := ret.Get(0).(func() store.UserAccessTokenStore); ok { 731 r0 = rf() 732 } else { 733 if ret.Get(0) != nil { 734 r0 = ret.Get(0).(store.UserAccessTokenStore) 735 } 736 } 737 738 return r0 739 } 740 741 // Webhook provides a mock function with given fields: 742 func (_m *SqlStore) Webhook() store.WebhookStore { 743 ret := _m.Called() 744 745 var r0 store.WebhookStore 746 if rf, ok := ret.Get(0).(func() store.WebhookStore); ok { 747 r0 = rf() 748 } else { 749 if ret.Get(0) != nil { 750 r0 = ret.Get(0).(store.WebhookStore) 751 } 752 } 753 754 return r0 755 }