mocks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2025 License: Apache-2.0 Imports: 8 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) Begin

func (_mock *Connection) Begin(ctx context.Context) (pgx.Tx, error)

Begin provides a mock function for the type Connection

func (*Connection) Close

func (_mock *Connection) Close()

Close provides a mock function for the type Connection

func (*Connection) EXPECT

func (_m *Connection) EXPECT() *Connection_Expecter

type Connection_Begin_Call

type Connection_Begin_Call struct {
	*mock.Call
}

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

func (*Connection_Begin_Call) Return

func (*Connection_Begin_Call) Run

func (*Connection_Begin_Call) RunAndReturn

func (_c *Connection_Begin_Call) RunAndReturn(run func(ctx context.Context) (pgx.Tx, error)) *Connection_Begin_Call

type Connection_Close_Call

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

func (*Connection_Close_Call) Run

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

func (*Connection_Close_Call) RunAndReturn

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

type Connection_Expecter

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

func (*Connection_Expecter) Begin

func (_e *Connection_Expecter) Begin(ctx interface{}) *Connection_Begin_Call

Begin is a helper method to define mock.On call

  • ctx context.Context

func (*Connection_Expecter) Close

Close is a helper method to define mock.On call

type Store

type Store struct {
	mock.Mock
}

Store is an autogenerated mock type for the Store type

func NewStore

func NewStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *Store

NewStore creates a new instance of Store. 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 (*Store) BeginTx

func (_mock *Store) BeginTx(ctx context.Context) (pgx.Tx, error)

BeginTx provides a mock function for the type Store

func (*Store) Close

func (_mock *Store) Close()

Close provides a mock function for the type Store

func (*Store) CompletePrediction

func (_mock *Store) CompletePrediction(ctx context.Context, id uuid.UUID, result models.PredictionResult, err error) error

CompletePrediction provides a mock function for the type Store

func (*Store) Conn

func (_mock *Store) Conn() *pgxpool.Pool

Conn provides a mock function for the type Store

func (*Store) CreateUser

func (_mock *Store) CreateUser(ctx context.Context, user *models.User) error

CreateUser provides a mock function for the type Store

func (*Store) DeleteUser

func (_mock *Store) DeleteUser(ctx context.Context, id uuid.UUID) error

DeleteUser provides a mock function for the type Store

func (*Store) EXPECT

func (_m *Store) EXPECT() *Store_Expecter

func (*Store) ExecTx

func (_mock *Store) ExecTx(ctx context.Context, fn func(store.Store) error) error

ExecTx provides a mock function for the type Store

func (*Store) GetLoginHistory

func (_mock *Store) GetLoginHistory(ctx context.Context, userID uuid.UUID) ([]models.LoginHistory, error)

GetLoginHistory provides a mock function for the type Store

func (*Store) GetPrediction

func (_mock *Store) GetPrediction(ctx context.Context, id uuid.UUID) (*models.Prediction, error)

GetPrediction provides a mock function for the type Store

func (*Store) GetPredictionsByUserID

func (_mock *Store) GetPredictionsByUserID(ctx context.Context, userID uuid.UUID, offset int, limit int) ([]*models.Prediction, error)

GetPredictionsByUserID provides a mock function for the type Store

func (*Store) GetRefreshTokenByHash

func (_mock *Store) GetRefreshTokenByHash(ctx context.Context, tokenHash string) (*models.RefreshToken, error)

GetRefreshTokenByHash provides a mock function for the type Store

func (*Store) GetUser

func (_mock *Store) GetUser(ctx context.Context, id uuid.UUID, withStats bool) (*models.User, error)

GetUser provides a mock function for the type Store

func (*Store) GetUserByLogin

func (_mock *Store) GetUserByLogin(ctx context.Context, login string) (*models.User, error)

GetUserByLogin provides a mock function for the type Store

func (*Store) InsertLoginHistory

func (_mock *Store) InsertLoginHistory(ctx context.Context, loginHistory *models.LoginHistory) error

InsertLoginHistory provides a mock function for the type Store

func (*Store) InsertRefreshToken

func (_mock *Store) InsertRefreshToken(ctx context.Context, refreshToken *models.RefreshToken) error

