mockdb

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. 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 (*Client) EXPECT

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) RunSQLInTransaction

func (_mock *Client) RunSQLInTransaction(ctx context.Context, coreLogic func(ctx context.Context, tx *gorm.DB) error) error

RunSQLInTransaction provides a mock function for the type Client

func (*Client) UseDatabaseInTransaction

func (_mock *Client) UseDatabaseInTransaction(ctx context.Context, coreLogic func(ctx context.Context, dbClient db.Database) error) error

UseDatabaseInTransaction provides a mock function for the type Client

type Client_Expecter

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

func (*Client_Expecter) RunSQLInTransaction

func (_e *Client_Expecter) RunSQLInTransaction(ctx interface{}, coreLogic interface{}) *Client_RunSQLInTransaction_Call

RunSQLInTransaction is a helper method to define mock.On call

  • ctx context.Context
  • coreLogic func(ctx context.Context, tx *gorm.DB) error

func (*Client_Expecter) UseDatabaseInTransaction

func (_e *Client_Expecter) UseDatabaseInTransaction(ctx interface{}, coreLogic interface{}) *Client_UseDatabaseInTransaction_Call

UseDatabaseInTransaction is a helper method to define mock.On call

  • ctx context.Context
  • coreLogic func(ctx context.Context, dbClient db.Database) error

type Client_RunSQLInTransaction_Call

type Client_RunSQLInTransaction_Call struct {
	*mock.Call
}

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

func (*Client_RunSQLInTransaction_Call) Return

func (*Client_RunSQLInTransaction_Call) Run

func (*Client_RunSQLInTransaction_Call) RunAndReturn

func (_c *Client_RunSQLInTransaction_Call) RunAndReturn(run func(ctx context.Context, coreLogic func(ctx context.Context, tx *gorm.DB) error) error) *Client_RunSQLInTransaction_Call

type Client_UseDatabaseInTransaction_Call

type Client_UseDatabaseInTransaction_Call struct {
	*mock.Call
}

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

func (*Client_UseDatabaseInTransaction_Call) Return

func (*Client_UseDatabaseInTransaction_Call) Run

func (*Client_UseDatabaseInTransaction_Call) RunAndReturn

func (_c *Client_UseDatabaseInTransaction_Call) RunAndReturn(run func(ctx context.Context, coreLogic func(ctx context.Context, dbClient db.Database) error) error) *Client_UseDatabaseInTransaction_Call

type Database

type Database struct {
	mock.Mock
}

Database is an autogenerated mock type for the Database type

func NewDatabase

func NewDatabase(t interface {
	mock.TestingT
	Cleanup(func())
}) *Database

NewDatabase creates a new instance of Database. 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 (*Database) DefineNewSession

func (_mock *Database) DefineNewSession(ctx context.Context, name string, description *string, command models.SessionCommand, outputBufferCapacity int64, driverParams interface{}) (models.Session, error)

DefineNewSession provides a mock function for the type Database

func (*Database) DeleteSession

func (_mock *Database) DeleteSession(ctx context.Context, name string) error

DeleteSession provides a mock function for the type Database

func (*Database) EXPECT

func (_m *Database) EXPECT() *Database_Expecter

func (*Database) GetSessionByName

func (_mock *Database) GetSessionByName(ctx context.Context, name string) (models.Session, error)

GetSessionByName provides a mock function for the type Database

func (*Database) ListSessions

func (_mock *Database) ListSessions(ctx context.Context, filters db.SessionQueryFilter) ([]models.Session, error)

ListSessions provides a mock function for the type Database

func (*Database) MarkSessionIdle

func (_mock *Database) MarkSessionIdle(ctx context.Context, name string) error

MarkSessionIdle provides a mock function for the type Database

func (*Database) MarkSessionReady

func (_mock *Database) MarkSessionReady(ctx context.Context, name string) error

MarkSessionReady provides a mock function for the type Database

func (*Database) Ready

func (_mock *Database) Ready() error

Ready provides a mock function for the type Database

func (*Database) UpdateSessionCommand

func (_mock *Database) UpdateSessionCommand(ctx context.Context, name string, newCommand models.SessionCommand) error

UpdateSessionCommand provides a mock function for the type Database

func (*Database) UpdateSessionDescription

func (_mock *Database) UpdateSessionDescription(ctx context.Context, name string, newDescription *string) error

UpdateSessionDescription provides a mock function for the type Database

func (*Database) UpdateSessionDriver

func (_mock *Database) UpdateSessionDriver(ctx context.Context, name string, driverParams interface{}) error

