mock

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

mockgen -source=test_driver.go -destination=./mock_driver.go -package=mock
mockgen -source=../datasource/datasource_manager.go -destination=./mock_datasource_manager.go -package=mock

Documentation

Overview

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDataSourceManager

type MockDataSourceManager struct {
	// contains filtered or unexported fields
}

MockDataSourceManager is a mock of DataSourceManager interface.

func NewMockDataSourceManager

func NewMockDataSourceManager(ctrl *gomock.Controller) *MockDataSourceManager

NewMockDataSourceManager creates a new mock instance.

func (*MockDataSourceManager) BranchCommit

func (m *MockDataSourceManager) BranchCommit(ctx context.Context, resource rm.BranchResource) (branch.BranchStatus, error)

BranchCommit mocks base method.

func (*MockDataSourceManager) BranchRegister

func (m *MockDataSourceManager) BranchRegister(ctx context.Context, param rm.BranchRegisterParam) (int64, error)

BranchRegister mocks base method.

func (*MockDataSourceManager) BranchReport

func (m *MockDataSourceManager) BranchReport(ctx context.Context, param rm.BranchReportParam) error

BranchReport mocks base method.

func (*MockDataSourceManager) BranchRollback

func (m *MockDataSourceManager) BranchRollback(ctx context.Context, resource rm.BranchResource) (branch.BranchStatus, error)

BranchRollback mocks base method.

func (*MockDataSourceManager) CreateTableMetaCache

func (m *MockDataSourceManager) CreateTableMetaCache(ctx context.Context, resID string, dbType types.DBType, db *sql.DB) (datasource.TableMetaCache, error)

CreateTableMetaCache mocks base method.

func (*MockDataSourceManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDataSourceManager) GetBranchType

func (m *MockDataSourceManager) GetBranchType() branch.BranchType

GetBranchType mocks base method.

func (*MockDataSourceManager) GetCachedResources

func (m *MockDataSourceManager) GetCachedResources() *sync.Map

GetCachedResources mocks base method.

func (*MockDataSourceManager) LockQuery

func (m *MockDataSourceManager) LockQuery(ctx context.Context, param rm.LockQueryParam) (bool, error)

LockQuery mocks base method.

func (*MockDataSourceManager) RegisterResource

func (m *MockDataSourceManager) RegisterResource(resource rm.Resource) error

RegisterResource mocks base method.

func (*MockDataSourceManager) SetBranchType

func (m *MockDataSourceManager) SetBranchType(branchType branch.BranchType)

func (*MockDataSourceManager) UnregisterResource

func (m *MockDataSourceManager) UnregisterResource(resource rm.Resource) error

UnregisterResource mocks base method.

type MockDataSourceManagerMockRecorder

type MockDataSourceManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MockDataSourceManagerMockRecorder is the mock recorder for MockDataSourceManager.

func (*MockDataSourceManagerMockRecorder) BranchCommit

func (mr *MockDataSourceManagerMockRecorder) BranchCommit(ctx, resource interface{}) *gomock.Call

BranchCommit indicates an expected call of BranchCommit.

func (*MockDataSourceManagerMockRecorder) BranchRegister

func (mr *MockDataSourceManagerMockRecorder) BranchRegister(ctx, param interface{}) *gomock.Call

BranchRegister indicates an expected call of BranchRegister.

func (*MockDataSourceManagerMockRecorder) BranchReport

func (mr *MockDataSourceManagerMockRecorder) BranchReport(ctx, param interface{}) *gomock.Call

BranchReport indicates an expected call of BranchReport.

func (*MockDataSourceManagerMockRecorder) BranchRollback

func (mr *MockDataSourceManagerMockRecorder) BranchRollback(ctx, resource interface{}) *gomock.Call

BranchRollback indicates an expected call of BranchRollback.

func (*MockDataSourceManagerMockRecorder) CreateTableMetaCache

func (mr *MockDataSourceManagerMockRecorder) CreateTableMetaCache(ctx, resID, dbType, db interface{}) *gomock.Call

CreateTableMetaCache indicates an expected call of CreateTableMetaCache.

func (*MockDataSourceManagerMockRecorder) GetBranchType

func (mr *MockDataSourceManagerMockRecorder) GetBranchType() *gomock.Call

GetBranchType indicates an expected call of GetBranchType.

func (*MockDataSourceManagerMockRecorder) GetCachedResources

func (mr *MockDataSourceManagerMockRecorder) GetCachedResources() *gomock.Call

GetCachedResources indicates an expected call of GetCachedResources.

func (*MockDataSourceManagerMockRecorder) LockQuery