InsertRefreshToken provides a mock function for the type Store

func (*Store) RevokeAllUserTokens

func (_mock *Store) RevokeAllUserTokens(ctx context.Context, userID uuid.UUID) error

RevokeAllUserTokens provides a mock function for the type Store

func (*Store) RevokeRefreshToken

func (_mock *Store) RevokeRefreshToken(ctx context.Context, tokenHash string) error

RevokeRefreshToken provides a mock function for the type Store

func (*Store) StartPrediction

func (_mock *Store) StartPrediction(ctx context.Context, userID uuid.UUID, scanURL string) (*models.Prediction, error)

StartPrediction provides a mock function for the type Store

func (*Store) UpdateAvatar

func (_mock *Store) UpdateAvatar(ctx context.Context, user *models.User) error

UpdateAvatar provides a mock function for the type Store

func (*Store) UpdateStats

func (_mock *Store) UpdateStats(ctx context.Context, stat *models.Stat) error

UpdateStats provides a mock function for the type Store

func (*Store) UpdateUserPass

func (_mock *Store) UpdateUserPass(ctx context.Context, id uuid.UUID, newHashedPass string) error

UpdateUserPass provides a mock function for the type Store

func (*Store) WithTx

func (_mock *Store) WithTx(tx pgx.Tx) store.Store

WithTx provides a mock function for the type Store

type Store_BeginTx_Call

type Store_BeginTx_Call struct {
	*mock.Call
}

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

func (*Store_BeginTx_Call) Return

func (_c *Store_BeginTx_Call) Return(tx pgx.Tx, err error) *Store_BeginTx_Call

func (*Store_BeginTx_Call) Run

func (_c *Store_BeginTx_Call) Run(run func(ctx context.Context)) *Store_BeginTx_Call

func (*Store_BeginTx_Call) RunAndReturn

func (_c *Store_BeginTx_Call) RunAndReturn(run func(ctx context.Context) (pgx.Tx, error)) *Store_BeginTx_Call

type Store_Close_Call

type Store_Close_Call struct {
	*mock.Call
}

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

func (*Store_Close_Call) Return

func (_c *Store_Close_Call) Return() *Store_Close_Call

func (*Store_Close_Call) Run

func (_c *Store_Close_Call) Run(run func()) *Store_Close_Call

func (*Store_Close_Call) RunAndReturn

func (_c *Store_Close_Call) RunAndReturn(run func()) *Store_Close_Call

type Store_CompletePrediction_Call

type Store_CompletePrediction_Call struct {
	*mock.Call
}

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

func (*Store_CompletePrediction_Call) Return

func (*Store_CompletePrediction_Call) Run

func (*Store_CompletePrediction_Call) RunAndReturn

type Store_Conn_Call

type Store_Conn_Call struct {
	*mock.Call
}

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

func (*Store_Conn_Call) Return

func (_c *Store_Conn_Call) Return(pool *pgxpool.Pool) *Store_Conn_Call

func (*Store_Conn_Call) Run

func (_c *Store_Conn_Call) Run(run func()) *Store_Conn_Call

func (*Store_Conn_Call) RunAndReturn

func (_c *Store_Conn_Call) RunAndReturn(run func() *pgxpool.Pool) *Store_Conn_Call

type Store_CreateUser_Call

type Store_CreateUser_Call struct {
	*mock.Call
}

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

func (*Store_CreateUser_Call) Return

func (*Store_CreateUser_Call) Run

func (_c *Store_CreateUser_Call) Run(run func(ctx context.Context, user *models.User)) *Store_CreateUser_Call

func (*Store_CreateUser_Call) RunAndReturn

func (_c *Store_CreateUser_Call) RunAndReturn(run func(ctx context.Context, user *models.User) error) *Store_CreateUser_Call

type Store_DeleteUser_Call

type Store_DeleteUser_Call struct {
	*mock.Call
}

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

func (*Store_DeleteUser_Call) Return

func (*Store_DeleteUser_Call) Run

func (*Store_DeleteUser_Call) RunAndReturn

