/
IntervalActionClient.go
156 lines (124 loc) · 4.53 KB
/
IntervalActionClient.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
// Code generated by mockery v2.15.0. DO NOT EDIT.
package mocks
import (
context "context"
common "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/common"
errors "github.com/edgexfoundry/go-mod-core-contracts/v3/errors"
mock "github.com/stretchr/testify/mock"
requests "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/requests"
responses "github.com/edgexfoundry/go-mod-core-contracts/v3/dtos/responses"
)
// IntervalActionClient is an autogenerated mock type for the IntervalActionClient type
type IntervalActionClient struct {
mock.Mock
}
// Add provides a mock function with given fields: ctx, reqs
func (_m *IntervalActionClient) Add(ctx context.Context, reqs []requests.AddIntervalActionRequest) ([]common.BaseWithIdResponse, errors.EdgeX) {
ret := _m.Called(ctx, reqs)
var r0 []common.BaseWithIdResponse
if rf, ok := ret.Get(0).(func(context.Context, []requests.AddIntervalActionRequest) []common.BaseWithIdResponse); ok {
r0 = rf(ctx, reqs)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]common.BaseWithIdResponse)
}
}
var r1 errors.EdgeX
if rf, ok := ret.Get(1).(func(context.Context, []requests.AddIntervalActionRequest) errors.EdgeX); ok {
r1 = rf(ctx, reqs)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(errors.EdgeX)
}
}
return r0, r1
}
// AllIntervalActions provides a mock function with given fields: ctx, offset, limit
func (_m *IntervalActionClient) AllIntervalActions(ctx context.Context, offset int, limit int) (responses.MultiIntervalActionsResponse, errors.EdgeX) {
ret := _m.Called(ctx, offset, limit)
var r0 responses.MultiIntervalActionsResponse
if rf, ok := ret.Get(0).(func(context.Context, int, int) responses.MultiIntervalActionsResponse); ok {
r0 = rf(ctx, offset, limit)
} else {
r0 = ret.Get(0).(responses.MultiIntervalActionsResponse)
}
var r1 errors.EdgeX
if rf, ok := ret.Get(1).(func(context.Context, int, int) errors.EdgeX); ok {
r1 = rf(ctx, offset, limit)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(errors.EdgeX)
}
}
return r0, r1
}
// DeleteIntervalActionByName provides a mock function with given fields: ctx, name
func (_m *IntervalActionClient) DeleteIntervalActionByName(ctx context.Context, name string) (common.BaseResponse, errors.EdgeX) {
ret := _m.Called(ctx, name)
var r0 common.BaseResponse
if rf, ok := ret.Get(0).(func(context.Context, string) common.BaseResponse); ok {
r0 = rf(ctx, name)
} else {
r0 = ret.Get(0).(common.BaseResponse)
}
var r1 errors.EdgeX
if rf, ok := ret.Get(1).(func(context.Context, string) errors.EdgeX); ok {
r1 = rf(ctx, name)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(errors.EdgeX)
}
}
return r0, r1
}
// IntervalActionByName provides a mock function with given fields: ctx, name
func (_m *IntervalActionClient) IntervalActionByName(ctx context.Context, name string) (responses.IntervalActionResponse, errors.EdgeX) {
ret := _m.Called(ctx, name)
var r0 responses.IntervalActionResponse
if rf, ok := ret.Get(0).(func(context.Context, string) responses.IntervalActionResponse); ok {
r0 = rf(ctx, name)
} else {
r0 = ret.Get(0).(responses.IntervalActionResponse)
}
var r1 errors.EdgeX
if rf, ok := ret.Get(1).(func(context.Context, string) errors.EdgeX); ok {
r1 = rf(ctx, name)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(errors.EdgeX)
}
}
return r0, r1
}
// Update provides a mock function with given fields: ctx, reqs
func (_m *IntervalActionClient) Update(ctx context.Context, reqs []requests.UpdateIntervalActionRequest) ([]common.BaseResponse, errors.EdgeX) {
ret := _m.Called(ctx, reqs)
var r0 []common.BaseResponse
if rf, ok := ret.Get(0).(func(context.Context, []requests.UpdateIntervalActionRequest) []common.BaseResponse); ok {
r0 = rf(ctx, reqs)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]common.BaseResponse)
}
}
var r1 errors.EdgeX
if rf, ok := ret.Get(1).(func(context.Context, []requests.UpdateIntervalActionRequest) errors.EdgeX); ok {
r1 = rf(ctx, reqs)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(errors.EdgeX)
}
}
return r0, r1
}
type mockConstructorTestingTNewIntervalActionClient interface {
mock.TestingT
Cleanup(func())
}
// NewIntervalActionClient creates a new instance of IntervalActionClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewIntervalActionClient(t mockConstructorTestingTNewIntervalActionClient) *IntervalActionClient {
mock := &IntervalActionClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}