Documentation ¶
Overview ¶
Package address contains user address oriented logic.
Package address is a generated GoMock package.
Package address is a generated GoMock package.
Index ¶
- type Address
- type Addresses
- type Filter
- type ID
- type IDFilter
- type IDs
- type MockRepository
- func (m *MockRepository) Create(ctx context.Context, props *Props) (*Address, error)
- func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
- func (m *MockRepository) Get(ctx context.Context, filter *Filter) (*Address, error)
- func (m *MockRepository) Query(ctx context.Context, criteria *QueryCriteria) (Addresses, error)
- type MockRepositoryMockRecorder
- type MockService
- func (m *MockService) Create(ctx context.Context, props *Props) (*Address, error)
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) Get(ctx context.Context, filter *Filter) (*Address, error)
- func (m *MockService) Query(ctx context.Context, criteria *QueryCriteria) (Addresses, error)
- type MockServiceMockRecorder
- type Props
- type QueryCriteria
- type Repository
- type Service
- type UseCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockRepository ¶
type MockRepository struct {
// contains filtered or unexported fields
}
MockRepository is a mock of Repository interface.
func NewMockRepository ¶
func NewMockRepository(ctrl *gomock.Controller) *MockRepository
NewMockRepository creates a new mock instance.
func (*MockRepository) EXPECT ¶
func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRepository) Query ¶
func (m *MockRepository) Query(ctx context.Context, criteria *QueryCriteria) (Addresses, error)
Query mocks base method.
type MockRepositoryMockRecorder ¶
type MockRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockRepositoryMockRecorder is the mock recorder for MockRepository.
func (*MockRepositoryMockRecorder) Create ¶
func (mr *MockRepositoryMockRecorder) Create(ctx, props any) *gomock.Call
Create indicates an expected call of Create.
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface.
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance.
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockService) Query ¶
func (m *MockService) Query(ctx context.Context, criteria *QueryCriteria) (Addresses, error)
Query mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) Create ¶
func (mr *MockServiceMockRecorder) Create(ctx, props any) *gomock.Call
Create indicates an expected call of Create.
type Props ¶
type Props struct { City string Country string Flat *int House int Letter *string Postcode int Street string }
Props represents address editable fields.
type QueryCriteria ¶
type QueryCriteria struct {
Filter Filter
}
QueryCriteria represents a criteria for address query.
type Repository ¶
type Repository interface { Get(ctx context.Context, filter *Filter) (*Address, error) Query(ctx context.Context, criteria *QueryCriteria) (Addresses, error) Create(ctx context.Context, props *Props) (*Address, error) }
Repository represents address repository.
type Service ¶
type Service interface { Get(ctx context.Context, filter *Filter) (*Address, error) Query(ctx context.Context, criteria *QueryCriteria) (Addresses, error) Create(ctx context.Context, props *Props) (*Address, error) }
Service represents address use cases.
type UseCase ¶
type UseCase struct {
// contains filtered or unexported fields
}
UseCase represents address service.
func NewUseCase ¶
func NewUseCase(addressRepo Repository) *UseCase
NewUseCase create instance of UseCase.