func (_c *Store_DeleteUser_Call) RunAndReturn(run func(ctx context.Context, id uuid.UUID) error) *Store_DeleteUser_Call

type Store_ExecTx_Call

type Store_ExecTx_Call struct {
	*mock.Call
}

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

func (*Store_ExecTx_Call) Return

func (_c *Store_ExecTx_Call) Return(err error) *Store_ExecTx_Call

func (*Store_ExecTx_Call) Run

func (_c *Store_ExecTx_Call) Run(run func(ctx context.Context, fn func(store.Store) error)) *Store_ExecTx_Call

func (*Store_ExecTx_Call) RunAndReturn

func (_c *Store_ExecTx_Call) RunAndReturn(run func(ctx context.Context, fn func(store.Store) error) error) *Store_ExecTx_Call

type Store_Expecter

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

func (*Store_Expecter) BeginTx

func (_e *Store_Expecter) BeginTx(ctx interface{}) *Store_BeginTx_Call

BeginTx is a helper method to define mock.On call

  • ctx context.Context

func (*Store_Expecter) Close

func (_e *Store_Expecter) Close() *Store_Close_Call

Close is a helper method to define mock.On call

func (*Store_Expecter) CompletePrediction

func (_e *Store_Expecter) CompletePrediction(ctx interface{}, id interface{}, result interface{}, err interface{}) *Store_CompletePrediction_Call

CompletePrediction is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID
  • result models.PredictionResult
  • err error

func (*Store_Expecter) Conn

func (_e *Store_Expecter) Conn() *Store_Conn_Call

Conn is a helper method to define mock.On call

func (*Store_Expecter) CreateUser

func (_e *Store_Expecter) CreateUser(ctx interface{}, user interface{}) *Store_CreateUser_Call

CreateUser is a helper method to define mock.On call

  • ctx context.Context
  • user *models.User

func (*Store_Expecter) DeleteUser

func (_e *Store_Expecter) DeleteUser(ctx interface{}, id interface{}) *Store_DeleteUser_Call

DeleteUser is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID

func (*Store_Expecter) ExecTx

func (_e *Store_Expecter) ExecTx(ctx interface{}, fn interface{}) *Store_ExecTx_Call

ExecTx is a helper method to define mock.On call

  • ctx context.Context
  • fn func(store.Store) error

func (*Store_Expecter) GetLoginHistory

func (_e *Store_Expecter) GetLoginHistory(ctx interface{}, userID interface{}) *Store_GetLoginHistory_Call

GetLoginHistory is a helper method to define mock.On call

  • ctx context.Context
  • userID uuid.UUID

func (*Store_Expecter) GetPrediction

func (_e *Store_Expecter) GetPrediction(ctx interface{}, id interface{}) *Store_GetPrediction_Call

GetPrediction is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID

func (*Store_Expecter) GetPredictionsByUserID

func (_e *Store_Expecter) GetPredictionsByUserID(ctx interface{}, userID interface{}, offset interface{}, limit interface{}) *Store_GetPredictionsByUserID_Call

GetPredictionsByUserID is a helper method to define mock.On call

  • ctx context.Context
  • userID uuid.UUID
  • offset int
  • limit int

func (*Store_Expecter) GetRefreshTokenByHash

func (_e *Store_Expecter) GetRefreshTokenByHash(ctx interface{}, tokenHash interface{}) *Store_GetRefreshTokenByHash_Call

GetRefreshTokenByHash is a helper method to define mock.On call

  • ctx context.Context
  • tokenHash string

func (*Store_Expecter) GetUser

func (_e *Store_Expecter) GetUser(ctx interface{}, id interface{}, withStats interface{}) *Store_GetUser_Call

GetUser is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID
  • withStats bool

func (*Store_Expecter) GetUserByLogin

func (_e *Store_Expecter) GetUserByLogin(ctx interface{}, login interface{}) *Store_GetUserByLogin_Call

GetUserByLogin is a helper method to define mock.On call

  • ctx context.Context
  • login string

func (*Store_Expecter) InsertLoginHistory

func (_e *Store_Expecter) InsertLoginHistory(ctx interface{}, loginHistory interface{}) *Store_InsertLoginHistory_Call

