-
Notifications
You must be signed in to change notification settings - Fork 0
/
WorkflowArchive.go
105 lines (83 loc) · 2.65 KB
/
WorkflowArchive.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
// Code generated by mockery v1.1.1. DO NOT EDIT.
package mocks
import (
mock "github.com/stretchr/testify/mock"
labels "k8s.io/apimachinery/pkg/labels"
time "time"
v1alpha1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
)
// WorkflowArchive is an autogenerated mock type for the WorkflowArchive type
type WorkflowArchive struct {
mock.Mock
}
// ArchiveWorkflow provides a mock function with given fields: wf
func (_m *WorkflowArchive) ArchiveWorkflow(wf *v1alpha1.Workflow) error {
ret := _m.Called(wf)
var r0 error
if rf, ok := ret.Get(0).(func(*v1alpha1.Workflow) error); ok {
r0 = rf(wf)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteExpiredWorkflows provides a mock function with given fields: ttl
func (_m *WorkflowArchive) DeleteExpiredWorkflows(ttl time.Duration) error {
ret := _m.Called(ttl)
var r0 error
if rf, ok := ret.Get(0).(func(time.Duration) error); ok {
r0 = rf(ttl)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteWorkflow provides a mock function with given fields: uid
func (_m *WorkflowArchive) DeleteWorkflow(uid string) error {
ret := _m.Called(uid)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(uid)
} else {
r0 = ret.Error(0)
}
return r0
}
// GetWorkflow provides a mock function with given fields: uid
func (_m *WorkflowArchive) GetWorkflow(uid string) (*v1alpha1.Workflow, error) {
ret := _m.Called(uid)
var r0 *v1alpha1.Workflow
if rf, ok := ret.Get(0).(func(string) *v1alpha1.Workflow); ok {
r0 = rf(uid)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1alpha1.Workflow)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(uid)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListWorkflows provides a mock function with given fields: namespace, minStartAt, maxStartAt, labelRequirements, limit, offset
func (_m *WorkflowArchive) ListWorkflows(namespace string, minStartAt time.Time, maxStartAt time.Time, labelRequirements labels.Requirements, limit int, offset int) (v1alpha1.Workflows, error) {
ret := _m.Called(namespace, minStartAt, maxStartAt, labelRequirements, limit, offset)
var r0 v1alpha1.Workflows
if rf, ok := ret.Get(0).(func(string, time.Time, time.Time, labels.Requirements, int, int) v1alpha1.Workflows); ok {
r0 = rf(namespace, minStartAt, maxStartAt, labelRequirements, limit, offset)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(v1alpha1.Workflows)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, time.Time, time.Time, labels.Requirements, int, int) error); ok {
r1 = rf(namespace, minStartAt, maxStartAt, labelRequirements, limit, offset)
} else {
r1 = ret.Error(1)
}
return r0, r1
}