forked from xoanmi/goharbor-client
/
ldap_client_service.go
127 lines (102 loc) · 3.86 KB
/
ldap_client_service.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
// Code generated by mockery v2.14.0. DO NOT EDIT.
package mocks
import (
ldap "github.com/peresureda/goharbor-client/v5/apiv2/internal/api/client/ldap"
mock "github.com/stretchr/testify/mock"
runtime "github.com/go-openapi/runtime"
)
// MockLdapClientService is an autogenerated mock type for the ClientService type
type MockLdapClientService struct {
mock.Mock
}
// ImportLdapUser provides a mock function with given fields: params, authInfo
func (_m *MockLdapClientService) ImportLdapUser(params *ldap.ImportLdapUserParams, authInfo runtime.ClientAuthInfoWriter) (*ldap.ImportLdapUserOK, error) {
ret := _m.Called(params, authInfo)
var r0 *ldap.ImportLdapUserOK
if rf, ok := ret.Get(0).(func(*ldap.ImportLdapUserParams, runtime.ClientAuthInfoWriter) *ldap.ImportLdapUserOK); ok {
r0 = rf(params, authInfo)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ldap.ImportLdapUserOK)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*ldap.ImportLdapUserParams, runtime.ClientAuthInfoWriter) error); ok {
r1 = rf(params, authInfo)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PingLdap provides a mock function with given fields: params, authInfo
func (_m *MockLdapClientService) PingLdap(params *ldap.PingLdapParams, authInfo runtime.ClientAuthInfoWriter) (*ldap.PingLdapOK, error) {
ret := _m.Called(params, authInfo)
var r0 *ldap.PingLdapOK
if rf, ok := ret.Get(0).(func(*ldap.PingLdapParams, runtime.ClientAuthInfoWriter) *ldap.PingLdapOK); ok {
r0 = rf(params, authInfo)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ldap.PingLdapOK)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*ldap.PingLdapParams, runtime.ClientAuthInfoWriter) error); ok {
r1 = rf(params, authInfo)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SearchLdapGroup provides a mock function with given fields: params, authInfo
func (_m *MockLdapClientService) SearchLdapGroup(params *ldap.SearchLdapGroupParams, authInfo runtime.ClientAuthInfoWriter) (*ldap.SearchLdapGroupOK, error) {
ret := _m.Called(params, authInfo)
var r0 *ldap.SearchLdapGroupOK
if rf, ok := ret.Get(0).(func(*ldap.SearchLdapGroupParams, runtime.ClientAuthInfoWriter) *ldap.SearchLdapGroupOK); ok {
r0 = rf(params, authInfo)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ldap.SearchLdapGroupOK)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*ldap.SearchLdapGroupParams, runtime.ClientAuthInfoWriter) error); ok {
r1 = rf(params, authInfo)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SearchLdapUser provides a mock function with given fields: params, authInfo
func (_m *MockLdapClientService) SearchLdapUser(params *ldap.SearchLdapUserParams, authInfo runtime.ClientAuthInfoWriter) (*ldap.SearchLdapUserOK, error) {
ret := _m.Called(params, authInfo)
var r0 *ldap.SearchLdapUserOK
if rf, ok := ret.Get(0).(func(*ldap.SearchLdapUserParams, runtime.ClientAuthInfoWriter) *ldap.SearchLdapUserOK); ok {
r0 = rf(params, authInfo)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ldap.SearchLdapUserOK)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*ldap.SearchLdapUserParams, runtime.ClientAuthInfoWriter) error); ok {
r1 = rf(params, authInfo)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SetTransport provides a mock function with given fields: transport
func (_m *MockLdapClientService) SetTransport(transport runtime.ClientTransport) {
_m.Called(transport)
}
type mockConstructorTestingTNewMockLdapClientService interface {
mock.TestingT
Cleanup(func())
}
// NewMockLdapClientService creates a new instance of MockLdapClientService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockLdapClientService(t mockConstructorTestingTNewMockLdapClientService) *MockLdapClientService {
mock := &MockLdapClientService{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}