github.com/mmatczuk/gohan@v0.0.0-20170206152520-30e45d9bdb69/db/mocks/db.go (about)

     1  // Copyright (C) 2015 NTT Innovation Institute, Inc.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //    http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    12  // implied.
    13  // See the License for the specific language governing permissions and
    14  // limitations under the License.
    15  
    16  // Automatically generated by MockGen. DO NOT EDIT!
    17  // Source: db.go
    18  
    19  package mocks
    20  
    21  import (
    22  	transaction "github.com/cloudwan/gohan/db/transaction"
    23  	schema "github.com/cloudwan/gohan/schema"
    24  	gomock "github.com/golang/mock/gomock"
    25  )
    26  
    27  // Mock of DB interface
    28  type MockDB struct {
    29  	ctrl     *gomock.Controller
    30  	recorder *_MockDBRecorder
    31  }
    32  
    33  // Recorder for MockDB (not exported)
    34  type _MockDBRecorder struct {
    35  	mock *MockDB
    36  }
    37  
    38  func NewMockDB(ctrl *gomock.Controller) *MockDB {
    39  	mock := &MockDB{ctrl: ctrl}
    40  	mock.recorder = &_MockDBRecorder{mock}
    41  	return mock
    42  }
    43  
    44  func (_m *MockDB) EXPECT() *_MockDBRecorder {
    45  	return _m.recorder
    46  }
    47  
    48  func (_m *MockDB) Connect(_param0 string, _param1 string, _param2 int) error {
    49  	ret := _m.ctrl.Call(_m, "Connect", _param0, _param1, _param2)
    50  	ret0, _ := ret[0].(error)
    51  	return ret0
    52  }
    53  
    54  func (_mr *_MockDBRecorder) Connect(arg0, arg1, arg2 interface{}) *gomock.Call {
    55  	return _mr.mock.ctrl.RecordCall(_mr.mock, "Connect", arg0, arg1, arg2)
    56  }
    57  
    58  func (_m *MockDB) Begin() (transaction.Transaction, error) {
    59  	ret := _m.ctrl.Call(_m, "Begin")
    60  	ret0, _ := ret[0].(transaction.Transaction)
    61  	ret1, _ := ret[1].(error)
    62  	return ret0, ret1
    63  }
    64  
    65  func (_mr *_MockDBRecorder) Begin() *gomock.Call {
    66  	return _mr.mock.ctrl.RecordCall(_mr.mock, "Begin")
    67  }
    68  
    69  func (_m *MockDB) RegisterTable(_param0 *schema.Schema, _param1 bool) error {
    70  	ret := _m.ctrl.Call(_m, "RegisterTable", _param0, _param1)
    71  	ret0, _ := ret[0].(error)
    72  	return ret0
    73  }
    74  
    75  func (_mr *_MockDBRecorder) RegisterTable(arg0, arg1 interface{}) *gomock.Call {
    76  	return _mr.mock.ctrl.RecordCall(_mr.mock, "RegisterTable", arg0, arg1)
    77  }
    78  
    79  func (_m *MockDB) DropTable(_param0 *schema.Schema) error {
    80  	ret := _m.ctrl.Call(_m, "DropTable", _param0)
    81  	ret0, _ := ret[0].(error)
    82  	return ret0
    83  }
    84  
    85  func (_mr *_MockDBRecorder) DropTable(arg0 interface{}) *gomock.Call {
    86  	return _mr.mock.ctrl.RecordCall(_mr.mock, "DropTable", arg0)
    87  }
    88  
    89  func (_m *MockDB) Close() {
    90  	_m.ctrl.Call(_m, "Close")
    91  }
    92  
    93  func (_mr *_MockDBRecorder) Close() *gomock.Call {
    94  	return _mr.mock.ctrl.RecordCall(_mr.mock, "Close")
    95  }