Documentation
¶
Index ¶
- type ITaskService
- type IUserService
- type TaskService
- func (s *TaskService) ChangeTaskName(ctx context.Context, id string, userID string, name string) error
- func (s *TaskService) CompleteTask(ctx context.Context, id string, userID string) error
- func (s *TaskService) CreateTask(ctx context.Context, userID string, name string) (string, error)
- func (s *TaskService) DeleteTask(ctx context.Context, id string, userID string) error
- func (s *TaskService) FindTaskByID(ctx context.Context, id string) (*entity.Task, error)
- func (s *TaskService) FindTasksByUserID(ctx context.Context, userID string) ([]*entity.Task, error)
- func (s *TaskService) UncompleteTask(ctx context.Context, id string, userID string) error
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ITaskService ¶
type ITaskService interface { FindTaskByID(ctx context.Context, id string) (*entity.Task, error) FindTasksByUserID(ctx context.Context, userID string) ([]*entity.Task, error) CreateTask(ctx context.Context, userID string, name string) (string, error) ChangeTaskName(ctx context.Context, id string, userID string, name string) error CompleteTask(ctx context.Context, id string, userID string) error UncompleteTask(ctx context.Context, id string, userID string) error DeleteTask(ctx context.Context, id, userID string) error }
タスクのドメインロジック
type IUserService ¶
ユーザーのドメインロジック
type TaskService ¶
type TaskService struct { repository.ITaskRepository identification.IIDManager clock.IClockManager }
func NewTaskService ¶
func NewTaskService(repo repository.ITaskRepository, idManager identification.IIDManager, clockManager clock.IClockManager) *TaskService
func (*TaskService) ChangeTaskName ¶
func (*TaskService) CompleteTask ¶
func (*TaskService) CreateTask ¶
func (*TaskService) DeleteTask ¶
func (*TaskService) FindTaskByID ¶
func (*TaskService) FindTasksByUserID ¶
func (*TaskService) UncompleteTask ¶
type UserService ¶
type UserService struct {
repository.IUserRepository
}
func NewUserService ¶
func NewUserService(repo repository.IUserRepository) *UserService
func (*UserService) FindUserByID ¶
Click to show internal directories.
Click to hide internal directories.