Documentation
¶
Overview ¶
Package mocks contains mocked neuron factory and repository. They should be used only in tests.
Index ¶
- Constants
- type Factory
- type Repository
- func (_m *Repository) Begin(ctx context.Context, tx *query.Tx, m *mapping.ModelStruct) error
- func (_m *Repository) Close(ctx context.Context) error
- func (_m *Repository) Commit(ctx context.Context, tx *query.Tx, m *mapping.ModelStruct) error
- func (_m *Repository) Count(ctx context.Context, s *query.Scope) (int64, error)
- func (_m *Repository) Create(ctx context.Context, s *query.Scope) error
- func (_m *Repository) Delete(ctx context.Context, s *query.Scope) error
- func (_m *Repository) Dial(context.Context) error
- func (_m *Repository) FactoryName() string
- func (_m *Repository) Get(ctx context.Context, s *query.Scope) error
- func (_m *Repository) HealthCheck(ctx context.Context) (*repository.HealthResponse, error)
- func (_m *Repository) List(ctx context.Context, s *query.Scope) error
- func (_m *Repository) ModelTxID(model *mapping.ModelStruct) (string, error)
- func (_m *Repository) Patch(ctx context.Context, s *query.Scope) error
- func (_m *Repository) RegisterModels(models ...*mapping.ModelStruct) error
- func (_m *Repository) Rollback(ctx context.Context, tx *query.Tx, m *mapping.ModelStruct) error
Constants ¶
const DriverName = "neuron-mockery"
DriverName is the driver name used by this mocks factory and repository.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
Factory is the repository.Factory mock implementation
func (*Factory) DriverName ¶
DriverName returns the factory repository name Implements repository.Repository
func (*Factory) New ¶
func (f *Factory) New(model *config.Repository) (repository.Repository, error)
New creates new repository Implements repository.Factory method
type Repository ¶
Repository is an autogenerated mock type for the Repository type
func (*Repository) Begin ¶
func (_m *Repository) Begin(ctx context.Context, tx *query.Tx, m *mapping.ModelStruct) error
Begin provides a mock function with given fields: ctx, s
func (*Repository) Close ¶
func (_m *Repository) Close(ctx context.Context) error
Close closes the repository connection.
func (*Repository) Commit ¶
func (_m *Repository) Commit(ctx context.Context, tx *query.Tx, m *mapping.ModelStruct) error
Commit provides a mock function with given fields: ctx, m.
func (*Repository) Dial ¶ added in v0.13.0
func (_m *Repository) Dial(context.Context) error
Dial implements repository.Repository interface.
func (*Repository) FactoryName ¶
func (_m *Repository) FactoryName() string
FactoryName provides a mock function that implements FactoryName method.
func (*Repository) HealthCheck ¶ added in v0.13.0
func (_m *Repository) HealthCheck(ctx context.Context) (*repository.HealthResponse, error)
func (*Repository) ModelTxID ¶ added in v0.13.0
func (_m *Repository) ModelTxID(model *mapping.ModelStruct) (string, error)
ModelTxID implements query.Transactioner interface.
func (*Repository) RegisterModels ¶ added in v0.13.0
func (_m *Repository) RegisterModels(models ...*mapping.ModelStruct) error
RegisterModels implements repository.Repository interface.
func (*Repository) Rollback ¶
func (_m *Repository) Rollback(ctx context.Context, tx *query.Tx, m *mapping.ModelStruct) error
Rollback provides a mock function with given fields: ctx, s