This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
/
mutator.go
95 lines (75 loc) · 1.99 KB
/
mutator.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
// Code generated by mockery v1.0.1. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
v1 "k8s.io/api/core/v1"
)
// Mutator is an autogenerated mock type for the Mutator type
type Mutator struct {
mock.Mock
}
type Mutator_ID struct {
*mock.Call
}
func (_m Mutator_ID) Return(_a0 string) *Mutator_ID {
return &Mutator_ID{Call: _m.Call.Return(_a0)}
}
func (_m *Mutator) OnID() *Mutator_ID {
c_call := _m.On("ID")
return &Mutator_ID{Call: c_call}
}
func (_m *Mutator) OnIDMatch(matchers ...interface{}) *Mutator_ID {
c_call := _m.On("ID", matchers...)
return &Mutator_ID{Call: c_call}
}
// ID provides a mock function with given fields:
func (_m *Mutator) ID() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
type Mutator_Mutate struct {
*mock.Call
}
func (_m Mutator_Mutate) Return(newP *v1.Pod, changed bool, err error) *Mutator_Mutate {
return &Mutator_Mutate{Call: _m.Call.Return(newP, changed, err)}
}
func (_m *Mutator) OnMutate(ctx context.Context, p *v1.Pod) *Mutator_Mutate {
c_call := _m.On("Mutate", ctx, p)
return &Mutator_Mutate{Call: c_call}
}
func (_m *Mutator) OnMutateMatch(matchers ...interface{}) *Mutator_Mutate {
c_call := _m.On("Mutate", matchers...)
return &Mutator_Mutate{Call: c_call}
}
// Mutate provides a mock function with given fields: ctx, p
func (_m *Mutator) Mutate(ctx context.Context, p *v1.Pod) (*v1.Pod, bool, error) {
ret := _m.Called(ctx, p)
var r0 *v1.Pod
if rf, ok := ret.Get(0).(func(context.Context, *v1.Pod) *v1.Pod); ok {
r0 = rf(ctx, p)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Pod)
}
}
var r1 bool
if rf, ok := ret.Get(1).(func(context.Context, *v1.Pod) bool); ok {
r1 = rf(ctx, p)
} else {
r1 = ret.Get(1).(bool)
}
var r2 error
if rf, ok := ret.Get(2).(func(context.Context, *v1.Pod) error); ok {
r2 = rf(ctx, p)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}