Documentation ¶
Index ¶
- type Repository
- func (_m *Repository[T]) EXPECT() *Repository_Expecter[T]
- func (_m *Repository[T]) Query(ctx context.Context, qb squirrel.SelectBuilder) ([]T, error)
- func (_m *Repository[T]) QueryBuilder() squirrel.SelectBuilder
- func (_m *Repository[T]) QueryRows(ctx context.Context, sql string) (*sqlx.Rows, error)
- func (_m *Repository[T]) QuerySql(ctx context.Context, query string) ([]T, error)
- type RepositoryRaw
- type RepositoryRaw_Expecter
- type RepositoryRaw_QueryRows_Call
- func (_c *RepositoryRaw_QueryRows_Call) Return(_a0 *sqlx.Rows, _a1 error) *RepositoryRaw_QueryRows_Call
- func (_c *RepositoryRaw_QueryRows_Call) Run(run func(ctx context.Context, sql string)) *RepositoryRaw_QueryRows_Call
- func (_c *RepositoryRaw_QueryRows_Call) RunAndReturn(run func(context.Context, string) (*sqlx.Rows, error)) *RepositoryRaw_QueryRows_Call
- type Repository_Expecter
- func (_e *Repository_Expecter[T]) Query(ctx interface{}, qb interface{}) *Repository_Query_Call[T]
- func (_e *Repository_Expecter[T]) QueryBuilder() *Repository_QueryBuilder_Call[T]
- func (_e *Repository_Expecter[T]) QueryRows(ctx interface{}, sql interface{}) *Repository_QueryRows_Call[T]
- func (_e *Repository_Expecter[T]) QuerySql(ctx interface{}, query interface{}) *Repository_QuerySql_Call[T]
- type Repository_QueryBuilder_Call
- func (_c *Repository_QueryBuilder_Call[T]) Return(_a0 squirrel.SelectBuilder) *Repository_QueryBuilder_Call[T]
- func (_c *Repository_QueryBuilder_Call[T]) Run(run func()) *Repository_QueryBuilder_Call[T]
- func (_c *Repository_QueryBuilder_Call[T]) RunAndReturn(run func() squirrel.SelectBuilder) *Repository_QueryBuilder_Call[T]
- type Repository_QueryRows_Call
- func (_c *Repository_QueryRows_Call[T]) Return(_a0 *sqlx.Rows, _a1 error) *Repository_QueryRows_Call[T]
- func (_c *Repository_QueryRows_Call[T]) Run(run func(ctx context.Context, sql string)) *Repository_QueryRows_Call[T]
- func (_c *Repository_QueryRows_Call[T]) RunAndReturn(run func(context.Context, string) (*sqlx.Rows, error)) *Repository_QueryRows_Call[T]
- type Repository_QuerySql_Call
- func (_c *Repository_QuerySql_Call[T]) Return(_a0 []T, _a1 error) *Repository_QuerySql_Call[T]
- func (_c *Repository_QuerySql_Call[T]) Run(run func(ctx context.Context, query string)) *Repository_QuerySql_Call[T]
- func (_c *Repository_QuerySql_Call[T]) RunAndReturn(run func(context.Context, string) ([]T, error)) *Repository_QuerySql_Call[T]
- type Repository_Query_Call
- func (_c *Repository_Query_Call[T]) Return(_a0 []T, _a1 error) *Repository_Query_Call[T]
- func (_c *Repository_Query_Call[T]) Run(run func(ctx context.Context, qb squirrel.SelectBuilder)) *Repository_Query_Call[T]
- func (_c *Repository_Query_Call[T]) RunAndReturn(run func(context.Context, squirrel.SelectBuilder) ([]T, error)) *Repository_Query_Call[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
Repository is an autogenerated mock type for the Repository type
func NewRepository ¶
func NewRepository[T interface{}](t interface { mock.TestingT Cleanup(func()) }) *Repository[T]
NewRepository creates a new instance of Repository. 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 (*Repository[T]) EXPECT ¶
func (_m *Repository[T]) EXPECT() *Repository_Expecter[T]
func (*Repository[T]) Query ¶
func (_m *Repository[T]) Query(ctx context.Context, qb squirrel.SelectBuilder) ([]T, error)
Query provides a mock function with given fields: ctx, qb
func (*Repository[T]) QueryBuilder ¶
func (_m *Repository[T]) QueryBuilder() squirrel.SelectBuilder
QueryBuilder provides a mock function with given fields:
type RepositoryRaw ¶
RepositoryRaw is an autogenerated mock type for the RepositoryRaw type
func NewRepositoryRaw ¶
func NewRepositoryRaw(t interface { mock.TestingT Cleanup(func()) }) *RepositoryRaw
NewRepositoryRaw creates a new instance of RepositoryRaw. 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 (*RepositoryRaw) EXPECT ¶
func (_m *RepositoryRaw) EXPECT() *RepositoryRaw_Expecter
type RepositoryRaw_Expecter ¶
type RepositoryRaw_Expecter struct {
// contains filtered or unexported fields
}
func (*RepositoryRaw_Expecter) QueryRows ¶
func (_e *RepositoryRaw_Expecter) QueryRows(ctx interface{}, sql interface{}) *RepositoryRaw_QueryRows_Call
QueryRows is a helper method to define mock.On call
- ctx context.Context
- sql string
type RepositoryRaw_QueryRows_Call ¶
RepositoryRaw_QueryRows_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRows'
func (*RepositoryRaw_QueryRows_Call) Return ¶
func (_c *RepositoryRaw_QueryRows_Call) Return(_a0 *sqlx.Rows, _a1 error) *RepositoryRaw_QueryRows_Call
func (*RepositoryRaw_QueryRows_Call) Run ¶
func (_c *RepositoryRaw_QueryRows_Call) Run(run func(ctx context.Context, sql string)) *RepositoryRaw_QueryRows_Call
func (*RepositoryRaw_QueryRows_Call) RunAndReturn ¶
func (_c *RepositoryRaw_QueryRows_Call) RunAndReturn(run func(context.Context, string) (*sqlx.Rows, error)) *RepositoryRaw_QueryRows_Call
type Repository_Expecter ¶
type Repository_Expecter[T interface{}] struct {
// contains filtered or unexported fields
}
func (*Repository_Expecter[T]) Query ¶
func (_e *Repository_Expecter[T]) Query(ctx interface{}, qb interface{}) *Repository_Query_Call[T]
Query is a helper method to define mock.On call
- ctx context.Context
- qb squirrel.SelectBuilder
func (*Repository_Expecter[T]) QueryBuilder ¶
func (_e *Repository_Expecter[T]) QueryBuilder() *Repository_QueryBuilder_Call[T]
QueryBuilder is a helper method to define mock.On call
func (*Repository_Expecter[T]) QueryRows ¶
func (_e *Repository_Expecter[T]) QueryRows(ctx interface{}, sql interface{}) *Repository_QueryRows_Call[T]
QueryRows is a helper method to define mock.On call
- ctx context.Context
- sql string
func (*Repository_Expecter[T]) QuerySql ¶
func (_e *Repository_Expecter[T]) QuerySql(ctx interface{}, query interface{}) *Repository_QuerySql_Call[T]
QuerySql is a helper method to define mock.On call
- ctx context.Context
- query string
type Repository_QueryBuilder_Call ¶
Repository_QueryBuilder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryBuilder'
func (*Repository_QueryBuilder_Call[T]) Return ¶
func (_c *Repository_QueryBuilder_Call[T]) Return(_a0 squirrel.SelectBuilder) *Repository_QueryBuilder_Call[T]
func (*Repository_QueryBuilder_Call[T]) Run ¶
func (_c *Repository_QueryBuilder_Call[T]) Run(run func()) *Repository_QueryBuilder_Call[T]
func (*Repository_QueryBuilder_Call[T]) RunAndReturn ¶
func (_c *Repository_QueryBuilder_Call[T]) RunAndReturn(run func() squirrel.SelectBuilder) *Repository_QueryBuilder_Call[T]
type Repository_QueryRows_Call ¶
Repository_QueryRows_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRows'
func (*Repository_QueryRows_Call[T]) Return ¶
func (_c *Repository_QueryRows_Call[T]) Return(_a0 *sqlx.Rows, _a1 error) *Repository_QueryRows_Call[T]
func (*Repository_QueryRows_Call[T]) Run ¶
func (_c *Repository_QueryRows_Call[T]) Run(run func(ctx context.Context, sql string)) *Repository_QueryRows_Call[T]
func (*Repository_QueryRows_Call[T]) RunAndReturn ¶
func (_c *Repository_QueryRows_Call[T]) RunAndReturn(run func(context.Context, string) (*sqlx.Rows, error)) *Repository_QueryRows_Call[T]
type Repository_QuerySql_Call ¶
Repository_QuerySql_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QuerySql'
func (*Repository_QuerySql_Call[T]) Return ¶
func (_c *Repository_QuerySql_Call[T]) Return(_a0 []T, _a1 error) *Repository_QuerySql_Call[T]
func (*Repository_QuerySql_Call[T]) Run ¶
func (_c *Repository_QuerySql_Call[T]) Run(run func(ctx context.Context, query string)) *Repository_QuerySql_Call[T]
func (*Repository_QuerySql_Call[T]) RunAndReturn ¶
func (_c *Repository_QuerySql_Call[T]) RunAndReturn(run func(context.Context, string) ([]T, error)) *Repository_QuerySql_Call[T]
type Repository_Query_Call ¶
Repository_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*Repository_Query_Call[T]) Return ¶
func (_c *Repository_Query_Call[T]) Return(_a0 []T, _a1 error) *Repository_Query_Call[T]
func (*Repository_Query_Call[T]) Run ¶
func (_c *Repository_Query_Call[T]) Run(run func(ctx context.Context, qb squirrel.SelectBuilder)) *Repository_Query_Call[T]
func (*Repository_Query_Call[T]) RunAndReturn ¶
func (_c *Repository_Query_Call[T]) RunAndReturn(run func(context.Context, squirrel.SelectBuilder) ([]T, error)) *Repository_Query_Call[T]