...

Source file src/github.com/redhat-developer/odo/pkg/binding/mock.go

Documentation: github.com/redhat-developer/odo/pkg/binding

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: pkg/binding/interface.go
     3  
     4  // Package binding is a generated GoMock package.
     5  package binding
     6  
     7  import (
     8  	reflect "reflect"
     9  
    10  	parser "github.com/devfile/library/v2/pkg/devfile/parser"
    11  	gomock "github.com/golang/mock/gomock"
    12  	api "github.com/redhat-developer/odo/pkg/api"
    13  	asker "github.com/redhat-developer/odo/pkg/binding/asker"
    14  	unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
    15  	schema "k8s.io/apimachinery/pkg/runtime/schema"
    16  )
    17  
    18  // MockClient is a mock of Client interface.
    19  type MockClient struct {
    20  	ctrl     *gomock.Controller
    21  	recorder *MockClientMockRecorder
    22  }
    23  
    24  // MockClientMockRecorder is the mock recorder for MockClient.
    25  type MockClientMockRecorder struct {
    26  	mock *MockClient
    27  }
    28  
    29  // NewMockClient creates a new mock instance.
    30  func NewMockClient(ctrl *gomock.Controller) *MockClient {
    31  	mock := &MockClient{ctrl: ctrl}
    32  	mock.recorder = &MockClientMockRecorder{mock}
    33  	return mock
    34  }
    35  
    36  // EXPECT returns an object that allows the caller to indicate expected use.
    37  func (m *MockClient) EXPECT() *MockClientMockRecorder {
    38  	return m.recorder
    39  }
    40  
    41  // AddBinding mocks base method.
    42  func (m *MockClient) AddBinding(flags map[string]string, bindingName string, bindAsFiles bool, serviceNs, namingStrategy string, unstructuredService unstructured.Unstructured, workloadName string, workloadGVK schema.GroupVersionKind) ([]asker.CreationOption, string, string, error) {
    43  	m.ctrl.T.Helper()
    44  	ret := m.ctrl.Call(m, "AddBinding", flags, bindingName, bindAsFiles, serviceNs, namingStrategy, unstructuredService, workloadName, workloadGVK)
    45  	ret0, _ := ret[0].([]asker.CreationOption)
    46  	ret1, _ := ret[1].(string)
    47  	ret2, _ := ret[2].(string)
    48  	ret3, _ := ret[3].(error)
    49  	return ret0, ret1, ret2, ret3
    50  }
    51  
    52  // AddBinding indicates an expected call of AddBinding.
    53  func (mr *MockClientMockRecorder) AddBinding(flags, bindingName, bindAsFiles, serviceNs, namingStrategy, unstructuredService, workloadName, workloadGVK interface{}) *gomock.Call {
    54  	mr.mock.ctrl.T.Helper()
    55  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBinding", reflect.TypeOf((*MockClient)(nil).AddBinding), flags, bindingName, bindAsFiles, serviceNs, namingStrategy, unstructuredService, workloadName, workloadGVK)
    56  }
    57  
    58  // AddBindingToDevfile mocks base method.
    59  func (m *MockClient) AddBindingToDevfile(componentName, bindingName string, bindAsFiles bool, serviceNs, namingStrategy string, unstructuredService unstructured.Unstructured, obj parser.DevfileObj) (parser.DevfileObj, error) {
    60  	m.ctrl.T.Helper()
    61  	ret := m.ctrl.Call(m, "AddBindingToDevfile", componentName, bindingName, bindAsFiles, serviceNs, namingStrategy, unstructuredService, obj)
    62  	ret0, _ := ret[0].(parser.DevfileObj)
    63  	ret1, _ := ret[1].(error)
    64  	return ret0, ret1
    65  }
    66  
    67  // AddBindingToDevfile indicates an expected call of AddBindingToDevfile.
    68  func (mr *MockClientMockRecorder) AddBindingToDevfile(componentName, bindingName, bindAsFiles, serviceNs, namingStrategy, unstructuredService, obj interface{}) *gomock.Call {
    69  	mr.mock.ctrl.T.Helper()
    70  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBindingToDevfile", reflect.TypeOf((*MockClient)(nil).AddBindingToDevfile), componentName, bindingName, bindAsFiles, serviceNs, namingStrategy, unstructuredService, obj)
    71  }
    72  
    73  // AskBindAsFiles mocks base method.
    74  func (m *MockClient) AskBindAsFiles(flags map[string]string) (bool, error) {
    75  	m.ctrl.T.Helper()
    76  	ret := m.ctrl.Call(m, "AskBindAsFiles", flags)
    77  	ret0, _ := ret[0].(bool)
    78  	ret1, _ := ret[1].(error)
    79  	return ret0, ret1
    80  }
    81  
    82  // AskBindAsFiles indicates an expected call of AskBindAsFiles.
    83  func (mr *MockClientMockRecorder) AskBindAsFiles(flags interface{}) *gomock.Call {
    84  	mr.mock.ctrl.T.Helper()
    85  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AskBindAsFiles", reflect.TypeOf((*MockClient)(nil).AskBindAsFiles), flags)
    86  }
    87  
    88  // AskBindingName mocks base method.
    89  func (m *MockClient) AskBindingName(serviceName, componentName string, flags map[string]string) (string, error) {
    90  	m.ctrl.T.Helper()
    91  	ret := m.ctrl.Call(m, "AskBindingName", serviceName, componentName, flags)
    92  	ret0, _ := ret[0].(string)
    93  	ret1, _ := ret[1].(error)
    94  	return ret0, ret1
    95  }
    96  
    97  // AskBindingName indicates an expected call of AskBindingName.
    98  func (mr *MockClientMockRecorder) AskBindingName(serviceName, componentName, flags interface{}) *gomock.Call {
    99  	mr.mock.ctrl.T.Helper()
   100  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AskBindingName", reflect.TypeOf((*MockClient)(nil).AskBindingName), serviceName, componentName, flags)
   101  }
   102  
   103  // AskNamingStrategy mocks base method.
   104  func (m *MockClient) AskNamingStrategy(flags map[string]string) (string, error) {
   105  	m.ctrl.T.Helper()
   106  	ret := m.ctrl.Call(m, "AskNamingStrategy", flags)
   107  	ret0, _ := ret[0].(string)
   108  	ret1, _ := ret[1].(error)
   109  	return ret0, ret1
   110  }
   111  
   112  // AskNamingStrategy indicates an expected call of AskNamingStrategy.
   113  func (mr *MockClientMockRecorder) AskNamingStrategy(flags interface{}) *gomock.Call {
   114  	mr.mock.ctrl.T.Helper()
   115  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AskNamingStrategy", reflect.TypeOf((*MockClient)(nil).AskNamingStrategy), flags)
   116  }
   117  
   118  // CheckServiceBindingsInjectionDone mocks base method.
   119  func (m *MockClient) CheckServiceBindingsInjectionDone(componentName, appName string) (bool, error) {
   120  	m.ctrl.T.Helper()
   121  	ret := m.ctrl.Call(m, "CheckServiceBindingsInjectionDone", componentName, appName)
   122  	ret0, _ := ret[0].(bool)
   123  	ret1, _ := ret[1].(error)
   124  	return ret0, ret1
   125  }
   126  
   127  // CheckServiceBindingsInjectionDone indicates an expected call of CheckServiceBindingsInjectionDone.
   128  func (mr *MockClientMockRecorder) CheckServiceBindingsInjectionDone(componentName, appName interface{}) *gomock.Call {
   129  	mr.mock.ctrl.T.Helper()
   130  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckServiceBindingsInjectionDone", reflect.TypeOf((*MockClient)(nil).CheckServiceBindingsInjectionDone), componentName, appName)
   131  }
   132  
   133  // GetBindingFromCluster mocks base method.
   134  func (m *MockClient) GetBindingFromCluster(name string) (api.ServiceBinding, error) {
   135  	m.ctrl.T.Helper()
   136  	ret := m.ctrl.Call(m, "GetBindingFromCluster", name)
   137  	ret0, _ := ret[0].(api.ServiceBinding)
   138  	ret1, _ := ret[1].(error)
   139  	return ret0, ret1
   140  }
   141  
   142  // GetBindingFromCluster indicates an expected call of GetBindingFromCluster.
   143  func (mr *MockClientMockRecorder) GetBindingFromCluster(name interface{}) *gomock.Call {
   144  	mr.mock.ctrl.T.Helper()
   145  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBindingFromCluster", reflect.TypeOf((*MockClient)(nil).GetBindingFromCluster), name)
   146  }
   147  
   148  // GetBindingsFromDevfile mocks base method.
   149  func (m *MockClient) GetBindingsFromDevfile(devfileObj parser.DevfileObj, context string) ([]api.ServiceBinding, error) {
   150  	m.ctrl.T.Helper()
   151  	ret := m.ctrl.Call(m, "GetBindingsFromDevfile", devfileObj, context)
   152  	ret0, _ := ret[0].([]api.ServiceBinding)
   153  	ret1, _ := ret[1].(error)
   154  	return ret0, ret1
   155  }
   156  
   157  // GetBindingsFromDevfile indicates an expected call of GetBindingsFromDevfile.
   158  func (mr *MockClientMockRecorder) GetBindingsFromDevfile(devfileObj, context interface{}) *gomock.Call {
   159  	mr.mock.ctrl.T.Helper()
   160  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBindingsFromDevfile", reflect.TypeOf((*MockClient)(nil).GetBindingsFromDevfile), devfileObj, context)
   161  }
   162  
   163  // GetFlags mocks base method.
   164  func (m *MockClient) GetFlags(flags map[string]string) map[string]string {
   165  	m.ctrl.T.Helper()
   166  	ret := m.ctrl.Call(m, "GetFlags", flags)
   167  	ret0, _ := ret[0].(map[string]string)
   168  	return ret0
   169  }
   170  
   171  // GetFlags indicates an expected call of GetFlags.
   172  func (mr *MockClientMockRecorder) GetFlags(flags interface{}) *gomock.Call {
   173  	mr.mock.ctrl.T.Helper()
   174  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFlags", reflect.TypeOf((*MockClient)(nil).GetFlags), flags)
   175  }
   176  
   177  // GetServiceInstances mocks base method.
   178  func (m *MockClient) GetServiceInstances(namespace string) (map[string]unstructured.Unstructured, error) {
   179  	m.ctrl.T.Helper()
   180  	ret := m.ctrl.Call(m, "GetServiceInstances", namespace)
   181  	ret0, _ := ret[0].(map[string]unstructured.Unstructured)
   182  	ret1, _ := ret[1].(error)
   183  	return ret0, ret1
   184  }
   185  
   186  // GetServiceInstances indicates an expected call of GetServiceInstances.
   187  func (mr *MockClientMockRecorder) GetServiceInstances(namespace interface{}) *gomock.Call {
   188  	mr.mock.ctrl.T.Helper()
   189  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServiceInstances", reflect.TypeOf((*MockClient)(nil).GetServiceInstances), namespace)
   190  }
   191  
   192  // ListAllBindings mocks base method.
   193  func (m *MockClient) ListAllBindings(devfileObj *parser.DevfileObj, context string) ([]api.ServiceBinding, []string, error) {
   194  	m.ctrl.T.Helper()
   195  	ret := m.ctrl.Call(m, "ListAllBindings", devfileObj, context)
   196  	ret0, _ := ret[0].([]api.ServiceBinding)
   197  	ret1, _ := ret[1].([]string)
   198  	ret2, _ := ret[2].(error)
   199  	return ret0, ret1, ret2
   200  }
   201  
   202  // ListAllBindings indicates an expected call of ListAllBindings.
   203  func (mr *MockClientMockRecorder) ListAllBindings(devfileObj, context interface{}) *gomock.Call {
   204  	mr.mock.ctrl.T.Helper()
   205  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAllBindings", reflect.TypeOf((*MockClient)(nil).ListAllBindings), devfileObj, context)
   206  }
   207  
   208  // RemoveBinding mocks base method.
   209  func (m *MockClient) RemoveBinding(bindingName string, obj parser.DevfileObj) (parser.DevfileObj, error) {
   210  	m.ctrl.T.Helper()
   211  	ret := m.ctrl.Call(m, "RemoveBinding", bindingName, obj)
   212  	ret0, _ := ret[0].(parser.DevfileObj)
   213  	ret1, _ := ret[1].(error)
   214  	return ret0, ret1
   215  }
   216  
   217  // RemoveBinding indicates an expected call of RemoveBinding.
   218  func (mr *MockClientMockRecorder) RemoveBinding(bindingName, obj interface{}) *gomock.Call {
   219  	mr.mock.ctrl.T.Helper()
   220  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveBinding", reflect.TypeOf((*MockClient)(nil).RemoveBinding), bindingName, obj)
   221  }
   222  
   223  // SelectNamespace mocks base method.
   224  func (m *MockClient) SelectNamespace(flags map[string]string) (string, error) {
   225  	m.ctrl.T.Helper()
   226  	ret := m.ctrl.Call(m, "SelectNamespace", flags)
   227  	ret0, _ := ret[0].(string)
   228  	ret1, _ := ret[1].(error)
   229  	return ret0, ret1
   230  }
   231  
   232  // SelectNamespace indicates an expected call of SelectNamespace.
   233  func (mr *MockClientMockRecorder) SelectNamespace(flags interface{}) *gomock.Call {
   234  	mr.mock.ctrl.T.Helper()
   235  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectNamespace", reflect.TypeOf((*MockClient)(nil).SelectNamespace), flags)
   236  }
   237  
   238  // SelectServiceInstance mocks base method.
   239  func (m *MockClient) SelectServiceInstance(flags map[string]string, serviceMap map[string]unstructured.Unstructured) (string, error) {
   240  	m.ctrl.T.Helper()
   241  	ret := m.ctrl.Call(m, "SelectServiceInstance", flags, serviceMap)
   242  	ret0, _ := ret[0].(string)
   243  	ret1, _ := ret[1].(error)
   244  	return ret0, ret1
   245  }
   246  
   247  // SelectServiceInstance indicates an expected call of SelectServiceInstance.
   248  func (mr *MockClientMockRecorder) SelectServiceInstance(flags, serviceMap interface{}) *gomock.Call {
   249  	mr.mock.ctrl.T.Helper()
   250  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectServiceInstance", reflect.TypeOf((*MockClient)(nil).SelectServiceInstance), flags, serviceMap)
   251  }
   252  
   253  // SelectWorkloadInstance mocks base method.
   254  func (m *MockClient) SelectWorkloadInstance(flags map[string]string) (string, schema.GroupVersionKind, error) {
   255  	m.ctrl.T.Helper()
   256  	ret := m.ctrl.Call(m, "SelectWorkloadInstance", flags)
   257  	ret0, _ := ret[0].(string)
   258  	ret1, _ := ret[1].(schema.GroupVersionKind)
   259  	ret2, _ := ret[2].(error)
   260  	return ret0, ret1, ret2
   261  }
   262  
   263  // SelectWorkloadInstance indicates an expected call of SelectWorkloadInstance.
   264  func (mr *MockClientMockRecorder) SelectWorkloadInstance(flags interface{}) *gomock.Call {
   265  	mr.mock.ctrl.T.Helper()
   266  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectWorkloadInstance", reflect.TypeOf((*MockClient)(nil).SelectWorkloadInstance), flags)
   267  }
   268  
   269  // ValidateAddBinding mocks base method.
   270  func (m *MockClient) ValidateAddBinding(flags map[string]string, withDevfile bool) error {
   271  	m.ctrl.T.Helper()
   272  	ret := m.ctrl.Call(m, "ValidateAddBinding", flags, withDevfile)
   273  	ret0, _ := ret[0].(error)
   274  	return ret0
   275  }
   276  
   277  // ValidateAddBinding indicates an expected call of ValidateAddBinding.
   278  func (mr *MockClientMockRecorder) ValidateAddBinding(flags, withDevfile interface{}) *gomock.Call {
   279  	mr.mock.ctrl.T.Helper()
   280  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateAddBinding", reflect.TypeOf((*MockClient)(nil).ValidateAddBinding), flags, withDevfile)
   281  }
   282  
   283  // ValidateRemoveBinding mocks base method.
   284  func (m *MockClient) ValidateRemoveBinding(flags map[string]string) error {
   285  	m.ctrl.T.Helper()
   286  	ret := m.ctrl.Call(m, "ValidateRemoveBinding", flags)
   287  	ret0, _ := ret[0].(error)
   288  	return ret0
   289  }
   290  
   291  // ValidateRemoveBinding indicates an expected call of ValidateRemoveBinding.
   292  func (mr *MockClientMockRecorder) ValidateRemoveBinding(flags interface{}) *gomock.Call {
   293  	mr.mock.ctrl.T.Helper()
   294  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateRemoveBinding", reflect.TypeOf((*MockClient)(nil).ValidateRemoveBinding), flags)
   295  }
   296  

View as plain text