forked from kyma-project/kyma
/
operation_storage.go
111 lines (89 loc) · 3.01 KB
/
operation_storage.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
package automock
import "github.com/kyma-project/kyma/components/remote-environment-broker/internal"
import "github.com/stretchr/testify/mock"
// OperationStorage is an autogenerated mock type for the OperationStorage type
type OperationStorage struct {
mock.Mock
}
// Get provides a mock function with given fields: iID, opID
func (_m *OperationStorage) Get(iID internal.InstanceID, opID internal.OperationID) (*internal.InstanceOperation, error) {
ret := _m.Called(iID, opID)
var r0 *internal.InstanceOperation
if rf, ok := ret.Get(0).(func(internal.InstanceID, internal.OperationID) *internal.InstanceOperation); ok {
r0 = rf(iID, opID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*internal.InstanceOperation)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(internal.InstanceID, internal.OperationID) error); ok {
r1 = rf(iID, opID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAll provides a mock function with given fields: iID
func (_m *OperationStorage) GetAll(iID internal.InstanceID) ([]*internal.InstanceOperation, error) {
ret := _m.Called(iID)
var r0 []*internal.InstanceOperation
if rf, ok := ret.Get(0).(func(internal.InstanceID) []*internal.InstanceOperation); ok {
r0 = rf(iID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*internal.InstanceOperation)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(internal.InstanceID) error); ok {
r1 = rf(iID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Insert provides a mock function with given fields: io
func (_m *OperationStorage) Insert(io *internal.InstanceOperation) error {
ret := _m.Called(io)
var r0 error
if rf, ok := ret.Get(0).(func(*internal.InstanceOperation) error); ok {
r0 = rf(io)
} else {
r0 = ret.Error(0)
}
return r0
}
// Remove provides a mock function with given fields: iID, opID
func (_m *OperationStorage) Remove(iID internal.InstanceID, opID internal.OperationID) error {
ret := _m.Called(iID, opID)
var r0 error
if rf, ok := ret.Get(0).(func(internal.InstanceID, internal.OperationID) error); ok {
r0 = rf(iID, opID)
} else {
r0 = ret.Error(0)
}
return r0
}
// UpdateState provides a mock function with given fields: iID, opID, state
func (_m *OperationStorage) UpdateState(iID internal.InstanceID, opID internal.OperationID, state internal.OperationState) error {
ret := _m.Called(iID, opID, state)
var r0 error
if rf, ok := ret.Get(0).(func(internal.InstanceID, internal.OperationID, internal.OperationState) error); ok {
r0 = rf(iID, opID, state)
} else {
r0 = ret.Error(0)
}
return r0
}
// UpdateStateDesc provides a mock function with given fields: iID, opID, state, desc
func (_m *OperationStorage) UpdateStateDesc(iID internal.InstanceID, opID internal.OperationID, state internal.OperationState, desc *string) error {
ret := _m.Called(iID, opID, state, desc)
var r0 error
if rf, ok := ret.Get(0).(func(internal.InstanceID, internal.OperationID, internal.OperationState, *string) error); ok {
r0 = rf(iID, opID, state, desc)
} else {
r0 = ret.Error(0)
}
return r0
}