mockmigrator

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	mock.Mock
}

Connection is an autogenerated mock type for the Connection type

func NewConnection

func NewConnection(t interface {
	mock.TestingT
	Cleanup(func())
}) *Connection

NewConnection creates a new instance of Connection. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Connection) Close added in v1.2.0

func (_m *Connection) Close() error

Close provides a mock function with no fields

func (*Connection) DSN

func (_m *Connection) DSN() string

DSN provides a mock function with no fields

func (*Connection) Driver

func (_m *Connection) Driver() connection.Driver

Driver provides a mock function with no fields

func (*Connection) EXPECT

func (_m *Connection) EXPECT() *Connection_Expecter

func (*Connection) ExecContext

func (_m *Connection) ExecContext(ctx context.Context, query string, args ...any) (sqlex.Result, error)

ExecContext provides a mock function with given fields: ctx, query, args

func (*Connection) Ping added in v1.1.0

func (_m *Connection) Ping() error

Ping provides a mock function with no fields

func (*Connection) QueryContext

func (_m *Connection) QueryContext(ctx context.Context, query string, args ...any) (sqlex.Rows, error)

QueryContext provides a mock function with given fields: ctx, query, args

func (*Connection) Transaction

func (_m *Connection) Transaction(ctx context.Context, txFn func(context.Context) error) error

Transaction provides a mock function with given fields: ctx, txFn

type Connection_Close_Call added in v1.2.0

type Connection_Close_Call struct {
	*mock.Call
}

Connection_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*Connection_Close_Call) Return added in v1.2.0

func (*Connection_Close_Call) Run added in v1.2.0

func (_c *Connection_Close_Call) Run(run func()) *Connection_Close_Call

func (*Connection_Close_Call) RunAndReturn added in v1.2.0

func (_c *Connection_Close_Call) RunAndReturn(run func() error) *Connection_Close_Call

type Connection_DSN_Call

type Connection_DSN_Call struct {
	*mock.Call
}

Connection_DSN_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DSN'

func (*Connection_DSN_Call) Return

func (*Connection_DSN_Call) Run

func (_c *Connection_DSN_Call) Run(run func()) *Connection_DSN_Call

func (*Connection_DSN_Call) RunAndReturn

func (_c *Connection_DSN_Call) RunAndReturn(run func() string) *Connection_DSN_Call

type Connection_Driver_Call

type Connection_Driver_Call struct {
	*mock.Call
}

Connection_Driver_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Driver'

func (*Connection_Driver_Call) Return

func (*Connection_Driver_Call) Run

func (_c *Connection_Driver_Call) Run(run func()) *Connection_Driver_Call

func (*Connection_Driver_Call) RunAndReturn

func (_c *Connection_Driver_Call) RunAndReturn(run func() connection.Driver) *Connection_Driver_Call

type Connection_ExecContext_Call

type Connection_ExecContext_Call struct {
	*mock.Call
}

Connection_ExecContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecContext'

func (*Connection_ExecContext_Call) Return

func (*Connection_ExecContext_Call) Run

func (_c *Connection_ExecContext_Call) Run(run func(ctx context.Context, query string, args ...any)) *Connection_ExecContext_Call

func (*Connection_ExecContext_Call) RunAndReturn

type Connection_Expecter

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

func (*Connection_Expecter) Close added in v1.2.0

Close is a helper method to define mock.On call

func (*Connection_Expecter) DSN

DSN is a helper method to define mock.On call

func (*Connection_Expecter) Driver

Driver is a helper method to define mock.On call

func (*Connection_Expecter) ExecContext

func (_e *Connection_Expecter) ExecContext(ctx interface{}, query interface{}, args ...interface{}) *Connection_ExecContext_Call

ExecContext is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...any

func (*Connection_Expecter) Ping added in v1.1.0

Ping is a helper method to define mock.On call

func (*Connection_Expecter) QueryContext

func (_e *Connection_Expecter) QueryContext(ctx interface{}, query interface{}, args ...interface{}) *Connection_QueryContext_Call

QueryContext is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...any

func (*Connection_Expecter) Transaction

