Documentation
¶
Index ¶
- type Balance
- type MockRepository
- func (_m *MockRepository) CreateBalance(ctx context.Context, _a1 *Balance, opts ...unitofwork.Option) error
- func (_m *MockRepository) GetBalance(ctx context.Context, entityID uuid.UUID, opts ...unitofwork.Option) (*Balance, error)
- func (_m *MockRepository) UpdateBalance(ctx context.Context, _a1 *Balance, opts ...unitofwork.Option) error
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balance ¶
type Balance struct { ID uuid.UUID `json:"id"` // EntityID is the ID of the entity that owns this balance EntityID uuid.UUID `json:"entity_id"` // TotalAmount is the total amount of money in this balance TotalAmount float64 `json:"total_amount"` // AvailableAmount is the amount of money that is available for use AvailableAmount float64 `json:"available_amount"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type MockRepository ¶
MockRepository is an autogenerated mock type for the Repository type
func NewMockRepository ¶
func NewMockRepository(t mockConstructorTestingTNewMockRepository) *MockRepository
NewMockRepository creates a new instance of MockRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockRepository) CreateBalance ¶
func (_m *MockRepository) CreateBalance(ctx context.Context, _a1 *Balance, opts ...unitofwork.Option) error
CreateBalance provides a mock function with given fields: ctx, _a1, opts
func (*MockRepository) GetBalance ¶
func (_m *MockRepository) GetBalance(ctx context.Context, entityID uuid.UUID, opts ...unitofwork.Option) (*Balance, error)
GetBalance provides a mock function with given fields: ctx, entityID, opts
func (*MockRepository) UpdateBalance ¶
func (_m *MockRepository) UpdateBalance(ctx context.Context, _a1 *Balance, opts ...unitofwork.Option) error
UpdateBalance provides a mock function with given fields: ctx, _a1, opts
type Repository ¶
Click to show internal directories.
Click to hide internal directories.