UpdateSessionDriver provides a mock function for the type Database

func (*Database) UpdateSessionName

func (_mock *Database) UpdateSessionName(ctx context.Context, name string, newName string) error

UpdateSessionName provides a mock function for the type Database

func (*Database) UpdateSessionOutputBufCapacity

func (_mock *Database) UpdateSessionOutputBufCapacity(ctx context.Context, name string, newCap int64) error

UpdateSessionOutputBufCapacity provides a mock function for the type Database

func (*Database) UpdateSessionRunMode

func (_mock *Database) UpdateSessionRunMode(ctx context.Context, name string, newMode models.SessionRunnerModeTypeENUMType) error

UpdateSessionRunMode provides a mock function for the type Database

type Database_DefineNewSession_Call

type Database_DefineNewSession_Call struct {
	*mock.Call
}

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

func (*Database_DefineNewSession_Call) Return

func (*Database_DefineNewSession_Call) Run

func (_c *Database_DefineNewSession_Call) Run(run func(ctx context.Context, name string, description *string, command models.SessionCommand, outputBufferCapacity int64, driverParams interface{})) *Database_DefineNewSession_Call

func (*Database_DefineNewSession_Call) RunAndReturn

func (_c *Database_DefineNewSession_Call) RunAndReturn(run func(ctx context.Context, name string, description *string, command models.SessionCommand, outputBufferCapacity int64, driverParams interface{}) (models.Session, error)) *Database_DefineNewSession_Call

type Database_DeleteSession_Call

type Database_DeleteSession_Call struct {
	*mock.Call
}

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

func (*Database_DeleteSession_Call) Return

func (*Database_DeleteSession_Call) Run

func (*Database_DeleteSession_Call) RunAndReturn

func (_c *Database_DeleteSession_Call) RunAndReturn(run func(ctx context.Context, name string) error) *Database_DeleteSession_Call

type Database_Expecter

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

func (*Database_Expecter) DefineNewSession

func (_e *Database_Expecter) DefineNewSession(ctx interface{}, name interface{}, description interface{}, command interface{}, outputBufferCapacity interface{}, driverParams interface{}) *Database_DefineNewSession_Call

DefineNewSession is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • description *string
  • command models.SessionCommand
  • outputBufferCapacity int64
  • driverParams interface{}

func (*Database_Expecter) DeleteSession

func (_e *Database_Expecter) DeleteSession(ctx interface{}, name interface{}) *Database_DeleteSession_Call

DeleteSession is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*Database_Expecter) GetSessionByName

func (_e *Database_Expecter) GetSessionByName(ctx interface{}, name interface{}) *Database_GetSessionByName_Call

GetSessionByName is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*Database_Expecter) ListSessions

func (_e *Database_Expecter) ListSessions(ctx interface{}, filters interface{}) *Database_ListSessions_Call

ListSessions is a helper method to define mock.On call

  • ctx context.Context
  • filters db.SessionQueryFilter

func (*Database_Expecter) MarkSessionIdle

func (_e *Database_Expecter) MarkSessionIdle(ctx interface{}, name interface{}) *Database_MarkSessionIdle_Call

MarkSessionIdle is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*Database_Expecter) MarkSessionReady

func (_e *Database_Expecter) MarkSessionReady(ctx interface{}, name interface{}) *Database_MarkSessionReady_Call

MarkSessionReady is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*Database_Expecter) Ready

Ready is a helper method to define mock.On call

func (*Database_Expecter) UpdateSessionCommand

func (_e *Database_Expecter) UpdateSessionCommand(ctx interface{}, name interface{}, newCommand interface{}) *Database_UpdateSessionCommand_Call

UpdateSessionCommand is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • newCommand models.SessionCommand

func (*Database_Expecter) UpdateSessionDescription

func (_e *Database_Expecter) UpdateSessionDescription(ctx interface{}, name interface{}, newDescription interface{}) *Database_UpdateSessionDescription_Call

UpdateSessionDescription is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • newDescription *string

func (*Database_Expecter) UpdateSessionDriver

func (_e *Database_Expecter) UpdateSessionDriver(ctx interface{}, name interface{}, driverParams interface{}) *Database_UpdateSessionDriver_Call

UpdateSessionDriver is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • driverParams interface{}

func (*Database_Expecter) UpdateSessionName

func (_e *Database_Expecter) UpdateSessionName(ctx interface{}, name interface{}, newName interface{}) *Database_UpdateSessionName_Call

UpdateSessionName is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • newName string

func (*Database_Expecter) UpdateSessionOutputBufCapacity

