/
mock_dashboards_interface.go
737 lines (603 loc) · 24.5 KB
/
mock_dashboards_interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
// Code generated by mockery v2.39.1. DO NOT EDIT.
package sql
import (
context "context"
listing "github.com/databricks/databricks-sdk-go/listing"
mock "github.com/stretchr/testify/mock"
sql "github.com/databricks/databricks-sdk-go/service/sql"
)
// MockDashboardsInterface is an autogenerated mock type for the DashboardsInterface type
type MockDashboardsInterface struct {
mock.Mock
}
type MockDashboardsInterface_Expecter struct {
mock *mock.Mock
}
func (_m *MockDashboardsInterface) EXPECT() *MockDashboardsInterface_Expecter {
return &MockDashboardsInterface_Expecter{mock: &_m.Mock}
}
// Create provides a mock function with given fields: ctx, request
func (_m *MockDashboardsInterface) Create(ctx context.Context, request sql.DashboardPostContent) (*sql.Dashboard, error) {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for Create")
}
var r0 *sql.Dashboard
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.DashboardPostContent) (*sql.Dashboard, error)); ok {
return rf(ctx, request)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.DashboardPostContent) *sql.Dashboard); ok {
r0 = rf(ctx, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.Dashboard)
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.DashboardPostContent) error); ok {
r1 = rf(ctx, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDashboardsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
type MockDashboardsInterface_Create_Call struct {
*mock.Call
}
// Create is a helper method to define mock.On call
// - ctx context.Context
// - request sql.DashboardPostContent
func (_e *MockDashboardsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockDashboardsInterface_Create_Call {
return &MockDashboardsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)}
}
func (_c *MockDashboardsInterface_Create_Call) Run(run func(ctx context.Context, request sql.DashboardPostContent)) *MockDashboardsInterface_Create_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.DashboardPostContent))
})
return _c
}
func (_c *MockDashboardsInterface_Create_Call) Return(_a0 *sql.Dashboard, _a1 error) *MockDashboardsInterface_Create_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDashboardsInterface_Create_Call) RunAndReturn(run func(context.Context, sql.DashboardPostContent) (*sql.Dashboard, error)) *MockDashboardsInterface_Create_Call {
_c.Call.Return(run)
return _c
}
// DashboardNameToIdMap provides a mock function with given fields: ctx, request
func (_m *MockDashboardsInterface) DashboardNameToIdMap(ctx context.Context, request sql.ListDashboardsRequest) (map[string]string, error) {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for DashboardNameToIdMap")
}
var r0 map[string]string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.ListDashboardsRequest) (map[string]string, error)); ok {
return rf(ctx, request)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.ListDashboardsRequest) map[string]string); ok {
r0 = rf(ctx, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]string)
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.ListDashboardsRequest) error); ok {
r1 = rf(ctx, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDashboardsInterface_DashboardNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DashboardNameToIdMap'
type MockDashboardsInterface_DashboardNameToIdMap_Call struct {
*mock.Call
}
// DashboardNameToIdMap is a helper method to define mock.On call
// - ctx context.Context
// - request sql.ListDashboardsRequest
func (_e *MockDashboardsInterface_Expecter) DashboardNameToIdMap(ctx interface{}, request interface{}) *MockDashboardsInterface_DashboardNameToIdMap_Call {
return &MockDashboardsInterface_DashboardNameToIdMap_Call{Call: _e.mock.On("DashboardNameToIdMap", ctx, request)}
}
func (_c *MockDashboardsInterface_DashboardNameToIdMap_Call) Run(run func(ctx context.Context, request sql.ListDashboardsRequest)) *MockDashboardsInterface_DashboardNameToIdMap_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.ListDashboardsRequest))
})
return _c
}
func (_c *MockDashboardsInterface_DashboardNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockDashboardsInterface_DashboardNameToIdMap_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDashboardsInterface_DashboardNameToIdMap_Call) RunAndReturn(run func(context.Context, sql.ListDashboardsRequest) (map[string]string, error)) *MockDashboardsInterface_DashboardNameToIdMap_Call {
_c.Call.Return(run)
return _c
}
// Delete provides a mock function with given fields: ctx, request
func (_m *MockDashboardsInterface) Delete(ctx context.Context, request sql.DeleteDashboardRequest) error {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for Delete")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, sql.DeleteDashboardRequest) error); ok {
r0 = rf(ctx, request)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockDashboardsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
type MockDashboardsInterface_Delete_Call struct {
*mock.Call
}
// Delete is a helper method to define mock.On call
// - ctx context.Context
// - request sql.DeleteDashboardRequest
func (_e *MockDashboardsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockDashboardsInterface_Delete_Call {
return &MockDashboardsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)}
}
func (_c *MockDashboardsInterface_Delete_Call) Run(run func(ctx context.Context, request sql.DeleteDashboardRequest)) *MockDashboardsInterface_Delete_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.DeleteDashboardRequest))
})
return _c
}
func (_c *MockDashboardsInterface_Delete_Call) Return(_a0 error) *MockDashboardsInterface_Delete_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockDashboardsInterface_Delete_Call) RunAndReturn(run func(context.Context, sql.DeleteDashboardRequest) error) *MockDashboardsInterface_Delete_Call {
_c.Call.Return(run)
return _c
}
// DeleteByDashboardId provides a mock function with given fields: ctx, dashboardId
func (_m *MockDashboardsInterface) DeleteByDashboardId(ctx context.Context, dashboardId string) error {
ret := _m.Called(ctx, dashboardId)
if len(ret) == 0 {
panic("no return value specified for DeleteByDashboardId")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, dashboardId)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockDashboardsInterface_DeleteByDashboardId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByDashboardId'
type MockDashboardsInterface_DeleteByDashboardId_Call struct {
*mock.Call
}
// DeleteByDashboardId is a helper method to define mock.On call
// - ctx context.Context
// - dashboardId string
func (_e *MockDashboardsInterface_Expecter) DeleteByDashboardId(ctx interface{}, dashboardId interface{}) *MockDashboardsInterface_DeleteByDashboardId_Call {
return &MockDashboardsInterface_DeleteByDashboardId_Call{Call: _e.mock.On("DeleteByDashboardId", ctx, dashboardId)}
}
func (_c *MockDashboardsInterface_DeleteByDashboardId_Call) Run(run func(ctx context.Context, dashboardId string)) *MockDashboardsInterface_DeleteByDashboardId_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *MockDashboardsInterface_DeleteByDashboardId_Call) Return(_a0 error) *MockDashboardsInterface_DeleteByDashboardId_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockDashboardsInterface_DeleteByDashboardId_Call) RunAndReturn(run func(context.Context, string) error) *MockDashboardsInterface_DeleteByDashboardId_Call {
_c.Call.Return(run)
return _c
}
// Get provides a mock function with given fields: ctx, request
func (_m *MockDashboardsInterface) Get(ctx context.Context, request sql.GetDashboardRequest) (*sql.Dashboard, error) {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for Get")
}
var r0 *sql.Dashboard
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.GetDashboardRequest) (*sql.Dashboard, error)); ok {
return rf(ctx, request)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.GetDashboardRequest) *sql.Dashboard); ok {
r0 = rf(ctx, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.Dashboard)
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.GetDashboardRequest) error); ok {
r1 = rf(ctx, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDashboardsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
type MockDashboardsInterface_Get_Call struct {
*mock.Call
}
// Get is a helper method to define mock.On call
// - ctx context.Context
// - request sql.GetDashboardRequest
func (_e *MockDashboardsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockDashboardsInterface_Get_Call {
return &MockDashboardsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)}
}
func (_c *MockDashboardsInterface_Get_Call) Run(run func(ctx context.Context, request sql.GetDashboardRequest)) *MockDashboardsInterface_Get_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.GetDashboardRequest))
})
return _c
}
func (_c *MockDashboardsInterface_Get_Call) Return(_a0 *sql.Dashboard, _a1 error) *MockDashboardsInterface_Get_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDashboardsInterface_Get_Call) RunAndReturn(run func(context.Context, sql.GetDashboardRequest) (*sql.Dashboard, error)) *MockDashboardsInterface_Get_Call {
_c.Call.Return(run)
return _c
}
// GetByDashboardId provides a mock function with given fields: ctx, dashboardId
func (_m *MockDashboardsInterface) GetByDashboardId(ctx context.Context, dashboardId string) (*sql.Dashboard, error) {
ret := _m.Called(ctx, dashboardId)
if len(ret) == 0 {
panic("no return value specified for GetByDashboardId")
}
var r0 *sql.Dashboard
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.Dashboard, error)); ok {
return rf(ctx, dashboardId)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *sql.Dashboard); ok {
r0 = rf(ctx, dashboardId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.Dashboard)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, dashboardId)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDashboardsInterface_GetByDashboardId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByDashboardId'
type MockDashboardsInterface_GetByDashboardId_Call struct {
*mock.Call
}
// GetByDashboardId is a helper method to define mock.On call
// - ctx context.Context
// - dashboardId string
func (_e *MockDashboardsInterface_Expecter) GetByDashboardId(ctx interface{}, dashboardId interface{}) *MockDashboardsInterface_GetByDashboardId_Call {
return &MockDashboardsInterface_GetByDashboardId_Call{Call: _e.mock.On("GetByDashboardId", ctx, dashboardId)}
}
func (_c *MockDashboardsInterface_GetByDashboardId_Call) Run(run func(ctx context.Context, dashboardId string)) *MockDashboardsInterface_GetByDashboardId_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *MockDashboardsInterface_GetByDashboardId_Call) Return(_a0 *sql.Dashboard, _a1 error) *MockDashboardsInterface_GetByDashboardId_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDashboardsInterface_GetByDashboardId_Call) RunAndReturn(run func(context.Context, string) (*sql.Dashboard, error)) *MockDashboardsInterface_GetByDashboardId_Call {
_c.Call.Return(run)
return _c
}
// GetByName provides a mock function with given fields: ctx, name
func (_m *MockDashboardsInterface) GetByName(ctx context.Context, name string) (*sql.Dashboard, error) {
ret := _m.Called(ctx, name)
if len(ret) == 0 {
panic("no return value specified for GetByName")
}
var r0 *sql.Dashboard
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.Dashboard, error)); ok {
return rf(ctx, name)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *sql.Dashboard); ok {
r0 = rf(ctx, name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.Dashboard)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDashboardsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName'
type MockDashboardsInterface_GetByName_Call struct {
*mock.Call
}
// GetByName is a helper method to define mock.On call
// - ctx context.Context
// - name string
func (_e *MockDashboardsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockDashboardsInterface_GetByName_Call {
return &MockDashboardsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)}
}
func (_c *MockDashboardsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockDashboardsInterface_GetByName_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *MockDashboardsInterface_GetByName_Call) Return(_a0 *sql.Dashboard, _a1 error) *MockDashboardsInterface_GetByName_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDashboardsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*sql.Dashboard, error)) *MockDashboardsInterface_GetByName_Call {
_c.Call.Return(run)
return _c
}
// Impl provides a mock function with given fields:
func (_m *MockDashboardsInterface) Impl() sql.DashboardsService {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Impl")
}
var r0 sql.DashboardsService
if rf, ok := ret.Get(0).(func() sql.DashboardsService); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(sql.DashboardsService)
}
}
return r0
}
// MockDashboardsInterface_Impl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Impl'
type MockDashboardsInterface_Impl_Call struct {
*mock.Call
}
// Impl is a helper method to define mock.On call
func (_e *MockDashboardsInterface_Expecter) Impl() *MockDashboardsInterface_Impl_Call {
return &MockDashboardsInterface_Impl_Call{Call: _e.mock.On("Impl")}
}
func (_c *MockDashboardsInterface_Impl_Call) Run(run func()) *MockDashboardsInterface_Impl_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockDashboardsInterface_Impl_Call) Return(_a0 sql.DashboardsService) *MockDashboardsInterface_Impl_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockDashboardsInterface_Impl_Call) RunAndReturn(run func() sql.DashboardsService) *MockDashboardsInterface_Impl_Call {
_c.Call.Return(run)
return _c
}
// List provides a mock function with given fields: ctx, request
func (_m *MockDashboardsInterface) List(ctx context.Context, request sql.ListDashboardsRequest) listing.Iterator[sql.Dashboard] {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for List")
}
var r0 listing.Iterator[sql.Dashboard]
if rf, ok := ret.Get(0).(func(context.Context, sql.ListDashboardsRequest) listing.Iterator[sql.Dashboard]); ok {
r0 = rf(ctx, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(listing.Iterator[sql.Dashboard])
}
}
return r0
}
// MockDashboardsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
type MockDashboardsInterface_List_Call struct {
*mock.Call
}
// List is a helper method to define mock.On call
// - ctx context.Context
// - request sql.ListDashboardsRequest
func (_e *MockDashboardsInterface_Expecter) List(ctx interface{}, request interface{}) *MockDashboardsInterface_List_Call {
return &MockDashboardsInterface_List_Call{Call: _e.mock.On("List", ctx, request)}
}
func (_c *MockDashboardsInterface_List_Call) Run(run func(ctx context.Context, request sql.ListDashboardsRequest)) *MockDashboardsInterface_List_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.ListDashboardsRequest))
})
return _c
}
func (_c *MockDashboardsInterface_List_Call) Return(_a0 listing.Iterator[sql.Dashboard]) *MockDashboardsInterface_List_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockDashboardsInterface_List_Call) RunAndReturn(run func(context.Context, sql.ListDashboardsRequest) listing.Iterator[sql.Dashboard]) *MockDashboardsInterface_List_Call {
_c.Call.Return(run)
return _c
}
// ListAll provides a mock function with given fields: ctx, request
func (_m *MockDashboardsInterface) ListAll(ctx context.Context, request sql.ListDashboardsRequest) ([]sql.Dashboard, error) {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for ListAll")
}
var r0 []sql.Dashboard
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.ListDashboardsRequest) ([]sql.Dashboard, error)); ok {
return rf(ctx, request)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.ListDashboardsRequest) []sql.Dashboard); ok {
r0 = rf(ctx, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]sql.Dashboard)
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.ListDashboardsRequest) error); ok {
r1 = rf(ctx, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDashboardsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll'
type MockDashboardsInterface_ListAll_Call struct {
*mock.Call
}
// ListAll is a helper method to define mock.On call
// - ctx context.Context
// - request sql.ListDashboardsRequest
func (_e *MockDashboardsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockDashboardsInterface_ListAll_Call {
return &MockDashboardsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)}
}
func (_c *MockDashboardsInterface_ListAll_Call) Run(run func(ctx context.Context, request sql.ListDashboardsRequest)) *MockDashboardsInterface_ListAll_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.ListDashboardsRequest))
})
return _c
}
func (_c *MockDashboardsInterface_ListAll_Call) Return(_a0 []sql.Dashboard, _a1 error) *MockDashboardsInterface_ListAll_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDashboardsInterface_ListAll_Call) RunAndReturn(run func(context.Context, sql.ListDashboardsRequest) ([]sql.Dashboard, error)) *MockDashboardsInterface_ListAll_Call {
_c.Call.Return(run)
return _c
}
// Restore provides a mock function with given fields: ctx, request
func (_m *MockDashboardsInterface) Restore(ctx context.Context, request sql.RestoreDashboardRequest) error {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for Restore")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, sql.RestoreDashboardRequest) error); ok {
r0 = rf(ctx, request)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockDashboardsInterface_Restore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restore'
type MockDashboardsInterface_Restore_Call struct {
*mock.Call
}
// Restore is a helper method to define mock.On call
// - ctx context.Context
// - request sql.RestoreDashboardRequest
func (_e *MockDashboardsInterface_Expecter) Restore(ctx interface{}, request interface{}) *MockDashboardsInterface_Restore_Call {
return &MockDashboardsInterface_Restore_Call{Call: _e.mock.On("Restore", ctx, request)}
}
func (_c *MockDashboardsInterface_Restore_Call) Run(run func(ctx context.Context, request sql.RestoreDashboardRequest)) *MockDashboardsInterface_Restore_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.RestoreDashboardRequest))
})
return _c
}
func (_c *MockDashboardsInterface_Restore_Call) Return(_a0 error) *MockDashboardsInterface_Restore_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockDashboardsInterface_Restore_Call) RunAndReturn(run func(context.Context, sql.RestoreDashboardRequest) error) *MockDashboardsInterface_Restore_Call {
_c.Call.Return(run)
return _c
}
// Update provides a mock function with given fields: ctx, request
func (_m *MockDashboardsInterface) Update(ctx context.Context, request sql.DashboardEditContent) (*sql.Dashboard, error) {
ret := _m.Called(ctx, request)
if len(ret) == 0 {
panic("no return value specified for Update")
}
var r0 *sql.Dashboard
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, sql.DashboardEditContent) (*sql.Dashboard, error)); ok {
return rf(ctx, request)
}
if rf, ok := ret.Get(0).(func(context.Context, sql.DashboardEditContent) *sql.Dashboard); ok {
r0 = rf(ctx, request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sql.Dashboard)
}
}
if rf, ok := ret.Get(1).(func(context.Context, sql.DashboardEditContent) error); ok {
r1 = rf(ctx, request)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockDashboardsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
type MockDashboardsInterface_Update_Call struct {
*mock.Call
}
// Update is a helper method to define mock.On call
// - ctx context.Context
// - request sql.DashboardEditContent
func (_e *MockDashboardsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockDashboardsInterface_Update_Call {
return &MockDashboardsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)}
}
func (_c *MockDashboardsInterface_Update_Call) Run(run func(ctx context.Context, request sql.DashboardEditContent)) *MockDashboardsInterface_Update_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(sql.DashboardEditContent))
})
return _c
}
func (_c *MockDashboardsInterface_Update_Call) Return(_a0 *sql.Dashboard, _a1 error) *MockDashboardsInterface_Update_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockDashboardsInterface_Update_Call) RunAndReturn(run func(context.Context, sql.DashboardEditContent) (*sql.Dashboard, error)) *MockDashboardsInterface_Update_Call {
_c.Call.Return(run)
return _c
}
// WithImpl provides a mock function with given fields: impl
func (_m *MockDashboardsInterface) WithImpl(impl sql.DashboardsService) sql.DashboardsInterface {
ret := _m.Called(impl)
if len(ret) == 0 {
panic("no return value specified for WithImpl")
}
var r0 sql.DashboardsInterface
if rf, ok := ret.Get(0).(func(sql.DashboardsService) sql.DashboardsInterface); ok {
r0 = rf(impl)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(sql.DashboardsInterface)
}
}
return r0
}
// MockDashboardsInterface_WithImpl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithImpl'
type MockDashboardsInterface_WithImpl_Call struct {
*mock.Call
}
// WithImpl is a helper method to define mock.On call
// - impl sql.DashboardsService
func (_e *MockDashboardsInterface_Expecter) WithImpl(impl interface{}) *MockDashboardsInterface_WithImpl_Call {
return &MockDashboardsInterface_WithImpl_Call{Call: _e.mock.On("WithImpl", impl)}
}
func (_c *MockDashboardsInterface_WithImpl_Call) Run(run func(impl sql.DashboardsService)) *MockDashboardsInterface_WithImpl_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(sql.DashboardsService))
})
return _c
}
func (_c *MockDashboardsInterface_WithImpl_Call) Return(_a0 sql.DashboardsInterface) *MockDashboardsInterface_WithImpl_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockDashboardsInterface_WithImpl_Call) RunAndReturn(run func(sql.DashboardsService) sql.DashboardsInterface) *MockDashboardsInterface_WithImpl_Call {
_c.Call.Return(run)
return _c
}
// NewMockDashboardsInterface creates a new instance of MockDashboardsInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockDashboardsInterface(t interface {
mock.TestingT
Cleanup(func())
}) *MockDashboardsInterface {
mock := &MockDashboardsInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}