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 60
/
secrets_injector.go
100 lines (77 loc) · 2.53 KB
/
secrets_injector.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
// Code generated by mockery v1.0.1. DO NOT EDIT.
package mocks
import (
context "context"
config "github.com/flyteorg/flytepropeller/pkg/webhook/config"
core "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core"
mock "github.com/stretchr/testify/mock"
v1 "k8s.io/api/core/v1"
)
// SecretsInjector is an autogenerated mock type for the SecretsInjector type
type SecretsInjector struct {
mock.Mock
}
type SecretsInjector_Inject struct {
*mock.Call
}
func (_m SecretsInjector_Inject) Return(newP *v1.Pod, injected bool, err error) *SecretsInjector_Inject {
return &SecretsInjector_Inject{Call: _m.Call.Return(newP, injected, err)}
}
func (_m *SecretsInjector) OnInject(ctx context.Context, secrets *core.Secret, p *v1.Pod) *SecretsInjector_Inject {
c := _m.On("Inject", ctx, secrets, p)
return &SecretsInjector_Inject{Call: c}
}
func (_m *SecretsInjector) OnInjectMatch(matchers ...interface{}) *SecretsInjector_Inject {
c := _m.On("Inject", matchers...)
return &SecretsInjector_Inject{Call: c}
}
// Inject provides a mock function with given fields: ctx, secrets, p
func (_m *SecretsInjector) Inject(ctx context.Context, secrets *core.Secret, p *v1.Pod) (*v1.Pod, bool, error) {
ret := _m.Called(ctx, secrets, p)
var r0 *v1.Pod
if rf, ok := ret.Get(0).(func(context.Context, *core.Secret, *v1.Pod) *v1.Pod); ok {
r0 = rf(ctx, secrets, 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, *core.Secret, *v1.Pod) bool); ok {
r1 = rf(ctx, secrets, p)
} else {
r1 = ret.Get(1).(bool)
}
var r2 error
if rf, ok := ret.Get(2).(func(context.Context, *core.Secret, *v1.Pod) error); ok {
r2 = rf(ctx, secrets, p)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
type SecretsInjector_Type struct {
*mock.Call
}
func (_m SecretsInjector_Type) Return(_a0 config.SecretManagerType) *SecretsInjector_Type {
return &SecretsInjector_Type{Call: _m.Call.Return(_a0)}
}
func (_m *SecretsInjector) OnType() *SecretsInjector_Type {
c := _m.On("Type")
return &SecretsInjector_Type{Call: c}
}
func (_m *SecretsInjector) OnTypeMatch(matchers ...interface{}) *SecretsInjector_Type {
c := _m.On("Type", matchers...)
return &SecretsInjector_Type{Call: c}
}
// Type provides a mock function with given fields:
func (_m *SecretsInjector) Type() config.SecretManagerType {
ret := _m.Called()
var r0 config.SecretManagerType
if rf, ok := ret.Get(0).(func() config.SecretManagerType); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(config.SecretManagerType)
}
return r0
}