forked from CognitionFoundry/gohfc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
caclient_mock.go
204 lines (172 loc) · 8.85 KB
/
caclient_mock.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
// Code generated by MockGen. DO NOT EDIT.
// Source: caclient.go
// Package gohfc is a generated GoMock package.
package gohfc
import (
gomock "github.com/golang/mock/gomock"
reflect "reflect"
)
// MockMembershipProvider is a mock of MembershipProvider interface
type MockMembershipProvider struct {
ctrl *gomock.Controller
recorder *MockMembershipProviderMockRecorder
}
// MockMembershipProviderMockRecorder is the mock recorder for MockMembershipProvider
type MockMembershipProviderMockRecorder struct {
mock *MockMembershipProvider
}
// NewMockMembershipProvider creates a new mock instance
func NewMockMembershipProvider(ctrl *gomock.Controller) *MockMembershipProvider {
mock := &MockMembershipProvider{ctrl: ctrl}
mock.recorder = &MockMembershipProviderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockMembershipProvider) EXPECT() *MockMembershipProviderMockRecorder {
return m.recorder
}
// Register mocks base method
func (m *MockMembershipProvider) Register(identity *Identity, req *CARegistrationRequest) (string, error) {
ret := m.ctrl.Call(m, "Register", identity, req)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Register indicates an expected call of Register
func (mr *MockMembershipProviderMockRecorder) Register(identity, req interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockMembershipProvider)(nil).Register), identity, req)
}
// Enroll mocks base method
func (m *MockMembershipProvider) Enroll(request CaEnrollmentRequest) (*Identity, []byte, error) {
ret := m.ctrl.Call(m, "Enroll", request)
ret0, _ := ret[0].(*Identity)
ret1, _ := ret[1].([]byte)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Enroll indicates an expected call of Enroll
func (mr *MockMembershipProviderMockRecorder) Enroll(request interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Enroll", reflect.TypeOf((*MockMembershipProvider)(nil).Enroll), request)
}
// Revoke mocks base method
func (m *MockMembershipProvider) Revoke(identity *Identity, request *CARevocationRequest) (*CaRevokeResult, error) {
ret := m.ctrl.Call(m, "Revoke", identity, request)
ret0, _ := ret[0].(*CaRevokeResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Revoke indicates an expected call of Revoke
func (mr *MockMembershipProviderMockRecorder) Revoke(identity, request interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revoke", reflect.TypeOf((*MockMembershipProvider)(nil).Revoke), identity, request)
}
// ReEnroll mocks base method
func (m *MockMembershipProvider) ReEnroll(request CaReEnrollmentRequest) (*Identity, []byte, error) {
ret := m.ctrl.Call(m, "ReEnroll", request)
ret0, _ := ret[0].(*Identity)
ret1, _ := ret[1].([]byte)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// ReEnroll indicates an expected call of ReEnroll
func (mr *MockMembershipProviderMockRecorder) ReEnroll(request interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReEnroll", reflect.TypeOf((*MockMembershipProvider)(nil).ReEnroll), request)
}
// GetCaCertificateChain mocks base method
func (m *MockMembershipProvider) GetCaCertificateChain(caName string) (*CAGetCertsResponse, error) {
ret := m.ctrl.Call(m, "GetCaCertificateChain", caName)
ret0, _ := ret[0].(*CAGetCertsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetCaCertificateChain indicates an expected call of GetCaCertificateChain
func (mr *MockMembershipProviderMockRecorder) GetCaCertificateChain(caName interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCaCertificateChain", reflect.TypeOf((*MockMembershipProvider)(nil).GetCaCertificateChain), caName)
}
// ListAffiliations mocks base method
func (m *MockMembershipProvider) ListAffiliations(identity *Identity, path, caName string) (*CAAffiliationResponse, error) {
ret := m.ctrl.Call(m, "ListAffiliations", identity, path, caName)
ret0, _ := ret[0].(*CAAffiliationResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListAffiliations indicates an expected call of ListAffiliations
func (mr *MockMembershipProviderMockRecorder) ListAffiliations(identity, path, caName interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAffiliations", reflect.TypeOf((*MockMembershipProvider)(nil).ListAffiliations), identity, path, caName)
}
// AddAffiliation mocks base method
func (m *MockMembershipProvider) AddAffiliation(identity *Identity, req CAAddAffiliationRequest) (*CAAffiliationResponse, error) {
ret := m.ctrl.Call(m, "AddAffiliation", identity, req)
ret0, _ := ret[0].(*CAAffiliationResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AddAffiliation indicates an expected call of AddAffiliation
func (mr *MockMembershipProviderMockRecorder) AddAffiliation(identity, req interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAffiliation", reflect.TypeOf((*MockMembershipProvider)(nil).AddAffiliation), identity, req)
}
// RemoveAffiliation mocks base method
func (m *MockMembershipProvider) RemoveAffiliation(identity *Identity, req CARemoveAffiliationRequest) (*CAAffiliationResponse, error) {
ret := m.ctrl.Call(m, "RemoveAffiliation", identity, req)
ret0, _ := ret[0].(*CAAffiliationResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RemoveAffiliation indicates an expected call of RemoveAffiliation
func (mr *MockMembershipProviderMockRecorder) RemoveAffiliation(identity, req interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAffiliation", reflect.TypeOf((*MockMembershipProvider)(nil).RemoveAffiliation), identity, req)
}
// ModifyAffiliation mocks base method
func (m *MockMembershipProvider) ModifyAffiliation(identity *Identity, req CAModifyAffiliationRequest) (*CAAffiliationResponse, error) {
ret := m.ctrl.Call(m, "ModifyAffiliation", identity, req)
ret0, _ := ret[0].(*CAAffiliationResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ModifyAffiliation indicates an expected call of ModifyAffiliation
func (mr *MockMembershipProviderMockRecorder) ModifyAffiliation(identity, req interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyAffiliation", reflect.TypeOf((*MockMembershipProvider)(nil).ModifyAffiliation), identity, req)
}
// ListAllIdentities mocks base method
func (m *MockMembershipProvider) ListAllIdentities(identity *Identity, caName string) (*CAListAllIdentitiesResponse, error) {
ret := m.ctrl.Call(m, "ListAllIdentities", identity, caName)
ret0, _ := ret[0].(*CAListAllIdentitiesResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListAllIdentities indicates an expected call of ListAllIdentities
func (mr *MockMembershipProviderMockRecorder) ListAllIdentities(identity, caName interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAllIdentities", reflect.TypeOf((*MockMembershipProvider)(nil).ListAllIdentities), identity, caName)
}
// GetIdentity mocks base method
func (m *MockMembershipProvider) GetIdentity(identity *Identity, id, caName string) (*CAGetIdentityResponse, error) {
ret := m.ctrl.Call(m, "GetIdentity", identity, id, caName)
ret0, _ := ret[0].(*CAGetIdentityResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetIdentity indicates an expected call of GetIdentity
func (mr *MockMembershipProviderMockRecorder) GetIdentity(identity, id, caName interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIdentity", reflect.TypeOf((*MockMembershipProvider)(nil).GetIdentity), identity, id, caName)
}
// RemoveIdentity mocks base method
func (m *MockMembershipProvider) RemoveIdentity(identity *Identity, req CARemoveIdentityRequest) (*CAGetIdentityResponse, error) {
ret := m.ctrl.Call(m, "RemoveIdentity", identity, req)
ret0, _ := ret[0].(*CAGetIdentityResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RemoveIdentity indicates an expected call of RemoveIdentity
func (mr *MockMembershipProviderMockRecorder) RemoveIdentity(identity, req interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveIdentity", reflect.TypeOf((*MockMembershipProvider)(nil).RemoveIdentity), identity, req)
}
// ModifyIdentity mocks base method
func (m *MockMembershipProvider) ModifyIdentity(identity *Identity, req CAModifyIdentityRequest) (*CAGetIdentityResponse, error) {
ret := m.ctrl.Call(m, "ModifyIdentity", identity, req)
ret0, _ := ret[0].(*CAGetIdentityResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ModifyIdentity indicates an expected call of ModifyIdentity
func (mr *MockMembershipProviderMockRecorder) ModifyIdentity(identity, req interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyIdentity", reflect.TypeOf((*MockMembershipProvider)(nil).ModifyIdentity), identity, req)
}