github.com/willyham/dosa@v2.3.1-0.20171024181418-1e446d37ee71+incompatible/mocks/connector.go (about)

     1  // Copyright (c) 2017 Uber Technologies, Inc.
     2  //
     3  // Permission is hereby granted, free of charge, to any person obtaining a copy
     4  // of this software and associated documentation files (the "Software"), to deal
     5  // in the Software without restriction, including without limitation the rights
     6  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     7  // copies of the Software, and to permit persons to whom the Software is
     8  // furnished to do so, subject to the following conditions:
     9  //
    10  // The above copyright notice and this permission notice shall be included in
    11  // all copies or substantial portions of the Software.
    12  //
    13  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    14  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    15  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    16  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    17  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    18  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    19  // THE SOFTWARE.
    20  
    21  // Automatically generated by MockGen. DO NOT EDIT!
    22  // Source: github.com/uber-go/dosa (interfaces: Connector)
    23  
    24  package mocks
    25  
    26  import (
    27  	context "context"
    28  
    29  	gomock "github.com/golang/mock/gomock"
    30  	dosa "github.com/uber-go/dosa"
    31  )
    32  
    33  // MockConnector is a mock of Connector interface
    34  type MockConnector struct {
    35  	ctrl     *gomock.Controller
    36  	recorder *_MockConnectorRecorder
    37  }
    38  
    39  // Recorder for MockConnector (not exported)
    40  type _MockConnectorRecorder struct {
    41  	mock *MockConnector
    42  }
    43  
    44  // NewMockConnector creates a new mock
    45  func NewMockConnector(ctrl *gomock.Controller) *MockConnector {
    46  	mock := &MockConnector{ctrl: ctrl}
    47  	mock.recorder = &_MockConnectorRecorder{mock}
    48  	return mock
    49  }
    50  
    51  // EXPECT adds an expectation
    52  func (_m *MockConnector) EXPECT() *_MockConnectorRecorder {
    53  	return _m.recorder
    54  }
    55  
    56  // CheckSchema is a mock implementation of MockConnector.CheckSchema
    57  func (_m *MockConnector) CheckSchema(_param0 context.Context, _param1 string, _param2 string, _param3 []*dosa.EntityDefinition) (int32, error) {
    58  	ret := _m.ctrl.Call(_m, "CheckSchema", _param0, _param1, _param2, _param3)
    59  	ret0, _ := ret[0].(int32)
    60  	ret1, _ := ret[1].(error)
    61  	return ret0, ret1
    62  }
    63  
    64  func (_mr *_MockConnectorRecorder) CheckSchema(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
    65  	return _mr.mock.ctrl.RecordCall(_mr.mock, "CheckSchema", arg0, arg1, arg2, arg3)
    66  }
    67  
    68  // CheckSchemaStatus is a mock implementation of MockConnector.CheckSchemaStatus
    69  func (_m *MockConnector) CheckSchemaStatus(_param0 context.Context, _param1 string, _param2 string, _param3 int32) (*dosa.SchemaStatus, error) {
    70  	ret := _m.ctrl.Call(_m, "CheckSchemaStatus", _param0, _param1, _param2, _param3)
    71  	ret0, _ := ret[0].(*dosa.SchemaStatus)
    72  	ret1, _ := ret[1].(error)
    73  	return ret0, ret1
    74  }
    75  
    76  func (_mr *_MockConnectorRecorder) CheckSchemaStatus(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
    77  	return _mr.mock.ctrl.RecordCall(_mr.mock, "CheckSchemaStatus", arg0, arg1, arg2, arg3)
    78  }
    79  
    80  // CreateIfNotExists is a mock implementation of MockConnector.CreateIfNotExists
    81  func (_m *MockConnector) CreateIfNotExists(_param0 context.Context, _param1 *dosa.EntityInfo, _param2 map[string]dosa.FieldValue) error {
    82  	ret := _m.ctrl.Call(_m, "CreateIfNotExists", _param0, _param1, _param2)
    83  	ret0, _ := ret[0].(error)
    84  	return ret0
    85  }
    86  
    87  func (_mr *_MockConnectorRecorder) CreateIfNotExists(arg0, arg1, arg2 interface{}) *gomock.Call {
    88  	return _mr.mock.ctrl.RecordCall(_mr.mock, "CreateIfNotExists", arg0, arg1, arg2)
    89  }
    90  
    91  // CreateScope is a mock implementation of MockConnector.CreateScope
    92  func (_m *MockConnector) CreateScope(_param0 context.Context, _param1 string) error {
    93  	ret := _m.ctrl.Call(_m, "CreateScope", _param0, _param1)
    94  	ret0, _ := ret[0].(error)
    95  	return ret0
    96  }
    97  
    98  func (_mr *_MockConnectorRecorder) CreateScope(arg0, arg1 interface{}) *gomock.Call {
    99  	return _mr.mock.ctrl.RecordCall(_mr.mock, "CreateScope", arg0, arg1)
   100  }
   101  
   102  // DropScope is a mock implementation of MockConnector.DropScope
   103  func (_m *MockConnector) DropScope(_param0 context.Context, _param1 string) error {
   104  	ret := _m.ctrl.Call(_m, "DropScope", _param0, _param1)
   105  	ret0, _ := ret[0].(error)
   106  	return ret0
   107  }
   108  
   109  func (_mr *_MockConnectorRecorder) DropScope(arg0, arg1 interface{}) *gomock.Call {
   110  	return _mr.mock.ctrl.RecordCall(_mr.mock, "DropScope", arg0, arg1)
   111  }
   112  
   113  // MultiRead is a mock implementation of MockConnector.MultiRead
   114  func (_m *MockConnector) MultiRead(_param0 context.Context, _param1 *dosa.EntityInfo, _param2 []map[string]dosa.FieldValue, _param3 []string) ([]*dosa.FieldValuesOrError, error) {
   115  	ret := _m.ctrl.Call(_m, "MultiRead", _param0, _param1, _param2, _param3)
   116  	ret0, _ := ret[0].([]*dosa.FieldValuesOrError)
   117  	ret1, _ := ret[1].(error)
   118  	return ret0, ret1
   119  }
   120  
   121  func (_mr *_MockConnectorRecorder) MultiRead(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
   122  	return _mr.mock.ctrl.RecordCall(_mr.mock, "MultiRead", arg0, arg1, arg2, arg3)
   123  }
   124  
   125  // MultiRemove is a mock implementation of MockConnector.MultiRemove
   126  func (_m *MockConnector) MultiRemove(_param0 context.Context, _param1 *dosa.EntityInfo, _param2 []map[string]dosa.FieldValue) ([]error, error) {
   127  	ret := _m.ctrl.Call(_m, "MultiRemove", _param0, _param1, _param2)
   128  	ret0, _ := ret[0].([]error)
   129  	ret1, _ := ret[1].(error)
   130  	return ret0, ret1
   131  }
   132  
   133  func (_mr *_MockConnectorRecorder) MultiRemove(arg0, arg1, arg2 interface{}) *gomock.Call {
   134  	return _mr.mock.ctrl.RecordCall(_mr.mock, "MultiRemove", arg0, arg1, arg2)
   135  }
   136  
   137  // MultiUpsert is a mock implementation of MockConnector.MultiUpsert
   138  func (_m *MockConnector) MultiUpsert(_param0 context.Context, _param1 *dosa.EntityInfo, _param2 []map[string]dosa.FieldValue) ([]error, error) {
   139  	ret := _m.ctrl.Call(_m, "MultiUpsert", _param0, _param1, _param2)
   140  	ret0, _ := ret[0].([]error)
   141  	ret1, _ := ret[1].(error)
   142  	return ret0, ret1
   143  }
   144  
   145  func (_mr *_MockConnectorRecorder) MultiUpsert(arg0, arg1, arg2 interface{}) *gomock.Call {
   146  	return _mr.mock.ctrl.RecordCall(_mr.mock, "MultiUpsert", arg0, arg1, arg2)
   147  }
   148  
   149  // Range is a mock implementation of MockConnector.Range
   150  func (_m *MockConnector) Range(_param0 context.Context, _param1 *dosa.EntityInfo, _param2 map[string][]*dosa.Condition, _param3 []string, _param4 string, _param5 int) ([]map[string]dosa.FieldValue, string, error) {
   151  	ret := _m.ctrl.Call(_m, "Range", _param0, _param1, _param2, _param3, _param4, _param5)
   152  	ret0, _ := ret[0].([]map[string]dosa.FieldValue)
   153  	ret1, _ := ret[1].(string)
   154  	ret2, _ := ret[2].(error)
   155  	return ret0, ret1, ret2
   156  }
   157  
   158  func (_mr *_MockConnectorRecorder) Range(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {
   159  	return _mr.mock.ctrl.RecordCall(_mr.mock, "Range", arg0, arg1, arg2, arg3, arg4, arg5)
   160  }
   161  
   162  // Read is a mock implementation of MockConnector.Read
   163  func (_m *MockConnector) Read(_param0 context.Context, _param1 *dosa.EntityInfo, _param2 map[string]dosa.FieldValue, _param3 []string) (map[string]dosa.FieldValue, error) {
   164  	ret := _m.ctrl.Call(_m, "Read", _param0, _param1, _param2, _param3)
   165  	ret0, _ := ret[0].(map[string]dosa.FieldValue)
   166  	ret1, _ := ret[1].(error)
   167  	return ret0, ret1
   168  }
   169  
   170  func (_mr *_MockConnectorRecorder) Read(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
   171  	return _mr.mock.ctrl.RecordCall(_mr.mock, "Read", arg0, arg1, arg2, arg3)
   172  }
   173  
   174  // Remove is a mock implementation of MockConnector.Remove
   175  func (_m *MockConnector) Remove(_param0 context.Context, _param1 *dosa.EntityInfo, _param2 map[string]dosa.FieldValue) error {
   176  	ret := _m.ctrl.Call(_m, "Remove", _param0, _param1, _param2)
   177  	ret0, _ := ret[0].(error)
   178  	return ret0
   179  }
   180  
   181  func (_mr *_MockConnectorRecorder) Remove(arg0, arg1, arg2 interface{}) *gomock.Call {
   182  	return _mr.mock.ctrl.RecordCall(_mr.mock, "Remove", arg0, arg1, arg2)
   183  }
   184  
   185  // RemoveRange is a mock implementation of MockConnector.RemoveRange
   186  func (_m *MockConnector) RemoveRange(_param0 context.Context, _param1 *dosa.EntityInfo, _param2 map[string][]*dosa.Condition) error {
   187  	ret := _m.ctrl.Call(_m, "RemoveRange", _param0, _param1, _param2)
   188  	ret0, _ := ret[0].(error)
   189  	return ret0
   190  }
   191  
   192  func (_mr *_MockConnectorRecorder) RemoveRange(arg0, arg1, arg2 interface{}) *gomock.Call {
   193  	return _mr.mock.ctrl.RecordCall(_mr.mock, "RemoveRange", arg0, arg1, arg2)
   194  }
   195  
   196  // Scan is a mock implementation of MockConnector.Scan
   197  func (_m *MockConnector) Scan(_param0 context.Context, _param1 *dosa.EntityInfo, _param2 []string, _param3 string, _param4 int) ([]map[string]dosa.FieldValue, string, error) {
   198  	ret := _m.ctrl.Call(_m, "Scan", _param0, _param1, _param2, _param3, _param4)
   199  	ret0, _ := ret[0].([]map[string]dosa.FieldValue)
   200  	ret1, _ := ret[1].(string)
   201  	ret2, _ := ret[2].(error)
   202  	return ret0, ret1, ret2
   203  }
   204  
   205  func (_mr *_MockConnectorRecorder) Scan(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
   206  	return _mr.mock.ctrl.RecordCall(_mr.mock, "Scan", arg0, arg1, arg2, arg3, arg4)
   207  }
   208  
   209  // ScopeExists is a mock implementation of MockConnector.ScopeExists
   210  func (_m *MockConnector) ScopeExists(_param0 context.Context, _param1 string) (bool, error) {
   211  	ret := _m.ctrl.Call(_m, "ScopeExists", _param0, _param1)
   212  	ret0, _ := ret[0].(bool)
   213  	ret1, _ := ret[1].(error)
   214  	return ret0, ret1
   215  }
   216  
   217  func (_mr *_MockConnectorRecorder) ScopeExists(arg0, arg1 interface{}) *gomock.Call {
   218  	return _mr.mock.ctrl.RecordCall(_mr.mock, "ScopeExists", arg0, arg1)
   219  }
   220  
   221  // Shutdown is a mock implementation of MockConnector.Shutdown
   222  func (_m *MockConnector) Shutdown() error {
   223  	ret := _m.ctrl.Call(_m, "Shutdown")
   224  	ret0, _ := ret[0].(error)
   225  	return ret0
   226  }
   227  
   228  func (_mr *_MockConnectorRecorder) Shutdown() *gomock.Call {
   229  	return _mr.mock.ctrl.RecordCall(_mr.mock, "Shutdown")
   230  }
   231  
   232  // TruncateScope is a mock implementation of MockConnector.TruncateScope
   233  func (_m *MockConnector) TruncateScope(_param0 context.Context, _param1 string) error {
   234  	ret := _m.ctrl.Call(_m, "TruncateScope", _param0, _param1)
   235  	ret0, _ := ret[0].(error)
   236  	return ret0
   237  }
   238  
   239  func (_mr *_MockConnectorRecorder) TruncateScope(arg0, arg1 interface{}) *gomock.Call {
   240  	return _mr.mock.ctrl.RecordCall(_mr.mock, "TruncateScope", arg0, arg1)
   241  }
   242  
   243  // Upsert is a mock implementation of MockConnector.Upsert
   244  func (_m *MockConnector) Upsert(_param0 context.Context, _param1 *dosa.EntityInfo, _param2 map[string]dosa.FieldValue) error {
   245  	ret := _m.ctrl.Call(_m, "Upsert", _param0, _param1, _param2)
   246  	ret0, _ := ret[0].(error)
   247  	return ret0
   248  }
   249  
   250  func (_mr *_MockConnectorRecorder) Upsert(arg0, arg1, arg2 interface{}) *gomock.Call {
   251  	return _mr.mock.ctrl.RecordCall(_mr.mock, "Upsert", arg0, arg1, arg2)
   252  }
   253  
   254  // UpsertSchema is a mock implementation of MockConnector.UpsertSchema
   255  func (_m *MockConnector) UpsertSchema(_param0 context.Context, _param1 string, _param2 string, _param3 []*dosa.EntityDefinition) (*dosa.SchemaStatus, error) {
   256  	ret := _m.ctrl.Call(_m, "UpsertSchema", _param0, _param1, _param2, _param3)
   257  	ret0, _ := ret[0].(*dosa.SchemaStatus)
   258  	ret1, _ := ret[1].(error)
   259  	return ret0, ret1
   260  }
   261  
   262  func (_mr *_MockConnectorRecorder) UpsertSchema(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
   263  	return _mr.mock.ctrl.RecordCall(_mr.mock, "UpsertSchema", arg0, arg1, arg2, arg3)
   264  }