func (mr *MockDataSourceManagerMockRecorder) LockQuery(ctx, param interface{}) *gomock.Call

LockQuery indicates an expected call of LockQuery.

func (*MockDataSourceManagerMockRecorder) RegisterResource

func (mr *MockDataSourceManagerMockRecorder) RegisterResource(resource interface{}) *gomock.Call

RegisterResource indicates an expected call of RegisterResource.

func (*MockDataSourceManagerMockRecorder) UnregisterResource

func (mr *MockDataSourceManagerMockRecorder) UnregisterResource(resource interface{}) *gomock.Call

UnregisterResource indicates an expected call of UnregisterResource.

type MockTableMetaCache

type MockTableMetaCache struct {
	// contains filtered or unexported fields
}

MockTableMetaCache is a mock of TableMetaCache interface.

func NewMockTableMetaCache

func NewMockTableMetaCache(ctrl *gomock.Controller) *MockTableMetaCache

NewMockTableMetaCache creates a new mock instance.

func (*MockTableMetaCache) Destroy

func (m *MockTableMetaCache) Destroy() error

Destroy mocks base method.

func (*MockTableMetaCache) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTableMetaCache) GetTableMeta

func (m *MockTableMetaCache) GetTableMeta(ctx context.Context, dbName, table string) (*types.TableMeta, error)

GetTableMeta mocks base method.

func (*MockTableMetaCache) Init

func (m *MockTableMetaCache) Init(ctx context.Context, conn *sql.DB) error

Init mocks base method.

type MockTableMetaCacheMockRecorder

type MockTableMetaCacheMockRecorder struct {
	// contains filtered or unexported fields
}

MockTableMetaCacheMockRecorder is the mock recorder for MockTableMetaCache.

func (*MockTableMetaCacheMockRecorder) Destroy

Destroy indicates an expected call of Destroy.

func (*MockTableMetaCacheMockRecorder) GetTableMeta

func (mr *MockTableMetaCacheMockRecorder) GetTableMeta(ctx, dbName, table interface{}) *gomock.Call

GetTableMeta indicates an expected call of GetTableMeta.

func (*MockTableMetaCacheMockRecorder) Init

func (mr *MockTableMetaCacheMockRecorder) Init(ctx, conn interface{}) *gomock.Call

Init indicates an expected call of Init.

type MockTestDriver

type MockTestDriver struct {
	// contains filtered or unexported fields
}

MockTestDriver is a mock of TestDriver interface.

func NewMockTestDriver

func NewMockTestDriver(ctrl *gomock.Controller) *MockTestDriver

NewMockTestDriver creates a new mock instance.

func (*MockTestDriver) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTestDriver) Open

func (m *MockTestDriver) Open(name string) (driver.Conn, error)

Open mocks base method.

type MockTestDriverConn

type MockTestDriverConn struct {
	// contains filtered or unexported fields
}

MockTestDriverConn is a mock of TestDriverConn interface.

func NewMockTestDriverConn

func NewMockTestDriverConn(ctrl *gomock.Controller) *MockTestDriverConn

NewMockTestDriverConn creates a new mock instance.

func (*MockTestDriverConn) Begin

func (m *MockTestDriverConn) Begin() (driver.Tx, error)

Begin mocks base method.

func (*MockTestDriverConn) BeginTx

func (m *MockTestDriverConn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)

BeginTx mocks base method.

func (*MockTestDriverConn) Close

func (m *MockTestDriverConn) Close() error

Close mocks base method.

func (*MockTestDriverConn) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTestDriverConn) Exec

func (m *MockTestDriverConn) Exec(query string, args []driver.Value) (driver.Result, error)

Exec mocks base method.

func (*MockTestDriverConn) ExecContext

func (m *MockTestDriverConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)

ExecContext mocks base method.

func (*MockTestDriverConn) Ping

func (m *MockTestDriverConn) Ping(ctx context.Context) error

Ping mocks base method.

func (*MockTestDriverConn) Prepare

func (m *MockTestDriverConn) Prepare(query string) (driver.Stmt, error)

Prepare mocks base method.

func (*MockTestDriverConn) PrepareContext

func (m *MockTestDriverConn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error)

PrepareContext mocks base method.

func (*MockTestDriverConn) Query

func (m *MockTestDriverConn) Query(query string, args []driver.Value) (driver.Rows, error)

Query mocks base method.

func (*MockTestDriverConn) QueryContext

func (m *MockTestDriverConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)

QueryContext mocks base method.

func (*MockTestDriverConn) ResetSession

func (m *MockTestDriverConn) ResetSession(ctx context.Context) error

ResetSession mocks base method.

type MockTestDriverConnMockRecorder

