mirror of
https://github.com/rancher/steve.git
synced 2025-07-02 09:42:07 +00:00
76 lines
2.3 KiB
Go
76 lines
2.3 KiB
Go
|
// Code generated by MockGen. DO NOT EDIT.
|
||
|
// Source: github.com/rancher/steve/pkg/sqlcache/db/transaction (interfaces: Client)
|
||
|
//
|
||
|
// Generated by this command:
|
||
|
//
|
||
|
// mockgen --build_flags=--mod=mod -package factory -destination ./transaction_mocks_tests.go -mock_names Client=MockTXClient github.com/rancher/steve/pkg/sqlcache/db/transaction Client
|
||
|
//
|
||
|
|
||
|
// Package factory is a generated GoMock package.
|
||
|
package factory
|
||
|
|
||
|
import (
|
||
|
sql "database/sql"
|
||
|
reflect "reflect"
|
||
|
|
||
|
transaction "github.com/rancher/steve/pkg/sqlcache/db/transaction"
|
||
|
gomock "go.uber.org/mock/gomock"
|
||
|
)
|
||
|
|
||
|
// MockTXClient is a mock of Client interface.
|
||
|
type MockTXClient struct {
|
||
|
ctrl *gomock.Controller
|
||
|
recorder *MockTXClientMockRecorder
|
||
|
}
|
||
|
|
||
|
// MockTXClientMockRecorder is the mock recorder for MockTXClient.
|
||
|
type MockTXClientMockRecorder struct {
|
||
|
mock *MockTXClient
|
||
|
}
|
||
|
|
||
|
// NewMockTXClient creates a new mock instance.
|
||
|
func NewMockTXClient(ctrl *gomock.Controller) *MockTXClient {
|
||
|
mock := &MockTXClient{ctrl: ctrl}
|
||
|
mock.recorder = &MockTXClientMockRecorder{mock}
|
||
|
return mock
|
||
|
}
|
||
|
|
||
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
||
|
func (m *MockTXClient) EXPECT() *MockTXClientMockRecorder {
|
||
|
return m.recorder
|
||
|
}
|
||
|
|
||
|
// Exec mocks base method.
|
||
|
func (m *MockTXClient) Exec(arg0 string, arg1 ...any) (sql.Result, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
varargs := []any{arg0}
|
||
|
for _, a := range arg1 {
|
||
|
varargs = append(varargs, a)
|
||
|
}
|
||
|
ret := m.ctrl.Call(m, "Exec", varargs...)
|
||
|
ret0, _ := ret[0].(sql.Result)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// Exec indicates an expected call of Exec.
|
||
|
func (mr *MockTXClientMockRecorder) Exec(arg0 any, arg1 ...any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
varargs := append([]any{arg0}, arg1...)
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockTXClient)(nil).Exec), varargs...)
|
||
|
}
|
||
|
|
||
|
// Stmt mocks base method.
|
||
|
func (m *MockTXClient) Stmt(arg0 *sql.Stmt) transaction.Stmt {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "Stmt", arg0)
|
||
|
ret0, _ := ret[0].(transaction.Stmt)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// Stmt indicates an expected call of Stmt.
|
||
|
func (mr *MockTXClientMockRecorder) Stmt(arg0 any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stmt", reflect.TypeOf((*MockTXClient)(nil).Stmt), arg0)
|
||
|
}
|