InsertLoginHistory is a helper method to define mock.On call

  • ctx context.Context
  • loginHistory *models.LoginHistory

func (*Store_Expecter) InsertRefreshToken

func (_e *Store_Expecter) InsertRefreshToken(ctx interface{}, refreshToken interface{}) *Store_InsertRefreshToken_Call

InsertRefreshToken is a helper method to define mock.On call

  • ctx context.Context
  • refreshToken *models.RefreshToken

func (*Store_Expecter) RevokeAllUserTokens

func (_e *Store_Expecter) RevokeAllUserTokens(ctx interface{}, userID interface{}) *Store_RevokeAllUserTokens_Call

RevokeAllUserTokens is a helper method to define mock.On call

  • ctx context.Context
  • userID uuid.UUID

func (*Store_Expecter) RevokeRefreshToken

func (_e *Store_Expecter) RevokeRefreshToken(ctx interface{}, tokenHash interface{}) *Store_RevokeRefreshToken_Call

RevokeRefreshToken is a helper method to define mock.On call

  • ctx context.Context
  • tokenHash string

func (*Store_Expecter) StartPrediction

func (_e *Store_Expecter) StartPrediction(ctx interface{}, userID interface{}, scanURL interface{}) *Store_StartPrediction_Call

StartPrediction is a helper method to define mock.On call

  • ctx context.Context
  • userID uuid.UUID
  • scanURL string

func (*Store_Expecter) UpdateAvatar

func (_e *Store_Expecter) UpdateAvatar(ctx interface{}, user interface{}) *Store_UpdateAvatar_Call

UpdateAvatar is a helper method to define mock.On call

  • ctx context.Context
  • user *models.User

func (*Store_Expecter) UpdateStats

func (_e *Store_Expecter) UpdateStats(ctx interface{}, stat interface{}) *Store_UpdateStats_Call

UpdateStats is a helper method to define mock.On call

  • ctx context.Context
  • stat *models.Stat

func (*Store_Expecter) UpdateUserPass

func (_e *Store_Expecter) UpdateUserPass(ctx interface{}, id interface{}, newHashedPass interface{}) *Store_UpdateUserPass_Call

UpdateUserPass is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID
  • newHashedPass string

func (*Store_Expecter) WithTx

func (_e *Store_Expecter) WithTx(tx interface{}) *Store_WithTx_Call

WithTx is a helper method to define mock.On call

  • tx pgx.Tx

type Store_GetLoginHistory_Call

type Store_GetLoginHistory_Call struct {
	*mock.Call
}

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

func (*Store_GetLoginHistory_Call) Return

func (*Store_GetLoginHistory_Call) Run

func (*Store_GetLoginHistory_Call) RunAndReturn

type Store_GetPrediction_Call

type Store_GetPrediction_Call struct {
	*mock.Call
}

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

func (*Store_GetPrediction_Call) Return

func (*Store_GetPrediction_Call) Run

func (*Store_GetPrediction_Call) RunAndReturn

type Store_GetPredictionsByUserID_Call

type Store_GetPredictionsByUserID_Call struct {
	*mock.Call
}

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

func (*Store_GetPredictionsByUserID_Call) Return

func (*Store_GetPredictionsByUserID_Call) Run

func (_c *Store_GetPredictionsByUserID_Call) Run(run func(ctx context.Context, userID uuid.UUID, offset int, limit int)) *Store_GetPredictionsByUserID_Call

func (*Store_GetPredictionsByUserID_Call) RunAndReturn

func (_c *Store_GetPredictionsByUserID_Call) RunAndReturn(run func(ctx context.Context, userID uuid.UUID, offset int, limit int) ([]*models.Prediction, error)) *Store_GetPredictionsByUserID_Call

type Store_GetRefreshTokenByHash_Call

type Store_GetRefreshTokenByHash_Call struct {
	*mock.Call
}

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

func (*Store_GetRefreshTokenByHash_Call) Return

func (*Store_GetRefreshTokenByHash_Call) Run

func (*Store_GetRefreshTokenByHash_Call) RunAndReturn

type Store_GetUserByLogin_Call

