Documentation ¶
Overview ¶
Package user is a generated GoMock package.
Package user is a generated GoMock package.
Package user contains user oriented logic.
Index ¶
- func RoleStrings() []string
- func SetUser(ctx context.Context, user *User) context.Context
- type EmailFilter
- type Filter
- type ID
- type IDFilter
- type IDs
- type MockRepository
- func (m *MockRepository) Create(ctx context.Context, props *Props) (*User, error)
- func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
- func (m *MockRepository) Exist(ctx context.Context, filter *Filter) (bool, error)
- func (m *MockRepository) Get(ctx context.Context, filter *Filter) (*User, error)
- type MockRepositoryMockRecorder
- type MockService
- type MockServiceMockRecorder
- type Props
- type QueryCriteria
- type Repository
- type Role
- type Roles
- type Service
- type UseCase
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RoleStrings ¶
func RoleStrings() []string
RoleStrings returns a slice of all String values of the enum
Types ¶
type EmailFilter ¶
EmailFilter represents an email filter.
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.
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.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
type QueryCriteria ¶
type QueryCriteria struct {
Filter Filter
}
QueryCriteria represents a criteria for user query.
type Repository ¶
type Repository interface { Get(ctx context.Context, filter *Filter) (*User, error) Create(ctx context.Context, props *Props) (*User, error) Exist(ctx context.Context, filter *Filter) (bool, error) }
Repository represents user repository.
type Role ¶
type Role uint8
Role represents an user`s roles.
func RoleString ¶
RoleString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
type Service ¶
type Service interface { Get(ctx context.Context, filter *Filter) (*User, error) Create(ctx context.Context, props *Props) (*User, error) }
Service represents user use cases.
type UseCase ¶
type UseCase struct {
// contains filtered or unexported fields
}
UseCase represents user service.
func NewUseCase ¶
func NewUseCase(repository Repository) *UseCase
NewUseCase create instance of UseCase.