func (_e *Database_Expecter) UpdateSessionOutputBufCapacity(ctx interface{}, name interface{}, newCap interface{}) *Database_UpdateSessionOutputBufCapacity_Call

UpdateSessionOutputBufCapacity is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • newCap int64

func (*Database_Expecter) UpdateSessionRunMode

func (_e *Database_Expecter) UpdateSessionRunMode(ctx interface{}, name interface{}, newMode interface{}) *Database_UpdateSessionRunMode_Call

UpdateSessionRunMode is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • newMode models.SessionRunnerModeTypeENUMType

type Database_GetSessionByName_Call

type Database_GetSessionByName_Call struct {
	*mock.Call
}

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

func (*Database_GetSessionByName_Call) Return

func (*Database_GetSessionByName_Call) Run

func (*Database_GetSessionByName_Call) RunAndReturn

type Database_ListSessions_Call

type Database_ListSessions_Call struct {
	*mock.Call
}

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

func (*Database_ListSessions_Call) Return

func (*Database_ListSessions_Call) Run

func (*Database_ListSessions_Call) RunAndReturn

type Database_MarkSessionIdle_Call

type Database_MarkSessionIdle_Call struct {
	*mock.Call
}

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

func (*Database_MarkSessionIdle_Call) Return

func (*Database_MarkSessionIdle_Call) Run

func (*Database_MarkSessionIdle_Call) RunAndReturn

type Database_MarkSessionReady_Call

type Database_MarkSessionReady_Call struct {
	*mock.Call
}

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

func (*Database_MarkSessionReady_Call) Return

func (*Database_MarkSessionReady_Call) Run

func (*Database_MarkSessionReady_Call) RunAndReturn

type Database_Ready_Call

type Database_Ready_Call struct {
	*mock.Call
}

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

func (*Database_Ready_Call) Return

func (*Database_Ready_Call) Run

func (_c *Database_Ready_Call) Run(run func()) *Database_Ready_Call

func (*Database_Ready_Call) RunAndReturn

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

type Database_UpdateSessionCommand_Call

type Database_UpdateSessionCommand_Call struct {
	*mock.Call
}

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

func (*Database_UpdateSessionCommand_Call) Return

func (*Database_UpdateSessionCommand_Call) Run

func (*Database_UpdateSessionCommand_Call) RunAndReturn

type Database_UpdateSessionDescription_Call

type Database_UpdateSessionDescription_Call struct {
	*mock.Call
}

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

func (*Database_UpdateSessionDescription_Call) Return

func (*Database_UpdateSessionDescription_Call) Run

func (*Database_UpdateSessionDescription_Call) RunAndReturn

type Database_UpdateSessionDriver_Call

type Database_UpdateSessionDriver_Call struct {
	*mock.Call
}

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

func (*Database_UpdateSessionDriver_Call) Return

func (*Database_UpdateSessionDriver_Call) Run

func (_c *Database_UpdateSessionDriver_Call) Run(run func(ctx context.Context, name string, driverParams interface{})) *Database_UpdateSessionDriver_Call

func (*Database_UpdateSessionDriver_Call) RunAndReturn

func (_c *Database_UpdateSessionDriver_Call) RunAndReturn(run func(ctx context.Context, name string, driverParams interface{}) error) *Database_UpdateSessionDriver_Call

type Database_UpdateSessionName_Call

type Database_UpdateSessionName_Call struct {
	*mock.Call
}

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

func (*Database_UpdateSessionName_Call) Return

func (*Database_UpdateSessionName_Call) Run

func (*Database_UpdateSessionName_Call) RunAndReturn

func (_c *Database_UpdateSessionName_Call) RunAndReturn(run func(ctx context.Context, name string, newName string) error) *Database_UpdateSessionName_Call

type Database_UpdateSessionOutputBufCapacity_Call

type Database_UpdateSessionOutputBufCapacity_Call struct {
	*mock.Call
}

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

func (*Database_UpdateSessionOutputBufCapacity_Call) Return

func (*Database_UpdateSessionOutputBufCapacity_Call) Run

func (*Database_UpdateSessionOutputBufCapacity_Call) RunAndReturn

type Database_UpdateSessionRunMode_Call

type Database_UpdateSessionRunMode_Call struct {
	*mock.Call
}

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

func (*Database_UpdateSessionRunMode_Call) Return

func (*Database_UpdateSessionRunMode_Call) Run

func (*Database_UpdateSessionRunMode_Call) RunAndReturn

Jump to

Keyboard shortcuts

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