type Store_GetUserByLogin_Call struct {
	*mock.Call
}

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

func (*Store_GetUserByLogin_Call) Return

func (*Store_GetUserByLogin_Call) Run

func (*Store_GetUserByLogin_Call) RunAndReturn

func (_c *Store_GetUserByLogin_Call) RunAndReturn(run func(ctx context.Context, login string) (*models.User, error)) *Store_GetUserByLogin_Call

type Store_GetUser_Call

type Store_GetUser_Call struct {
	*mock.Call
}

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

func (*Store_GetUser_Call) Return

func (_c *Store_GetUser_Call) Return(user *models.User, err error) *Store_GetUser_Call

func (*Store_GetUser_Call) Run

func (_c *Store_GetUser_Call) Run(run func(ctx context.Context, id uuid.UUID, withStats bool)) *Store_GetUser_Call

func (*Store_GetUser_Call) RunAndReturn

func (_c *Store_GetUser_Call) RunAndReturn(run func(ctx context.Context, id uuid.UUID, withStats bool) (*models.User, error)) *Store_GetUser_Call

type Store_InsertLoginHistory_Call

type Store_InsertLoginHistory_Call struct {
	*mock.Call
}

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

func (*Store_InsertLoginHistory_Call) Return

func (*Store_InsertLoginHistory_Call) Run

func (*Store_InsertLoginHistory_Call) RunAndReturn

type Store_InsertRefreshToken_Call

type Store_InsertRefreshToken_Call struct {
	*mock.Call
}

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

func (*Store_InsertRefreshToken_Call) Return

func (*Store_InsertRefreshToken_Call) Run

func (*Store_InsertRefreshToken_Call) RunAndReturn

type Store_RevokeAllUserTokens_Call

type Store_RevokeAllUserTokens_Call struct {
	*mock.Call
}

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

func (*Store_RevokeAllUserTokens_Call) Return

func (*Store_RevokeAllUserTokens_Call) Run

func (*Store_RevokeAllUserTokens_Call) RunAndReturn

type Store_RevokeRefreshToken_Call

type Store_RevokeRefreshToken_Call struct {
	*mock.Call
}

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

func (*Store_RevokeRefreshToken_Call) Return

func (*Store_RevokeRefreshToken_Call) Run

func (*Store_RevokeRefreshToken_Call) RunAndReturn

func (_c *Store_RevokeRefreshToken_Call) RunAndReturn(run func(ctx context.Context, tokenHash string) error) *Store_RevokeRefreshToken_Call

type Store_StartPrediction_Call

type Store_StartPrediction_Call struct {
	*mock.Call
}

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

func (*Store_StartPrediction_Call) Return

func (*Store_StartPrediction_Call) Run

func (_c *Store_StartPrediction_Call) Run(run func(ctx context.Context, userID uuid.UUID, scanURL string)) *Store_StartPrediction_Call

func (*Store_StartPrediction_Call) RunAndReturn

func (_c *Store_StartPrediction_Call) RunAndReturn(run func(ctx context.Context, userID uuid.UUID, scanURL string) (*models.Prediction, error)) *Store_StartPrediction_Call

type Store_UpdateAvatar_Call

type Store_UpdateAvatar_Call struct {
	*mock.Call
}

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

func (*Store_UpdateAvatar_Call) Return

func (*Store_UpdateAvatar_Call) Run

func (*Store_UpdateAvatar_Call) RunAndReturn

func (_c *Store_UpdateAvatar_Call) RunAndReturn(run func(ctx context.Context, user *models.User) error) *Store_UpdateAvatar_Call

type Store_UpdateStats_Call

type Store_UpdateStats_Call struct {
	*mock.Call
}

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

func (*Store_UpdateStats_Call) Return

func (*Store_UpdateStats_Call) Run

func (*Store_UpdateStats_Call) RunAndReturn

func (_c *Store_UpdateStats_Call) RunAndReturn(run func(ctx context.Context, stat *models.Stat) error) *Store_UpdateStats_Call

type Store_UpdateUserPass_Call

type Store_UpdateUserPass_Call struct {
	*mock.Call
}

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

func (*Store_UpdateUserPass_Call) Return

