investor

package
v0.0.0-...-fa32389 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Investor

type Investor struct {
	ID       uuid.UUID        `json:"id"`
	Name     string           `json:"name"`
	JoinedAt time.Time        `json:"joined_at"`
	Balance  *balance.Balance `json:"balance"`
}

func New

func New(name string, balanceAmount float64) (*Investor, error)

type MockRepository

type MockRepository struct {
	mock.Mock
}

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) CreateInvestor

func (_m *MockRepository) CreateInvestor(ctx context.Context, _a1 *Investor, opts ...unitofwork.Option) error

CreateInvestor provides a mock function with given fields: ctx, _a1, opts

func (*MockRepository) DeleteInvestor

func (_m *MockRepository) DeleteInvestor(ctx context.Context, id uuid.UUID, opts ...unitofwork.Option) error

DeleteInvestor provides a mock function with given fields: ctx, id, opts

func (*MockRepository) GetInvestorByID

func (_m *MockRepository) GetInvestorByID(ctx context.Context, id uuid.UUID, opts ...unitofwork.Option) (*Investor, error)

GetInvestorByID provides a mock function with given fields: ctx, id, opts

func (*MockRepository) ListInvestors

func (_m *MockRepository) ListInvestors(ctx context.Context) ([]*Investor, error)

ListInvestors provides a mock function with given fields: ctx

func (*MockRepository) UpdateInvestor

func (_m *MockRepository) UpdateInvestor(ctx context.Context, _a1 *Investor, opts ...unitofwork.Option) error

UpdateInvestor provides a mock function with given fields: ctx, _a1, opts

type Repository

type Repository interface {
	CreateInvestor(ctx context.Context, investor *Investor, opts ...unitofwork.Option) error
	GetInvestorByID(ctx context.Context, id uuid.UUID, opts ...unitofwork.Option) (*Investor, error)
	UpdateInvestor(ctx context.Context, investor *Investor, opts ...unitofwork.Option) error
	DeleteInvestor(ctx context.Context, id uuid.UUID, opts ...unitofwork.Option) error
	ListInvestors(ctx context.Context) ([]*Investor, error)
}

type Service

type Service interface {
	CreateInvestor(ctx context.Context, investor *Investor) (*Investor, error)
	GetInvestorByID(ctx context.Context, id uuid.UUID) (*Investor, error)
	UpdateInvestor(ctx context.Context, investor *Investor) (*Investor, error)
	DeleteInvestor(ctx context.Context, id uuid.UUID) error
	ListInvestors(ctx context.Context) ([]*Investor, error)
}

Jump to

Keyboard shortcuts

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