type MockTestDriverConnMockRecorder struct {
	// contains filtered or unexported fields
}

MockTestDriverConnMockRecorder is the mock recorder for MockTestDriverConn.

func (*MockTestDriverConnMockRecorder) Begin

Begin indicates an expected call of Begin.

func (*MockTestDriverConnMockRecorder) BeginTx

func (mr *MockTestDriverConnMockRecorder) BeginTx(ctx, opts interface{}) *gomock.Call

BeginTx indicates an expected call of BeginTx.

func (*MockTestDriverConnMockRecorder) Close

Close indicates an expected call of Close.

func (*MockTestDriverConnMockRecorder) Exec

func (mr *MockTestDriverConnMockRecorder) Exec(query, args interface{}) *gomock.Call

Exec indicates an expected call of Exec.

func (*MockTestDriverConnMockRecorder) ExecContext

func (mr *MockTestDriverConnMockRecorder) ExecContext(ctx, query, args interface{}) *gomock.Call

ExecContext indicates an expected call of ExecContext.

func (*MockTestDriverConnMockRecorder) Ping

func (mr *MockTestDriverConnMockRecorder) Ping(ctx interface{}) *gomock.Call

Ping indicates an expected call of Ping.

func (*MockTestDriverConnMockRecorder) Prepare

func (mr *MockTestDriverConnMockRecorder) Prepare(query interface{}) *gomock.Call

Prepare indicates an expected call of Prepare.

func (*MockTestDriverConnMockRecorder) PrepareContext

func (mr *MockTestDriverConnMockRecorder) PrepareContext(ctx, query interface{}) *gomock.Call

PrepareContext indicates an expected call of PrepareContext.

func (*MockTestDriverConnMockRecorder) Query

func (mr *MockTestDriverConnMockRecorder) Query(query, args interface{}) *gomock.Call

Query indicates an expected call of Query.

func (*MockTestDriverConnMockRecorder) QueryContext

func (mr *MockTestDriverConnMockRecorder) QueryContext(ctx, query, args interface{}) *gomock.Call

QueryContext indicates an expected call of QueryContext.

func (*MockTestDriverConnMockRecorder) ResetSession

func (mr *MockTestDriverConnMockRecorder) ResetSession(ctx interface{}) *gomock.Call

ResetSession indicates an expected call of ResetSession.

type MockTestDriverConnector

type MockTestDriverConnector struct {
	// contains filtered or unexported fields
}

MockTestDriverConnector is a mock of TestDriverConnector interface.

func NewMockTestDriverConnector

func NewMockTestDriverConnector(ctrl *gomock.Controller) *MockTestDriverConnector

NewMockTestDriverConnector creates a new mock instance.

func (*MockTestDriverConnector) Connect

Connect mocks base method.

func (*MockTestDriverConnector) Driver

Driver mocks base method.

func (*MockTestDriverConnector) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockTestDriverConnectorMockRecorder

type MockTestDriverConnectorMockRecorder struct {
	// contains filtered or unexported fields
}

MockTestDriverConnectorMockRecorder is the mock recorder for MockTestDriverConnector.

func (*MockTestDriverConnectorMockRecorder) Connect

func (mr *MockTestDriverConnectorMockRecorder) Connect(arg0 interface{}) *gomock.Call

Connect indicates an expected call of Connect.

func (*MockTestDriverConnectorMockRecorder) Driver

Driver indicates an expected call of Driver.

type MockTestDriverMockRecorder

type MockTestDriverMockRecorder struct {
	// contains filtered or unexported fields
}

MockTestDriverMockRecorder is the mock recorder for MockTestDriver.

func (*MockTestDriverMockRecorder) Open

func (mr *MockTestDriverMockRecorder) Open(name interface{}) *gomock.Call

Open indicates an expected call of Open.

type MockTestDriverRows

type MockTestDriverRows struct {
	// contains filtered or unexported fields
}

MockTestDriverRows is a mock of TestDriverRows interface.

func NewMockTestDriverRows

func NewMockTestDriverRows(ctrl *gomock.Controller) *MockTestDriverRows

NewMockTestDriverRows creates a new mock instance.

func (*MockTestDriverRows) Close

func (m *MockTestDriverRows) Close() error

Close mocks base method.

func (*MockTestDriverRows) Columns

func (m *MockTestDriverRows) Columns() []string

Columns mocks base method.

func (*MockTestDriverRows) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTestDriverRows) Next

func (m *MockTestDriverRows) Next(dest []driver.Value) error

Next mocks base method.

type MockTestDriverRowsMockRecorder

type MockTestDriverRowsMockRecorder struct {
	// contains filtered or unexported fields
}