func (*Store_UpdateUserPass_Call) Run

func (_c *Store_UpdateUserPass_Call) Run(run func(ctx context.Context, id uuid.UUID, newHashedPass string)) *Store_UpdateUserPass_Call

func (*Store_UpdateUserPass_Call) RunAndReturn

func (_c *Store_UpdateUserPass_Call) RunAndReturn(run func(ctx context.Context, id uuid.UUID, newHashedPass string) error) *Store_UpdateUserPass_Call

type Store_WithTx_Call

type Store_WithTx_Call struct {
	*mock.Call
}

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

func (*Store_WithTx_Call) Return

func (_c *Store_WithTx_Call) Return(store1 store.Store) *Store_WithTx_Call

func (*Store_WithTx_Call) Run

func (_c *Store_WithTx_Call) Run(run func(tx pgx.Tx)) *Store_WithTx_Call

func (*Store_WithTx_Call) RunAndReturn

func (_c *Store_WithTx_Call) RunAndReturn(run func(tx pgx.Tx) store.Store) *Store_WithTx_Call

type Tx

type Tx struct {
	mock.Mock
}

Tx is an autogenerated mock type for the Tx type

func NewTx

func NewTx(t interface {
	mock.TestingT
	Cleanup(func())
}) *Tx

NewTx creates a new instance of Tx. 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 (*Tx) Begin

func (_mock *Tx) Begin(ctx context.Context) (pgx.Tx, error)

Begin provides a mock function for the type Tx

func (*Tx) Commit

func (_mock *Tx) Commit(ctx context.Context) error

Commit provides a mock function for the type Tx

func (*Tx) Conn

func (_mock *Tx) Conn() *pgx.Conn

Conn provides a mock function for the type Tx

func (*Tx) CopyFrom

func (_mock *Tx) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)

CopyFrom provides a mock function for the type Tx

func (*Tx) EXPECT

func (_m *Tx) EXPECT() *Tx_Expecter

func (*Tx) Exec

func (_mock *Tx) Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error)

Exec provides a mock function for the type Tx

func (*Tx) LargeObjects

func (_mock *Tx) LargeObjects() pgx.LargeObjects

LargeObjects provides a mock function for the type Tx

func (*Tx) Prepare

func (_mock *Tx) Prepare(ctx context.Context, name string, sql string) (*pgconn.StatementDescription, error)

Prepare provides a mock function for the type Tx

func (*Tx) Query

func (_mock *Tx) Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)

Query provides a mock function for the type Tx

func (*Tx) QueryRow

func (_mock *Tx) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row

QueryRow provides a mock function for the type Tx

func (*Tx) Rollback

func (_mock *Tx) Rollback(ctx context.Context) error

Rollback provides a mock function for the type Tx

func (*Tx) SendBatch

func (_mock *Tx) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults

SendBatch provides a mock function for the type Tx

type Tx_Begin_Call

type Tx_Begin_Call struct {
	*mock.Call
}

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

func (*Tx_Begin_Call) Return

func (_c *Tx_Begin_Call) Return(tx pgx.Tx, err error) *Tx_Begin_Call

func (*Tx_Begin_Call) Run

func (_c *Tx_Begin_Call) Run(run func(ctx context.Context)) *Tx_Begin_Call

func (*Tx_Begin_Call) RunAndReturn

func (_c *Tx_Begin_Call) RunAndReturn(run func(ctx context.Context) (pgx.Tx, error)) *Tx_Begin_Call

type Tx_Commit_Call

type Tx_Commit_Call struct {
	*mock.Call
}

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

func (*Tx_Commit_Call) Return

func (_c *Tx_Commit_Call) Return(err error) *Tx_Commit_Call

func (*Tx_Commit_Call) Run

func (_c *Tx_Commit_Call) Run(run func(ctx context.Context)) *Tx_Commit_Call

func (*Tx_Commit_Call) RunAndReturn

func (_c *Tx_Commit_Call) RunAndReturn(run func(ctx context.Context) error) *Tx_Commit_Call

type Tx_Conn_Call

type Tx_Conn_Call struct {
	*mock.Call
}

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

