-
Notifications
You must be signed in to change notification settings - Fork 286
/
client.go
150 lines (127 loc) Β· 5.45 KB
/
client.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/aws/eks-anywhere/pkg/providers/vsphere/setupuser (interfaces: GovcClient)
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
)
// MockGovcClient is a mock of GovcClient interface.
type MockGovcClient struct {
ctrl *gomock.Controller
recorder *MockGovcClientMockRecorder
}
// MockGovcClientMockRecorder is the mock recorder for MockGovcClient.
type MockGovcClientMockRecorder struct {
mock *MockGovcClient
}
// NewMockGovcClient creates a new mock instance.
func NewMockGovcClient(ctrl *gomock.Controller) *MockGovcClient {
mock := &MockGovcClient{ctrl: ctrl}
mock.recorder = &MockGovcClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockGovcClient) EXPECT() *MockGovcClientMockRecorder {
return m.recorder
}
// AddUserToGroup mocks base method.
func (m *MockGovcClient) AddUserToGroup(arg0 context.Context, arg1, arg2 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddUserToGroup", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// AddUserToGroup indicates an expected call of AddUserToGroup.
func (mr *MockGovcClientMockRecorder) AddUserToGroup(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserToGroup", reflect.TypeOf((*MockGovcClient)(nil).AddUserToGroup), arg0, arg1, arg2)
}
// CreateGroup mocks base method.
func (m *MockGovcClient) CreateGroup(arg0 context.Context, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateGroup", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// CreateGroup indicates an expected call of CreateGroup.
func (mr *MockGovcClientMockRecorder) CreateGroup(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateGroup", reflect.TypeOf((*MockGovcClient)(nil).CreateGroup), arg0, arg1)
}
// CreateRole mocks base method.
func (m *MockGovcClient) CreateRole(arg0 context.Context, arg1 string, arg2 []string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateRole", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// CreateRole indicates an expected call of CreateRole.
func (mr *MockGovcClientMockRecorder) CreateRole(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRole", reflect.TypeOf((*MockGovcClient)(nil).CreateRole), arg0, arg1, arg2)
}
// CreateUser mocks base method.
func (m *MockGovcClient) CreateUser(arg0 context.Context, arg1, arg2 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateUser", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// CreateUser indicates an expected call of CreateUser.
func (mr *MockGovcClientMockRecorder) CreateUser(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUser", reflect.TypeOf((*MockGovcClient)(nil).CreateUser), arg0, arg1, arg2)
}
// GroupExists mocks base method.
func (m *MockGovcClient) GroupExists(arg0 context.Context, arg1 string) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GroupExists", arg0, arg1)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GroupExists indicates an expected call of GroupExists.
func (mr *MockGovcClientMockRecorder) GroupExists(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GroupExists", reflect.TypeOf((*MockGovcClient)(nil).GroupExists), arg0, arg1)
}
// RoleExists mocks base method.
func (m *MockGovcClient) RoleExists(arg0 context.Context, arg1 string) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RoleExists", arg0, arg1)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RoleExists indicates an expected call of RoleExists.
func (mr *MockGovcClientMockRecorder) RoleExists(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoleExists", reflect.TypeOf((*MockGovcClient)(nil).RoleExists), arg0, arg1)
}
// SetGroupRoleOnObject mocks base method.
func (m *MockGovcClient) SetGroupRoleOnObject(arg0 context.Context, arg1, arg2, arg3, arg4 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetGroupRoleOnObject", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// SetGroupRoleOnObject indicates an expected call of SetGroupRoleOnObject.
func (mr *MockGovcClientMockRecorder) SetGroupRoleOnObject(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetGroupRoleOnObject", reflect.TypeOf((*MockGovcClient)(nil).SetGroupRoleOnObject), arg0, arg1, arg2, arg3, arg4)
}
// UserExists mocks base method.
func (m *MockGovcClient) UserExists(arg0 context.Context, arg1 string) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UserExists", arg0, arg1)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UserExists indicates an expected call of UserExists.
func (mr *MockGovcClientMockRecorder) UserExists(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserExists", reflect.TypeOf((*MockGovcClient)(nil).UserExists), arg0, arg1)
}