forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_public_key.go
115 lines (101 loc) · 2.6 KB
/
fake_public_key.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
112
113
114
115
// This file was generated by counterfeiter
package fake_ssh
import (
"sync"
"golang.org/x/crypto/ssh"
)
type FakePublicKey struct {
TypeStub func() string
typeMutex sync.RWMutex
typeArgsForCall []struct{}
typeReturns struct {
result1 string
}
MarshalStub func() []byte
marshalMutex sync.RWMutex
marshalArgsForCall []struct{}
marshalReturns struct {
result1 []byte
}
VerifyStub func(data []byte, sig *ssh.Signature) error
verifyMutex sync.RWMutex
verifyArgsForCall []struct {
data []byte
sig *ssh.Signature
}
verifyReturns struct {
result1 error
}
}
func (fake *FakePublicKey) Type() string {
fake.typeMutex.Lock()
fake.typeArgsForCall = append(fake.typeArgsForCall, struct{}{})
fake.typeMutex.Unlock()
if fake.TypeStub != nil {
return fake.TypeStub()
} else {
return fake.typeReturns.result1
}
}
func (fake *FakePublicKey) TypeCallCount() int {
fake.typeMutex.RLock()
defer fake.typeMutex.RUnlock()
return len(fake.typeArgsForCall)
}
func (fake *FakePublicKey) TypeReturns(result1 string) {
fake.TypeStub = nil
fake.typeReturns = struct {
result1 string
}{result1}
}
func (fake *FakePublicKey) Marshal() []byte {
fake.marshalMutex.Lock()
fake.marshalArgsForCall = append(fake.marshalArgsForCall, struct{}{})
fake.marshalMutex.Unlock()
if fake.MarshalStub != nil {
return fake.MarshalStub()
} else {
return fake.marshalReturns.result1
}
}
func (fake *FakePublicKey) MarshalCallCount() int {
fake.marshalMutex.RLock()
defer fake.marshalMutex.RUnlock()
return len(fake.marshalArgsForCall)
}
func (fake *FakePublicKey) MarshalReturns(result1 []byte) {
fake.MarshalStub = nil
fake.marshalReturns = struct {
result1 []byte
}{result1}
}
func (fake *FakePublicKey) Verify(data []byte, sig *ssh.Signature) error {
fake.verifyMutex.Lock()
fake.verifyArgsForCall = append(fake.verifyArgsForCall, struct {
data []byte
sig *ssh.Signature
}{data, sig})
fake.verifyMutex.Unlock()
if fake.VerifyStub != nil {
return fake.VerifyStub(data, sig)
} else {
return fake.verifyReturns.result1
}
}
func (fake *FakePublicKey) VerifyCallCount() int {
fake.verifyMutex.RLock()
defer fake.verifyMutex.RUnlock()
return len(fake.verifyArgsForCall)
}
func (fake *FakePublicKey) VerifyArgsForCall(i int) ([]byte, *ssh.Signature) {
fake.verifyMutex.RLock()
defer fake.verifyMutex.RUnlock()
return fake.verifyArgsForCall[i].data, fake.verifyArgsForCall[i].sig
}
func (fake *FakePublicKey) VerifyReturns(result1 error) {
fake.VerifyStub = nil
fake.verifyReturns = struct {
result1 error
}{result1}
}
var _ ssh.PublicKey = new(FakePublicKey)