Documentation
¶
Index ¶
- type Connection
- func (_m *Connection) Close() error
- func (_m *Connection) DSN() string
- func (_m *Connection) Driver() connection.Driver
- func (_m *Connection) EXPECT() *Connection_Expecter
- func (_m *Connection) ExecContext(ctx context.Context, query string, args ...any) (sqlex.Result, error)
- func (_m *Connection) Ping() error
- func (_m *Connection) QueryContext(ctx context.Context, query string, args ...any) (sqlex.Rows, error)
- func (_m *Connection) Transaction(ctx context.Context, txFn func(context.Context) error) error
- type Connection_Close_Call
- type Connection_DSN_Call
- type Connection_Driver_Call
- type Connection_ExecContext_Call
- func (_c *Connection_ExecContext_Call) Return(_a0 sqlex.Result, _a1 error) *Connection_ExecContext_Call
- func (_c *Connection_ExecContext_Call) Run(run func(ctx context.Context, query string, args ...any)) *Connection_ExecContext_Call
- func (_c *Connection_ExecContext_Call) RunAndReturn(run func(context.Context, string, ...any) (sqlex.Result, error)) *Connection_ExecContext_Call
- type Connection_Expecter
- func (_e *Connection_Expecter) Close() *Connection_Close_Call
- func (_e *Connection_Expecter) DSN() *Connection_DSN_Call
- func (_e *Connection_Expecter) Driver() *Connection_Driver_Call
- func (_e *Connection_Expecter) ExecContext(ctx interface{}, query interface{}, args ...interface{}) *Connection_ExecContext_Call
- func (_e *Connection_Expecter) Ping() *Connection_Ping_Call
- func (_e *Connection_Expecter) QueryContext(ctx interface{}, query interface{}, args ...interface{}) *Connection_QueryContext_Call
- func (_e *Connection_Expecter) Transaction(ctx interface{}, txFn interface{}) *Connection_Transaction_Call
- type Connection_Ping_Call
- type Connection_QueryContext_Call
- func (_c *Connection_QueryContext_Call) Return(_a0 sqlex.Rows, _a1 error) *Connection_QueryContext_Call
- func (_c *Connection_QueryContext_Call) Run(run func(ctx context.Context, query string, args ...any)) *Connection_QueryContext_Call
- func (_c *Connection_QueryContext_Call) RunAndReturn(run func(context.Context, string, ...any) (sqlex.Rows, error)) *Connection_QueryContext_Call
- type Connection_Transaction_Call
- func (_c *Connection_Transaction_Call) Return(_a0 error) *Connection_Transaction_Call
- func (_c *Connection_Transaction_Call) Run(run func(ctx context.Context, txFn func(context.Context) error)) *Connection_Transaction_Call
- func (_c *Connection_Transaction_Call) RunAndReturn(run func(context.Context, func(context.Context) error) error) *Connection_Transaction_Call
- type FileNameBuilder
- type FileNameBuilder_Down_Call
- func (_c *FileNameBuilder_Down_Call) Return(fname string, safely bool) *FileNameBuilder_Down_Call
- func (_c *FileNameBuilder_Down_Call) Run(run func(version string, forceSafely bool)) *FileNameBuilder_Down_Call
- func (_c *FileNameBuilder_Down_Call) RunAndReturn(run func(string, bool) (string, bool)) *FileNameBuilder_Down_Call
- type FileNameBuilder_Expecter
- type FileNameBuilder_Up_Call
- func (_c *FileNameBuilder_Up_Call) Return(fname string, safely bool) *FileNameBuilder_Up_Call
- func (_c *FileNameBuilder_Up_Call) Run(run func(version string, forceSafely bool)) *FileNameBuilder_Up_Call
- func (_c *FileNameBuilder_Up_Call) RunAndReturn(run func(string, bool) (string, bool)) *FileNameBuilder_Up_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
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 ¶
Transaction provides a mock function with given fields: ctx, txFn
type Connection_Close_Call ¶ added in v1.2.0
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 (_c *Connection_Close_Call) Return(_a0 error) *Connection_Close_Call
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 ¶
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 (_c *Connection_DSN_Call) Return(_a0 string) *Connection_DSN_Call
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 ¶
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 (_c *Connection_Driver_Call) Return(_a0 connection.Driver) *Connection_Driver_Call
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 ¶
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 (_c *Connection_ExecContext_Call) Return(_a0 sqlex.Result, _a1 error) *Connection_ExecContext_Call
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 ¶
func (_c *Connection_ExecContext_Call) RunAndReturn(run func(context.Context, string, ...any) (sqlex.Result, error)) *Connection_ExecContext_Call
type Connection_Expecter ¶
type Connection_Expecter struct {
// contains filtered or unexported fields
}
func (*Connection_Expecter) Close ¶ added in v1.2.0
func (_e *Connection_Expecter) Close() *Connection_Close_Call
Close is a helper method to define mock.On call
func (*Connection_Expecter) DSN ¶
func (_e *Connection_Expecter) DSN() *Connection_DSN_Call
DSN is a helper method to define mock.On call
func (*Connection_Expecter) Driver ¶
func (_e *Connection_Expecter) Driver() *Connection_Driver_Call
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
func (_e *Connection_Expecter) Ping() *Connection_Ping_Call
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
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 (_c *Connection_Ping_Call) Return(_a0 error) *Connection_Ping_Call
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 ¶
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 (_c *Connection_QueryContext_Call) Return(_a0 sqlex.Rows, _a1 error) *Connection_QueryContext_Call
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 ¶
func (_c *Connection_QueryContext_Call) RunAndReturn(run func(context.Context, string, ...any) (sqlex.Rows, error)) *Connection_QueryContext_Call
type Connection_Transaction_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 (_c *Connection_Transaction_Call) Return(_a0 error) *Connection_Transaction_Call
func (*Connection_Transaction_Call) Run ¶
func (_c *Connection_Transaction_Call) Run(run func(ctx context.Context, txFn func(context.Context) error)) *Connection_Transaction_Call
func (*Connection_Transaction_Call) RunAndReturn ¶
func (_c *Connection_Transaction_Call) RunAndReturn(run func(context.Context, func(context.Context) error) error) *Connection_Transaction_Call
type FileNameBuilder ¶
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 (_m *FileNameBuilder) EXPECT() *FileNameBuilder_Expecter
type FileNameBuilder_Down_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 (_c *FileNameBuilder_Down_Call) Return(fname string, safely bool) *FileNameBuilder_Down_Call
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 ¶
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