func (_e *Connection_Expecter) Transaction(ctx interface{}, txFn interface{}) *Connection_Transaction_Call

Transaction is a helper method to define mock.On call

  • ctx context.Context
  • txFn func(context.Context) error

type Connection_Ping_Call added in v1.1.0

type Connection_Ping_Call struct {
	*mock.Call
}

Connection_Ping_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ping'

func (*Connection_Ping_Call) Return added in v1.1.0

func (*Connection_Ping_Call) Run added in v1.1.0

func (_c *Connection_Ping_Call) Run(run func()) *Connection_Ping_Call

func (*Connection_Ping_Call) RunAndReturn added in v1.1.0

func (_c *Connection_Ping_Call) RunAndReturn(run func() error) *Connection_Ping_Call

type Connection_QueryContext_Call

type Connection_QueryContext_Call struct {
	*mock.Call
}

Connection_QueryContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryContext'

func (*Connection_QueryContext_Call) Return

func (*Connection_QueryContext_Call) Run

func (_c *Connection_QueryContext_Call) Run(run func(ctx context.Context, query string, args ...any)) *Connection_QueryContext_Call

func (*Connection_QueryContext_Call) RunAndReturn

type Connection_Transaction_Call

type Connection_Transaction_Call struct {
	*mock.Call
}

Connection_Transaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Transaction'

func (*Connection_Transaction_Call) Return

func (*Connection_Transaction_Call) Run

func (*Connection_Transaction_Call) RunAndReturn

type FileNameBuilder

type FileNameBuilder struct {
	mock.Mock
}

FileNameBuilder is an autogenerated mock type for the FileNameBuilder type

func NewFileNameBuilder

func NewFileNameBuilder(t interface {
	mock.TestingT
	Cleanup(func())
}) *FileNameBuilder

NewFileNameBuilder creates a new instance of FileNameBuilder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*FileNameBuilder) Down

func (_m *FileNameBuilder) Down(version string, forceSafely bool) (string, bool)

Down provides a mock function with given fields: version, forceSafely

func (*FileNameBuilder) EXPECT

func (*FileNameBuilder) Up

func (_m *FileNameBuilder) Up(version string, forceSafely bool) (string, bool)

Up provides a mock function with given fields: version, forceSafely

type FileNameBuilder_Down_Call

type FileNameBuilder_Down_Call struct {
	*mock.Call
}

FileNameBuilder_Down_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Down'

func (*FileNameBuilder_Down_Call) Return

func (*FileNameBuilder_Down_Call) Run

func (_c *FileNameBuilder_Down_Call) Run(run func(version string, forceSafely bool)) *FileNameBuilder_Down_Call

func (*FileNameBuilder_Down_Call) RunAndReturn

func (_c *FileNameBuilder_Down_Call) RunAndReturn(run func(string, bool) (string, bool)) *FileNameBuilder_Down_Call

type FileNameBuilder_Expecter

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

func (*FileNameBuilder_Expecter) Down

func (_e *FileNameBuilder_Expecter) Down(version interface{}, forceSafely interface{}) *FileNameBuilder_Down_Call

Down is a helper method to define mock.On call

  • version string
  • forceSafely bool

func (*FileNameBuilder_Expecter) Up

func (_e *FileNameBuilder_Expecter) Up(version interface{}, forceSafely interface{}) *FileNameBuilder_Up_Call

Up is a helper method to define mock.On call

  • version string
  • forceSafely bool

type FileNameBuilder_Up_Call

type FileNameBuilder_Up_Call struct {
	*mock.Call
}

FileNameBuilder_Up_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Up'

func (*FileNameBuilder_Up_Call) Return

func (_c *FileNameBuilder_Up_Call) Return(fname string, safely bool) *FileNameBuilder_Up_Call

func (*FileNameBuilder_Up_Call) Run

func (_c *FileNameBuilder_Up_Call) Run(run func(version string, forceSafely bool)) *FileNameBuilder_Up_Call

func (*FileNameBuilder_Up_Call) RunAndReturn

func (_c *FileNameBuilder_Up_Call) RunAndReturn(run func(string, bool) (string, bool)) *FileNameBuilder_Up_Call

Jump to

Keyboard shortcuts

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