MockTestDriverRowsMockRecorder is the mock recorder for MockTestDriverRows.

func (*MockTestDriverRowsMockRecorder) Close

Close indicates an expected call of Close.

func (*MockTestDriverRowsMockRecorder) Columns

Columns indicates an expected call of Columns.

func (*MockTestDriverRowsMockRecorder) Next

func (mr *MockTestDriverRowsMockRecorder) Next(dest interface{}) *gomock.Call

Next indicates an expected call of Next.

type MockTestDriverStmt

type MockTestDriverStmt struct {
	// contains filtered or unexported fields
}

MockTestDriverStmt is a mock of TestDriverStmt interface.

func NewMockTestDriverStmt

func NewMockTestDriverStmt(ctrl *gomock.Controller) *MockTestDriverStmt

NewMockTestDriverStmt creates a new mock instance.

func (*MockTestDriverStmt) Close

func (m *MockTestDriverStmt) Close() error

Close mocks base method.

func (*MockTestDriverStmt) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTestDriverStmt) Exec

func (m *MockTestDriverStmt) Exec(args []driver.Value) (driver.Result, error)

Exec mocks base method.

func (*MockTestDriverStmt) ExecContext

func (m *MockTestDriverStmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)

ExecContext mocks base method.

func (*MockTestDriverStmt) NumInput

func (m *MockTestDriverStmt) NumInput() int

NumInput mocks base method.

func (*MockTestDriverStmt) Query

func (m *MockTestDriverStmt) Query(args []driver.Value) (driver.Rows, error)

Query mocks base method.

func (*MockTestDriverStmt) QueryContext

func (m *MockTestDriverStmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)

QueryContext mocks base method.

type MockTestDriverStmtMockRecorder

type MockTestDriverStmtMockRecorder struct {
	// contains filtered or unexported fields
}

MockTestDriverStmtMockRecorder is the mock recorder for MockTestDriverStmt.

func (*MockTestDriverStmtMockRecorder) Close

Close indicates an expected call of Close.

func (*MockTestDriverStmtMockRecorder) Exec

func (mr *MockTestDriverStmtMockRecorder) Exec(args interface{}) *gomock.Call

Exec indicates an expected call of Exec.

func (*MockTestDriverStmtMockRecorder) ExecContext

func (mr *MockTestDriverStmtMockRecorder) ExecContext(ctx, args interface{}) *gomock.Call

ExecContext indicates an expected call of ExecContext.

func (*MockTestDriverStmtMockRecorder) NumInput

func (mr *MockTestDriverStmtMockRecorder) NumInput() *gomock.Call

NumInput indicates an expected call of NumInput.

func (*MockTestDriverStmtMockRecorder) Query

func (mr *MockTestDriverStmtMockRecorder) Query(args interface{}) *gomock.Call

Query indicates an expected call of Query.

func (*MockTestDriverStmtMockRecorder) QueryContext

func (mr *MockTestDriverStmtMockRecorder) QueryContext(ctx, args interface{}) *gomock.Call

QueryContext indicates an expected call of QueryContext.

type MockTestDriverTx

type MockTestDriverTx struct {
	// contains filtered or unexported fields
}

MockTestDriverTx is a mock of TestDriverTx interface.

func NewMockTestDriverTx

func NewMockTestDriverTx(ctrl *gomock.Controller) *MockTestDriverTx

NewMockTestDriverTx creates a new mock instance.

func (*MockTestDriverTx) Commit

func (m *MockTestDriverTx) Commit() error

Commit mocks base method.

func (*MockTestDriverTx) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTestDriverTx) Rollback

func (m *MockTestDriverTx) Rollback() error

Rollback mocks base method.

type MockTestDriverTxMockRecorder

type MockTestDriverTxMockRecorder struct {
	// contains filtered or unexported fields
}

MockTestDriverTxMockRecorder is the mock recorder for MockTestDriverTx.

func (*MockTestDriverTxMockRecorder) Commit

Commit indicates an expected call of Commit.

func (*MockTestDriverTxMockRecorder) Rollback

func (mr *MockTestDriverTxMockRecorder) Rollback() *gomock.Call

Rollback indicates an expected call of Rollback.

type TestDriver

type TestDriver interface {
	driver.Driver
}

type TestDriverConnector

type TestDriverConnector interface {
	driver.Connector
}

type TestDriverRows

type TestDriverRows interface {
	driver.Rows
}

type TestDriverStmt

type TestDriverStmt interface {
	driver.Stmt
	driver.StmtQueryContext
	driver.StmtExecContext
}

type TestDriverTx

type TestDriverTx interface {
	driver.Tx
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL