/
Summary.go
82 lines (64 loc) · 2.4 KB
/
Summary.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
// Code generated by mockery v2.42.1. DO NOT EDIT.
package mocks
import (
context "context"
taskqueueworker "github.com/golangid/candi/codebase/app/task_queue_worker"
mock "github.com/stretchr/testify/mock"
)
// Summary is an autogenerated mock type for the Summary type
type Summary struct {
mock.Mock
}
// DeleteAllSummary provides a mock function with given fields: ctx, filter
func (_m *Summary) DeleteAllSummary(ctx context.Context, filter *taskqueueworker.Filter) {
_m.Called(ctx, filter)
}
// FindAllSummary provides a mock function with given fields: ctx, filter
func (_m *Summary) FindAllSummary(ctx context.Context, filter *taskqueueworker.Filter) []taskqueueworker.TaskSummary {
ret := _m.Called(ctx, filter)
if len(ret) == 0 {
panic("no return value specified for FindAllSummary")
}
var r0 []taskqueueworker.TaskSummary
if rf, ok := ret.Get(0).(func(context.Context, *taskqueueworker.Filter) []taskqueueworker.TaskSummary); ok {
r0 = rf(ctx, filter)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]taskqueueworker.TaskSummary)
}
}
return r0
}
// FindDetailSummary provides a mock function with given fields: ctx, taskName
func (_m *Summary) FindDetailSummary(ctx context.Context, taskName string) taskqueueworker.TaskSummary {
ret := _m.Called(ctx, taskName)
if len(ret) == 0 {
panic("no return value specified for FindDetailSummary")
}
var r0 taskqueueworker.TaskSummary
if rf, ok := ret.Get(0).(func(context.Context, string) taskqueueworker.TaskSummary); ok {
r0 = rf(ctx, taskName)
} else {
r0 = ret.Get(0).(taskqueueworker.TaskSummary)
}
return r0
}
// IncrementSummary provides a mock function with given fields: ctx, taskName, incr
func (_m *Summary) IncrementSummary(ctx context.Context, taskName string, incr map[string]int64) {
_m.Called(ctx, taskName, incr)
}
// UpdateSummary provides a mock function with given fields: ctx, taskName, updated
func (_m *Summary) UpdateSummary(ctx context.Context, taskName string, updated map[string]interface{}) {
_m.Called(ctx, taskName, updated)
}
// NewSummary creates a new instance of Summary. 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 NewSummary(t interface {
mock.TestingT
Cleanup(func())
}) *Summary {
mock := &Summary{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}