-
-
Notifications
You must be signed in to change notification settings - Fork 765
/
pushremoteref.go
106 lines (94 loc) · 2.73 KB
/
pushremoteref.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
// Code generated by counterfeiter. DO NOT EDIT.
package fakes
import (
"sync"
"github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1"
)
type PushRemoteRef struct {
GetRemoteKeyStub func() string
getRemoteKeyMutex sync.RWMutex
getRemoteKeyArgsForCall []struct {
}
getRemoteKeyReturns struct {
result1 string
}
getRemoteKeyReturnsOnCall map[int]struct {
result1 string
}
invocations map[string][][]any
invocationsMutex sync.RWMutex
}
func (fake *PushRemoteRef) GetRemoteKey() string {
fake.getRemoteKeyMutex.Lock()
ret, specificReturn := fake.getRemoteKeyReturnsOnCall[len(fake.getRemoteKeyArgsForCall)]
fake.getRemoteKeyArgsForCall = append(fake.getRemoteKeyArgsForCall, struct {
}{})
stub := fake.GetRemoteKeyStub
fakeReturns := fake.getRemoteKeyReturns
fake.recordInvocation("GetRemoteKey", []any{})
fake.getRemoteKeyMutex.Unlock()
if stub != nil {
return stub()
}
if specificReturn {
return ret.result1
}
return fakeReturns.result1
}
func (fake *PushRemoteRef) GetProperty() string {
return ""
}
func (fake *PushRemoteRef) GetRemoteKeyCallCount() int {
fake.getRemoteKeyMutex.RLock()
defer fake.getRemoteKeyMutex.RUnlock()
return len(fake.getRemoteKeyArgsForCall)
}
func (fake *PushRemoteRef) GetRemoteKeyCalls(stub func() string) {
fake.getRemoteKeyMutex.Lock()
defer fake.getRemoteKeyMutex.Unlock()
fake.GetRemoteKeyStub = stub
}
func (fake *PushRemoteRef) GetRemoteKeyReturns(result1 string) {
fake.getRemoteKeyMutex.Lock()
defer fake.getRemoteKeyMutex.Unlock()
fake.GetRemoteKeyStub = nil
fake.getRemoteKeyReturns = struct {
result1 string
}{result1}
}
func (fake *PushRemoteRef) GetRemoteKeyReturnsOnCall(i int, result1 string) {
fake.getRemoteKeyMutex.Lock()
defer fake.getRemoteKeyMutex.Unlock()
fake.GetRemoteKeyStub = nil
if fake.getRemoteKeyReturnsOnCall == nil {
fake.getRemoteKeyReturnsOnCall = make(map[int]struct {
result1 string
})
}
fake.getRemoteKeyReturnsOnCall[i] = struct {
result1 string
}{result1}
}
func (fake *PushRemoteRef) Invocations() map[string][][]any {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.getRemoteKeyMutex.RLock()
defer fake.getRemoteKeyMutex.RUnlock()
copiedInvocations := map[string][][]any{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *PushRemoteRef) recordInvocation(key string, args []any) {
fake.invocationsMutex.Lock()
defer fake.invocationsMutex.Unlock()
if fake.invocations == nil {
fake.invocations = map[string][][]any{}
}
if fake.invocations[key] == nil {
fake.invocations[key] = [][]any{}
}
fake.invocations[key] = append(fake.invocations[key], args)
}
var _ v1beta1.PushSecretRemoteRef = new(PushRemoteRef)