func (*Tx_Conn_Call) Return

func (_c *Tx_Conn_Call) Return(conn *pgx.Conn) *Tx_Conn_Call

func (*Tx_Conn_Call) Run

func (_c *Tx_Conn_Call) Run(run func()) *Tx_Conn_Call

func (*Tx_Conn_Call) RunAndReturn

func (_c *Tx_Conn_Call) RunAndReturn(run func() *pgx.Conn) *Tx_Conn_Call

type Tx_CopyFrom_Call

type Tx_CopyFrom_Call struct {
	*mock.Call
}

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

func (*Tx_CopyFrom_Call) Return

func (_c *Tx_CopyFrom_Call) Return(n int64, err error) *Tx_CopyFrom_Call

func (*Tx_CopyFrom_Call) Run

func (_c *Tx_CopyFrom_Call) Run(run func(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource)) *Tx_CopyFrom_Call

func (*Tx_CopyFrom_Call) RunAndReturn

func (_c *Tx_CopyFrom_Call) RunAndReturn(run func(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)) *Tx_CopyFrom_Call

type Tx_Exec_Call

type Tx_Exec_Call struct {
	*mock.Call
}

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

func (*Tx_Exec_Call) Return

func (_c *Tx_Exec_Call) Return(commandTag pgconn.CommandTag, err error) *Tx_Exec_Call

func (*Tx_Exec_Call) Run

func (_c *Tx_Exec_Call) Run(run func(ctx context.Context, sql string, arguments ...any)) *Tx_Exec_Call

func (*Tx_Exec_Call) RunAndReturn

func (_c *Tx_Exec_Call) RunAndReturn(run func(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error)) *Tx_Exec_Call

type Tx_Expecter

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

func (*Tx_Expecter) Begin

func (_e *Tx_Expecter) Begin(ctx interface{}) *Tx_Begin_Call

Begin is a helper method to define mock.On call

  • ctx context.Context

func (*Tx_Expecter) Commit

func (_e *Tx_Expecter) Commit(ctx interface{}) *Tx_Commit_Call

Commit is a helper method to define mock.On call

  • ctx context.Context

func (*Tx_Expecter) Conn

func (_e *Tx_Expecter) Conn() *Tx_Conn_Call

Conn is a helper method to define mock.On call

func (*Tx_Expecter) CopyFrom

func (_e *Tx_Expecter) CopyFrom(ctx interface{}, tableName interface{}, columnNames interface{}, rowSrc interface{}) *Tx_CopyFrom_Call

CopyFrom is a helper method to define mock.On call

  • ctx context.Context
  • tableName pgx.Identifier
  • columnNames []string
  • rowSrc pgx.CopyFromSource

func (*Tx_Expecter) Exec

func (_e *Tx_Expecter) Exec(ctx interface{}, sql interface{}, arguments ...interface{}) *Tx_Exec_Call

Exec is a helper method to define mock.On call

  • ctx context.Context
  • sql string
  • arguments ...any

func (*Tx_Expecter) LargeObjects

func (_e *Tx_Expecter) LargeObjects() *Tx_LargeObjects_Call

LargeObjects is a helper method to define mock.On call

func (*Tx_Expecter) Prepare

func (_e *Tx_Expecter) Prepare(ctx interface{}, name interface{}, sql interface{}) *Tx_Prepare_Call

Prepare is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • sql string

func (*Tx_Expecter) Query

func (_e *Tx_Expecter) Query(ctx interface{}, sql interface{}, args ...interface{}) *Tx_Query_Call

Query is a helper method to define mock.On call

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

func (*Tx_Expecter) QueryRow

func (_e *Tx_Expecter) QueryRow(ctx interface{}, sql interface{}, args ...interface{}) *Tx_QueryRow_Call

QueryRow is a helper method to define mock.On call

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

func (*Tx_Expecter) Rollback

func (_e *Tx_Expecter) Rollback(ctx interface{}) *Tx_Rollback_Call

Rollback is a helper method to define mock.On call

  • ctx context.Context

func (*Tx_Expecter) SendBatch

func (_e *Tx_Expecter) SendBatch(ctx interface{}, b interface{}) *Tx_SendBatch_Call

