github.com/verrazzano/verrazzano@v1.7.0/platform-operator/mocks/controller_mock.go (about) 1 // Copyright (c) 2020, 2023, Oracle and/or its affiliates. 2 // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 // 4 5 // Code generated by MockGen. DO NOT EDIT. 6 // Source: sigs.k8s.io/controller-runtime/pkg/client (interfaces: Client,StatusWriter) 7 8 // Package mocks is a generated GoMock package. 9 package mocks 10 11 import ( 12 context "context" 13 gomock "github.com/golang/mock/gomock" 14 meta "k8s.io/apimachinery/pkg/api/meta" 15 runtime "k8s.io/apimachinery/pkg/runtime" 16 types "k8s.io/apimachinery/pkg/types" 17 reflect "reflect" 18 client "sigs.k8s.io/controller-runtime/pkg/client" 19 ) 20 21 // MockClient is a mock of Client interface 22 type MockClient struct { 23 ctrl *gomock.Controller 24 recorder *MockClientMockRecorder 25 } 26 27 // MockClientMockRecorder is the mock recorder for MockClient 28 type MockClientMockRecorder struct { 29 mock *MockClient 30 } 31 32 // NewMockClient creates a new mock instance 33 func NewMockClient(ctrl *gomock.Controller) *MockClient { 34 mock := &MockClient{ctrl: ctrl} 35 mock.recorder = &MockClientMockRecorder{mock} 36 return mock 37 } 38 39 // EXPECT returns an object that allows the caller to indicate expected use 40 func (m *MockClient) EXPECT() *MockClientMockRecorder { 41 return m.recorder 42 } 43 44 // Create mocks base method 45 func (m *MockClient) Create(arg0 context.Context, arg1 client.Object, arg2 ...client.CreateOption) error { 46 m.ctrl.T.Helper() 47 varargs := []interface{}{arg0, arg1} 48 for _, a := range arg2 { 49 varargs = append(varargs, a) 50 } 51 ret := m.ctrl.Call(m, "Create", varargs...) 52 ret0, _ := ret[0].(error) 53 return ret0 54 } 55 56 // Create indicates an expected call of Create 57 func (mr *MockClientMockRecorder) Create(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 58 mr.mock.ctrl.T.Helper() 59 varargs := append([]interface{}{arg0, arg1}, arg2...) 60 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockClient)(nil).Create), varargs...) 61 } 62 63 // Delete mocks base method 64 func (m *MockClient) Delete(arg0 context.Context, arg1 client.Object, arg2 ...client.DeleteOption) error { 65 m.ctrl.T.Helper() 66 varargs := []interface{}{arg0, arg1} 67 for _, a := range arg2 { 68 varargs = append(varargs, a) 69 } 70 ret := m.ctrl.Call(m, "Delete", varargs...) 71 ret0, _ := ret[0].(error) 72 return ret0 73 } 74 75 // Delete indicates an expected call of Delete 76 func (mr *MockClientMockRecorder) Delete(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 77 mr.mock.ctrl.T.Helper() 78 varargs := append([]interface{}{arg0, arg1}, arg2...) 79 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClient)(nil).Delete), varargs...) 80 } 81 82 // DeleteAllOf mocks base method 83 func (m *MockClient) DeleteAllOf(arg0 context.Context, arg1 client.Object, arg2 ...client.DeleteAllOfOption) error { 84 m.ctrl.T.Helper() 85 varargs := []interface{}{arg0, arg1} 86 for _, a := range arg2 { 87 varargs = append(varargs, a) 88 } 89 ret := m.ctrl.Call(m, "DeleteAllOf", varargs...) 90 ret0, _ := ret[0].(error) 91 return ret0 92 } 93 94 // DeleteAllOf indicates an expected call of DeleteAllOf 95 func (mr *MockClientMockRecorder) DeleteAllOf(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 96 mr.mock.ctrl.T.Helper() 97 varargs := append([]interface{}{arg0, arg1}, arg2...) 98 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAllOf", reflect.TypeOf((*MockClient)(nil).DeleteAllOf), varargs...) 99 } 100 101 // Get mocks base method 102 func (m *MockClient) Get(arg0 context.Context, arg1 types.NamespacedName, arg2 client.Object, arg3 ...client.GetOption) error { 103 m.ctrl.T.Helper() 104 varargs := []interface{}{arg0, arg1, arg2} 105 for _, a := range arg3 { 106 varargs = append(varargs, a) 107 } 108 ret := m.ctrl.Call(m, "Get", varargs...) 109 ret0, _ := ret[0].(error) 110 return ret0 111 } 112 113 // Get indicates an expected call of Get 114 func (mr *MockClientMockRecorder) Get(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { 115 mr.mock.ctrl.T.Helper() 116 varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) 117 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockClient)(nil).Get), varargs...) 118 } 119 120 // List mocks base method 121 func (m *MockClient) List(arg0 context.Context, arg1 client.ObjectList, arg2 ...client.ListOption) error { 122 m.ctrl.T.Helper() 123 varargs := []interface{}{arg0, arg1} 124 for _, a := range arg2 { 125 varargs = append(varargs, a) 126 } 127 ret := m.ctrl.Call(m, "List", varargs...) 128 ret0, _ := ret[0].(error) 129 return ret0 130 } 131 132 // List indicates an expected call of List 133 func (mr *MockClientMockRecorder) List(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 134 mr.mock.ctrl.T.Helper() 135 varargs := append([]interface{}{arg0, arg1}, arg2...) 136 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockClient)(nil).List), varargs...) 137 } 138 139 // Patch mocks base method 140 func (m *MockClient) Patch(arg0 context.Context, arg1 client.Object, arg2 client.Patch, arg3 ...client.PatchOption) error { 141 m.ctrl.T.Helper() 142 varargs := []interface{}{arg0, arg1, arg2} 143 for _, a := range arg3 { 144 varargs = append(varargs, a) 145 } 146 ret := m.ctrl.Call(m, "Patch", varargs...) 147 ret0, _ := ret[0].(error) 148 return ret0 149 } 150 151 // Patch indicates an expected call of Patch 152 func (mr *MockClientMockRecorder) Patch(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { 153 mr.mock.ctrl.T.Helper() 154 varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) 155 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockClient)(nil).Patch), varargs...) 156 } 157 158 // RESTMapper mocks base method 159 func (m *MockClient) RESTMapper() meta.RESTMapper { 160 m.ctrl.T.Helper() 161 ret := m.ctrl.Call(m, "RESTMapper") 162 ret0, _ := ret[0].(meta.RESTMapper) 163 return ret0 164 } 165 166 // RESTMapper indicates an expected call of RESTMapper 167 func (mr *MockClientMockRecorder) RESTMapper() *gomock.Call { 168 mr.mock.ctrl.T.Helper() 169 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RESTMapper", reflect.TypeOf((*MockClient)(nil).RESTMapper)) 170 } 171 172 // Scheme mocks base method 173 func (m *MockClient) Scheme() *runtime.Scheme { 174 m.ctrl.T.Helper() 175 ret := m.ctrl.Call(m, "Scheme") 176 ret0, _ := ret[0].(*runtime.Scheme) 177 return ret0 178 } 179 180 // Scheme indicates an expected call of Scheme 181 func (mr *MockClientMockRecorder) Scheme() *gomock.Call { 182 mr.mock.ctrl.T.Helper() 183 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Scheme", reflect.TypeOf((*MockClient)(nil).Scheme)) 184 } 185 186 // Status mocks base method 187 func (m *MockClient) Status() client.StatusWriter { 188 m.ctrl.T.Helper() 189 ret := m.ctrl.Call(m, "Status") 190 ret0, _ := ret[0].(client.StatusWriter) 191 return ret0 192 } 193 194 // Status indicates an expected call of Status 195 func (mr *MockClientMockRecorder) Status() *gomock.Call { 196 mr.mock.ctrl.T.Helper() 197 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockClient)(nil).Status)) 198 } 199 200 // Update mocks base method 201 func (m *MockClient) Update(arg0 context.Context, arg1 client.Object, arg2 ...client.UpdateOption) error { 202 m.ctrl.T.Helper() 203 varargs := []interface{}{arg0, arg1} 204 for _, a := range arg2 { 205 varargs = append(varargs, a) 206 } 207 ret := m.ctrl.Call(m, "Update", varargs...) 208 ret0, _ := ret[0].(error) 209 return ret0 210 } 211 212 // Update indicates an expected call of Update 213 func (mr *MockClientMockRecorder) Update(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 214 mr.mock.ctrl.T.Helper() 215 varargs := append([]interface{}{arg0, arg1}, arg2...) 216 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockClient)(nil).Update), varargs...) 217 } 218 219 // MockStatusWriter is a mock of StatusWriter interface 220 type MockStatusWriter struct { 221 ctrl *gomock.Controller 222 recorder *MockStatusWriterMockRecorder 223 } 224 225 // MockStatusWriterMockRecorder is the mock recorder for MockStatusWriter 226 type MockStatusWriterMockRecorder struct { 227 mock *MockStatusWriter 228 } 229 230 // NewMockStatusWriter creates a new mock instance 231 func NewMockStatusWriter(ctrl *gomock.Controller) *MockStatusWriter { 232 mock := &MockStatusWriter{ctrl: ctrl} 233 mock.recorder = &MockStatusWriterMockRecorder{mock} 234 return mock 235 } 236 237 // EXPECT returns an object that allows the caller to indicate expected use 238 func (m *MockStatusWriter) EXPECT() *MockStatusWriterMockRecorder { 239 return m.recorder 240 } 241 242 // Patch mocks base method 243 func (m *MockStatusWriter) Patch(arg0 context.Context, arg1 client.Object, arg2 client.Patch, arg3 ...client.PatchOption) error { 244 m.ctrl.T.Helper() 245 varargs := []interface{}{arg0, arg1, arg2} 246 for _, a := range arg3 { 247 varargs = append(varargs, a) 248 } 249 ret := m.ctrl.Call(m, "Patch", varargs...) 250 ret0, _ := ret[0].(error) 251 return ret0 252 } 253 254 // Patch indicates an expected call of Patch 255 func (mr *MockStatusWriterMockRecorder) Patch(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { 256 mr.mock.ctrl.T.Helper() 257 varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) 258 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Patch", reflect.TypeOf((*MockStatusWriter)(nil).Patch), varargs...) 259 } 260 261 // Update mocks base method 262 func (m *MockStatusWriter) Update(arg0 context.Context, arg1 client.Object, arg2 ...client.UpdateOption) error { 263 m.ctrl.T.Helper() 264 varargs := []interface{}{arg0, arg1} 265 for _, a := range arg2 { 266 varargs = append(varargs, a) 267 } 268 ret := m.ctrl.Call(m, "Update", varargs...) 269 ret0, _ := ret[0].(error) 270 return ret0 271 } 272 273 // Update indicates an expected call of Update 274 func (mr *MockStatusWriterMockRecorder) Update(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 275 mr.mock.ctrl.T.Helper() 276 varargs := append([]interface{}{arg0, arg1}, arg2...) 277 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockStatusWriter)(nil).Update), varargs...) 278 }