Documentation ¶
Index ¶
- type Bid
- type MockRepository
- func (_m *MockRepository) CreateBid(ctx context.Context, b *Bid, opts ...unitofwork.Option) error
- func (_m *MockRepository) DeleteBid(ctx context.Context, id uuid.UUID, opts ...unitofwork.Option) error
- func (_m *MockRepository) GetBidByID(ctx context.Context, id uuid.UUID) (*Bid, error)
- func (_m *MockRepository) ListBidsByInvestorID(ctx context.Context, investorID uuid.UUID) ([]*Bid, error)
- func (_m *MockRepository) ListBidsByInvoiceID(ctx context.Context, invoiceID uuid.UUID, opts ...unitofwork.Option) ([]*Bid, error)
- func (_m *MockRepository) UpdateBid(ctx context.Context, b *Bid, opts ...unitofwork.Option) error
- type Repository
- type Service
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bid ¶
type Bid struct { ID uuid.UUID `json:"id"` InvoiceID uuid.UUID `json:"invoice_id"` InvestorID uuid.UUID `json:"investor_id"` Amount float64 `json:"amount"` AcceptedAmount float64 `json:"accepted_amount"` Status Status `json:"status"` 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) CreateBid ¶
func (_m *MockRepository) CreateBid(ctx context.Context, b *Bid, opts ...unitofwork.Option) error
CreateBid provides a mock function with given fields: ctx, b, opts
func (*MockRepository) DeleteBid ¶
func (_m *MockRepository) DeleteBid(ctx context.Context, id uuid.UUID, opts ...unitofwork.Option) error
DeleteBid provides a mock function with given fields: ctx, id, opts
func (*MockRepository) GetBidByID ¶
GetBidByID provides a mock function with given fields: ctx, id
func (*MockRepository) ListBidsByInvestorID ¶
func (_m *MockRepository) ListBidsByInvestorID(ctx context.Context, investorID uuid.UUID) ([]*Bid, error)
ListBidsByInvestorID provides a mock function with given fields: ctx, investorID
func (*MockRepository) ListBidsByInvoiceID ¶
func (_m *MockRepository) ListBidsByInvoiceID(ctx context.Context, invoiceID uuid.UUID, opts ...unitofwork.Option) ([]*Bid, error)
ListBidsByInvoiceID provides a mock function with given fields: ctx, invoiceID, opts
func (*MockRepository) UpdateBid ¶
func (_m *MockRepository) UpdateBid(ctx context.Context, b *Bid, opts ...unitofwork.Option) error
UpdateBid provides a mock function with given fields: ctx, b, opts
type Repository ¶
type Repository interface { CreateBid(ctx context.Context, b *Bid, opts ...unitofwork.Option) error GetBidByID(ctx context.Context, id uuid.UUID) (*Bid, error) UpdateBid(ctx context.Context, b *Bid, opts ...unitofwork.Option) error DeleteBid(ctx context.Context, id uuid.UUID, opts ...unitofwork.Option) error ListBidsByInvoiceID(ctx context.Context, invoiceID uuid.UUID, opts ...unitofwork.Option) ([]*Bid, error) ListBidsByInvestorID(ctx context.Context, investorID uuid.UUID) ([]*Bid, error) }
type Service ¶
type Service interface { CreateBid(ctx context.Context, bid *Bid) (*Bid, error) GetBidByID(ctx context.Context, id uuid.UUID) (*Bid, error) UpdateBid(ctx context.Context, bid *Bid) (*Bid, error) DeleteBid(ctx context.Context, id uuid.UUID) error ListBidsByInvoiceID(ctx context.Context, invoiceID uuid.UUID) ([]*Bid, error) ListBidsByInvestorID(ctx context.Context, investorID uuid.UUID) ([]*Bid, error) }