SendBatch is a helper method to define mock.On call

  • ctx context.Context
  • b *pgx.Batch

type Tx_LargeObjects_Call

type Tx_LargeObjects_Call struct {
	*mock.Call
}

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

func (*Tx_LargeObjects_Call) Return

func (_c *Tx_LargeObjects_Call) Return(largeObjects pgx.LargeObjects) *Tx_LargeObjects_Call

func (*Tx_LargeObjects_Call) Run

func (_c *Tx_LargeObjects_Call) Run(run func()) *Tx_LargeObjects_Call

func (*Tx_LargeObjects_Call) RunAndReturn

func (_c *Tx_LargeObjects_Call) RunAndReturn(run func() pgx.LargeObjects) *Tx_LargeObjects_Call

type Tx_Prepare_Call

type Tx_Prepare_Call struct {
	*mock.Call
}

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

func (*Tx_Prepare_Call) Return

func (_c *Tx_Prepare_Call) Return(statementDescription *pgconn.StatementDescription, err error) *Tx_Prepare_Call

func (*Tx_Prepare_Call) Run

func (_c *Tx_Prepare_Call) Run(run func(ctx context.Context, name string, sql string)) *Tx_Prepare_Call

func (*Tx_Prepare_Call) RunAndReturn

func (_c *Tx_Prepare_Call) RunAndReturn(run func(ctx context.Context, name string, sql string) (*pgconn.StatementDescription, error)) *Tx_Prepare_Call

type Tx_QueryRow_Call

type Tx_QueryRow_Call struct {
	*mock.Call
}

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

func (*Tx_QueryRow_Call) Return

func (_c *Tx_QueryRow_Call) Return(row pgx.Row) *Tx_QueryRow_Call

func (*Tx_QueryRow_Call) Run

func (_c *Tx_QueryRow_Call) Run(run func(ctx context.Context, sql string, args ...any)) *Tx_QueryRow_Call

func (*Tx_QueryRow_Call) RunAndReturn

func (_c *Tx_QueryRow_Call) RunAndReturn(run func(ctx context.Context, sql string, args ...any) pgx.Row) *Tx_QueryRow_Call

type Tx_Query_Call

type Tx_Query_Call struct {
	*mock.Call
}

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

func (*Tx_Query_Call) Return

func (_c *Tx_Query_Call) Return(rows pgx.Rows, err error) *Tx_Query_Call

func (*Tx_Query_Call) Run

func (_c *Tx_Query_Call) Run(run func(ctx context.Context, sql string, args ...any)) *Tx_Query_Call

func (*Tx_Query_Call) RunAndReturn

func (_c *Tx_Query_Call) RunAndReturn(run func(ctx context.Context, sql string, args ...any) (pgx.Rows, error)) *Tx_Query_Call

type Tx_Rollback_Call

type Tx_Rollback_Call struct {
	*mock.Call
}

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

func (*Tx_Rollback_Call) Return

func (_c *Tx_Rollback_Call) Return(err error) *Tx_Rollback_Call

func (*Tx_Rollback_Call) Run

func (_c *Tx_Rollback_Call) Run(run func(ctx context.Context)) *Tx_Rollback_Call

func (*Tx_Rollback_Call) RunAndReturn

func (_c *Tx_Rollback_Call) RunAndReturn(run func(ctx context.Context) error) *Tx_Rollback_Call

type Tx_SendBatch_Call

type Tx_SendBatch_Call struct {
	*mock.Call
}

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

func (*Tx_SendBatch_Call) Return

func (_c *Tx_SendBatch_Call) Return(batchResults pgx.BatchResults) *Tx_SendBatch_Call

func (*Tx_SendBatch_Call) Run

func (_c *Tx_SendBatch_Call) Run(run func(ctx context.Context, b *pgx.Batch)) *Tx_SendBatch_Call

func (*Tx_SendBatch_Call) RunAndReturn

func (_c *Tx_SendBatch_Call) RunAndReturn(run func(ctx context.Context, b *pgx.Batch) pgx.BatchResults) *Tx_SendBatch_Call

Jump to

Keyboard shortcuts

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