github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/WebhookStore.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 ( 8 model "github.com/mattermost/mattermost-server/v5/model" 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // WebhookStore is an autogenerated mock type for the WebhookStore type 13 type WebhookStore struct { 14 mock.Mock 15 } 16 17 // AnalyticsIncomingCount provides a mock function with given fields: teamId 18 func (_m *WebhookStore) AnalyticsIncomingCount(teamId string) (int64, error) { 19 ret := _m.Called(teamId) 20 21 var r0 int64 22 if rf, ok := ret.Get(0).(func(string) int64); ok { 23 r0 = rf(teamId) 24 } else { 25 r0 = ret.Get(0).(int64) 26 } 27 28 var r1 error 29 if rf, ok := ret.Get(1).(func(string) error); ok { 30 r1 = rf(teamId) 31 } else { 32 r1 = ret.Error(1) 33 } 34 35 return r0, r1 36 } 37 38 // AnalyticsOutgoingCount provides a mock function with given fields: teamId 39 func (_m *WebhookStore) AnalyticsOutgoingCount(teamId string) (int64, error) { 40 ret := _m.Called(teamId) 41 42 var r0 int64 43 if rf, ok := ret.Get(0).(func(string) int64); ok { 44 r0 = rf(teamId) 45 } else { 46 r0 = ret.Get(0).(int64) 47 } 48 49 var r1 error 50 if rf, ok := ret.Get(1).(func(string) error); ok { 51 r1 = rf(teamId) 52 } else { 53 r1 = ret.Error(1) 54 } 55 56 return r0, r1 57 } 58 59 // ClearCaches provides a mock function with given fields: 60 func (_m *WebhookStore) ClearCaches() { 61 _m.Called() 62 } 63 64 // DeleteIncoming provides a mock function with given fields: webhookId, time 65 func (_m *WebhookStore) DeleteIncoming(webhookId string, time int64) error { 66 ret := _m.Called(webhookId, time) 67 68 var r0 error 69 if rf, ok := ret.Get(0).(func(string, int64) error); ok { 70 r0 = rf(webhookId, time) 71 } else { 72 r0 = ret.Error(0) 73 } 74 75 return r0 76 } 77 78 // DeleteOutgoing provides a mock function with given fields: webhookId, time 79 func (_m *WebhookStore) DeleteOutgoing(webhookId string, time int64) error { 80 ret := _m.Called(webhookId, time) 81 82 var r0 error 83 if rf, ok := ret.Get(0).(func(string, int64) error); ok { 84 r0 = rf(webhookId, time) 85 } else { 86 r0 = ret.Error(0) 87 } 88 89 return r0 90 } 91 92 // GetIncoming provides a mock function with given fields: id, allowFromCache 93 func (_m *WebhookStore) GetIncoming(id string, allowFromCache bool) (*model.IncomingWebhook, error) { 94 ret := _m.Called(id, allowFromCache) 95 96 var r0 *model.IncomingWebhook 97 if rf, ok := ret.Get(0).(func(string, bool) *model.IncomingWebhook); ok { 98 r0 = rf(id, allowFromCache) 99 } else { 100 if ret.Get(0) != nil { 101 r0 = ret.Get(0).(*model.IncomingWebhook) 102 } 103 } 104 105 var r1 error 106 if rf, ok := ret.Get(1).(func(string, bool) error); ok { 107 r1 = rf(id, allowFromCache) 108 } else { 109 r1 = ret.Error(1) 110 } 111 112 return r0, r1 113 } 114 115 // GetIncomingByChannel provides a mock function with given fields: channelId 116 func (_m *WebhookStore) GetIncomingByChannel(channelId string) ([]*model.IncomingWebhook, error) { 117 ret := _m.Called(channelId) 118 119 var r0 []*model.IncomingWebhook 120 if rf, ok := ret.Get(0).(func(string) []*model.IncomingWebhook); ok { 121 r0 = rf(channelId) 122 } else { 123 if ret.Get(0) != nil { 124 r0 = ret.Get(0).([]*model.IncomingWebhook) 125 } 126 } 127 128 var r1 error 129 if rf, ok := ret.Get(1).(func(string) error); ok { 130 r1 = rf(channelId) 131 } else { 132 r1 = ret.Error(1) 133 } 134 135 return r0, r1 136 } 137 138 // GetIncomingByTeam provides a mock function with given fields: teamId, offset, limit 139 func (_m *WebhookStore) GetIncomingByTeam(teamId string, offset int, limit int) ([]*model.IncomingWebhook, error) { 140 ret := _m.Called(teamId, offset, limit) 141 142 var r0 []*model.IncomingWebhook 143 if rf, ok := ret.Get(0).(func(string, int, int) []*model.IncomingWebhook); ok { 144 r0 = rf(teamId, offset, limit) 145 } else { 146 if ret.Get(0) != nil { 147 r0 = ret.Get(0).([]*model.IncomingWebhook) 148 } 149 } 150 151 var r1 error 152 if rf, ok := ret.Get(1).(func(string, int, int) error); ok { 153 r1 = rf(teamId, offset, limit) 154 } else { 155 r1 = ret.Error(1) 156 } 157 158 return r0, r1 159 } 160 161 // GetIncomingByTeamByUser provides a mock function with given fields: teamId, userId, offset, limit 162 func (_m *WebhookStore) GetIncomingByTeamByUser(teamId string, userId string, offset int, limit int) ([]*model.IncomingWebhook, error) { 163 ret := _m.Called(teamId, userId, offset, limit) 164 165 var r0 []*model.IncomingWebhook 166 if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.IncomingWebhook); ok { 167 r0 = rf(teamId, userId, offset, limit) 168 } else { 169 if ret.Get(0) != nil { 170 r0 = ret.Get(0).([]*model.IncomingWebhook) 171 } 172 } 173 174 var r1 error 175 if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok { 176 r1 = rf(teamId, userId, offset, limit) 177 } else { 178 r1 = ret.Error(1) 179 } 180 181 return r0, r1 182 } 183 184 // GetIncomingList provides a mock function with given fields: offset, limit 185 func (_m *WebhookStore) GetIncomingList(offset int, limit int) ([]*model.IncomingWebhook, error) { 186 ret := _m.Called(offset, limit) 187 188 var r0 []*model.IncomingWebhook 189 if rf, ok := ret.Get(0).(func(int, int) []*model.IncomingWebhook); ok { 190 r0 = rf(offset, limit) 191 } else { 192 if ret.Get(0) != nil { 193 r0 = ret.Get(0).([]*model.IncomingWebhook) 194 } 195 } 196 197 var r1 error 198 if rf, ok := ret.Get(1).(func(int, int) error); ok { 199 r1 = rf(offset, limit) 200 } else { 201 r1 = ret.Error(1) 202 } 203 204 return r0, r1 205 } 206 207 // GetIncomingListByUser provides a mock function with given fields: userId, offset, limit 208 func (_m *WebhookStore) GetIncomingListByUser(userId string, offset int, limit int) ([]*model.IncomingWebhook, error) { 209 ret := _m.Called(userId, offset, limit) 210 211 var r0 []*model.IncomingWebhook 212 if rf, ok := ret.Get(0).(func(string, int, int) []*model.IncomingWebhook); ok { 213 r0 = rf(userId, offset, limit) 214 } else { 215 if ret.Get(0) != nil { 216 r0 = ret.Get(0).([]*model.IncomingWebhook) 217 } 218 } 219 220 var r1 error 221 if rf, ok := ret.Get(1).(func(string, int, int) error); ok { 222 r1 = rf(userId, offset, limit) 223 } else { 224 r1 = ret.Error(1) 225 } 226 227 return r0, r1 228 } 229 230 // GetOutgoing provides a mock function with given fields: id 231 func (_m *WebhookStore) GetOutgoing(id string) (*model.OutgoingWebhook, error) { 232 ret := _m.Called(id) 233 234 var r0 *model.OutgoingWebhook 235 if rf, ok := ret.Get(0).(func(string) *model.OutgoingWebhook); ok { 236 r0 = rf(id) 237 } else { 238 if ret.Get(0) != nil { 239 r0 = ret.Get(0).(*model.OutgoingWebhook) 240 } 241 } 242 243 var r1 error 244 if rf, ok := ret.Get(1).(func(string) error); ok { 245 r1 = rf(id) 246 } else { 247 r1 = ret.Error(1) 248 } 249 250 return r0, r1 251 } 252 253 // GetOutgoingByChannel provides a mock function with given fields: channelId, offset, limit 254 func (_m *WebhookStore) GetOutgoingByChannel(channelId string, offset int, limit int) ([]*model.OutgoingWebhook, error) { 255 ret := _m.Called(channelId, offset, limit) 256 257 var r0 []*model.OutgoingWebhook 258 if rf, ok := ret.Get(0).(func(string, int, int) []*model.OutgoingWebhook); ok { 259 r0 = rf(channelId, offset, limit) 260 } else { 261 if ret.Get(0) != nil { 262 r0 = ret.Get(0).([]*model.OutgoingWebhook) 263 } 264 } 265 266 var r1 error 267 if rf, ok := ret.Get(1).(func(string, int, int) error); ok { 268 r1 = rf(channelId, offset, limit) 269 } else { 270 r1 = ret.Error(1) 271 } 272 273 return r0, r1 274 } 275 276 // GetOutgoingByChannelByUser provides a mock function with given fields: channelId, userId, offset, limit 277 func (_m *WebhookStore) GetOutgoingByChannelByUser(channelId string, userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) { 278 ret := _m.Called(channelId, userId, offset, limit) 279 280 var r0 []*model.OutgoingWebhook 281 if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.OutgoingWebhook); ok { 282 r0 = rf(channelId, userId, offset, limit) 283 } else { 284 if ret.Get(0) != nil { 285 r0 = ret.Get(0).([]*model.OutgoingWebhook) 286 } 287 } 288 289 var r1 error 290 if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok { 291 r1 = rf(channelId, userId, offset, limit) 292 } else { 293 r1 = ret.Error(1) 294 } 295 296 return r0, r1 297 } 298 299 // GetOutgoingByTeam provides a mock function with given fields: teamId, offset, limit 300 func (_m *WebhookStore) GetOutgoingByTeam(teamId string, offset int, limit int) ([]*model.OutgoingWebhook, error) { 301 ret := _m.Called(teamId, offset, limit) 302 303 var r0 []*model.OutgoingWebhook 304 if rf, ok := ret.Get(0).(func(string, int, int) []*model.OutgoingWebhook); ok { 305 r0 = rf(teamId, offset, limit) 306 } else { 307 if ret.Get(0) != nil { 308 r0 = ret.Get(0).([]*model.OutgoingWebhook) 309 } 310 } 311 312 var r1 error 313 if rf, ok := ret.Get(1).(func(string, int, int) error); ok { 314 r1 = rf(teamId, offset, limit) 315 } else { 316 r1 = ret.Error(1) 317 } 318 319 return r0, r1 320 } 321 322 // GetOutgoingByTeamByUser provides a mock function with given fields: teamId, userId, offset, limit 323 func (_m *WebhookStore) GetOutgoingByTeamByUser(teamId string, userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) { 324 ret := _m.Called(teamId, userId, offset, limit) 325 326 var r0 []*model.OutgoingWebhook 327 if rf, ok := ret.Get(0).(func(string, string, int, int) []*model.OutgoingWebhook); ok { 328 r0 = rf(teamId, userId, offset, limit) 329 } else { 330 if ret.Get(0) != nil { 331 r0 = ret.Get(0).([]*model.OutgoingWebhook) 332 } 333 } 334 335 var r1 error 336 if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok { 337 r1 = rf(teamId, userId, offset, limit) 338 } else { 339 r1 = ret.Error(1) 340 } 341 342 return r0, r1 343 } 344 345 // GetOutgoingList provides a mock function with given fields: offset, limit 346 func (_m *WebhookStore) GetOutgoingList(offset int, limit int) ([]*model.OutgoingWebhook, error) { 347 ret := _m.Called(offset, limit) 348 349 var r0 []*model.OutgoingWebhook 350 if rf, ok := ret.Get(0).(func(int, int) []*model.OutgoingWebhook); ok { 351 r0 = rf(offset, limit) 352 } else { 353 if ret.Get(0) != nil { 354 r0 = ret.Get(0).([]*model.OutgoingWebhook) 355 } 356 } 357 358 var r1 error 359 if rf, ok := ret.Get(1).(func(int, int) error); ok { 360 r1 = rf(offset, limit) 361 } else { 362 r1 = ret.Error(1) 363 } 364 365 return r0, r1 366 } 367 368 // GetOutgoingListByUser provides a mock function with given fields: userId, offset, limit 369 func (_m *WebhookStore) GetOutgoingListByUser(userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) { 370 ret := _m.Called(userId, offset, limit) 371 372 var r0 []*model.OutgoingWebhook 373 if rf, ok := ret.Get(0).(func(string, int, int) []*model.OutgoingWebhook); ok { 374 r0 = rf(userId, offset, limit) 375 } else { 376 if ret.Get(0) != nil { 377 r0 = ret.Get(0).([]*model.OutgoingWebhook) 378 } 379 } 380 381 var r1 error 382 if rf, ok := ret.Get(1).(func(string, int, int) error); ok { 383 r1 = rf(userId, offset, limit) 384 } else { 385 r1 = ret.Error(1) 386 } 387 388 return r0, r1 389 } 390 391 // InvalidateWebhookCache provides a mock function with given fields: webhook 392 func (_m *WebhookStore) InvalidateWebhookCache(webhook string) { 393 _m.Called(webhook) 394 } 395 396 // PermanentDeleteIncomingByChannel provides a mock function with given fields: channelId 397 func (_m *WebhookStore) PermanentDeleteIncomingByChannel(channelId string) error { 398 ret := _m.Called(channelId) 399 400 var r0 error 401 if rf, ok := ret.Get(0).(func(string) error); ok { 402 r0 = rf(channelId) 403 } else { 404 r0 = ret.Error(0) 405 } 406 407 return r0 408 } 409 410 // PermanentDeleteIncomingByUser provides a mock function with given fields: userId 411 func (_m *WebhookStore) PermanentDeleteIncomingByUser(userId string) error { 412 ret := _m.Called(userId) 413 414 var r0 error 415 if rf, ok := ret.Get(0).(func(string) error); ok { 416 r0 = rf(userId) 417 } else { 418 r0 = ret.Error(0) 419 } 420 421 return r0 422 } 423 424 // PermanentDeleteOutgoingByChannel provides a mock function with given fields: channelId 425 func (_m *WebhookStore) PermanentDeleteOutgoingByChannel(channelId string) error { 426 ret := _m.Called(channelId) 427 428 var r0 error 429 if rf, ok := ret.Get(0).(func(string) error); ok { 430 r0 = rf(channelId) 431 } else { 432 r0 = ret.Error(0) 433 } 434 435 return r0 436 } 437 438 // PermanentDeleteOutgoingByUser provides a mock function with given fields: userId 439 func (_m *WebhookStore) PermanentDeleteOutgoingByUser(userId string) error { 440 ret := _m.Called(userId) 441 442 var r0 error 443 if rf, ok := ret.Get(0).(func(string) error); ok { 444 r0 = rf(userId) 445 } else { 446 r0 = ret.Error(0) 447 } 448 449 return r0 450 } 451 452 // SaveIncoming provides a mock function with given fields: webhook 453 func (_m *WebhookStore) SaveIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, error) { 454 ret := _m.Called(webhook) 455 456 var r0 *model.IncomingWebhook 457 if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) *model.IncomingWebhook); ok { 458 r0 = rf(webhook) 459 } else { 460 if ret.Get(0) != nil { 461 r0 = ret.Get(0).(*model.IncomingWebhook) 462 } 463 } 464 465 var r1 error 466 if rf, ok := ret.Get(1).(func(*model.IncomingWebhook) error); ok { 467 r1 = rf(webhook) 468 } else { 469 r1 = ret.Error(1) 470 } 471 472 return r0, r1 473 } 474 475 // SaveOutgoing provides a mock function with given fields: webhook 476 func (_m *WebhookStore) SaveOutgoing(webhook *model.OutgoingWebhook) (*model.OutgoingWebhook, error) { 477 ret := _m.Called(webhook) 478 479 var r0 *model.OutgoingWebhook 480 if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) *model.OutgoingWebhook); ok { 481 r0 = rf(webhook) 482 } else { 483 if ret.Get(0) != nil { 484 r0 = ret.Get(0).(*model.OutgoingWebhook) 485 } 486 } 487 488 var r1 error 489 if rf, ok := ret.Get(1).(func(*model.OutgoingWebhook) error); ok { 490 r1 = rf(webhook) 491 } else { 492 r1 = ret.Error(1) 493 } 494 495 return r0, r1 496 } 497 498 // UpdateIncoming provides a mock function with given fields: webhook 499 func (_m *WebhookStore) UpdateIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, error) { 500 ret := _m.Called(webhook) 501 502 var r0 *model.IncomingWebhook 503 if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) *model.IncomingWebhook); ok { 504 r0 = rf(webhook) 505 } else { 506 if ret.Get(0) != nil { 507 r0 = ret.Get(0).(*model.IncomingWebhook) 508 } 509 } 510 511 var r1 error 512 if rf, ok := ret.Get(1).(func(*model.IncomingWebhook) error); ok { 513 r1 = rf(webhook) 514 } else { 515 r1 = ret.Error(1) 516 } 517 518 return r0, r1 519 } 520 521 // UpdateOutgoing provides a mock function with given fields: hook 522 func (_m *WebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, error) { 523 ret := _m.Called(hook) 524 525 var r0 *model.OutgoingWebhook 526 if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) *model.OutgoingWebhook); ok { 527 r0 = rf(hook) 528 } else { 529 if ret.Get(0) != nil { 530 r0 = ret.Get(0).(*model.OutgoingWebhook) 531 } 532 } 533 534 var r1 error 535 if rf, ok := ret.Get(1).(func(*model.OutgoingWebhook) error); ok { 536 r1 = rf(hook) 537 } else { 538 r1 = ret.Error(1) 539 } 540 541 return r0, r1 542 }