service

package
v0.0.0-...-4db77b6 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 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 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 IUserService interface {
	FindUserByID(ctx context.Context, id string) (*entity.User, error)
}

ユーザーのドメインロジック

type TaskService

func NewTaskService

func NewTaskService(repo repository.ITaskRepository, idManager identification.IIDManager, clockManager clock.IClockManager) *TaskService

func (*TaskService) ChangeTaskName

func (s *TaskService) ChangeTaskName(ctx context.Context, id string, userID string, name string) error

func (*TaskService) CompleteTask

func (s *TaskService) CompleteTask(ctx context.Context, id string, userID string) error

func (*TaskService) CreateTask

func (s *TaskService) CreateTask(ctx context.Context, userID string, name string) (string, error)

func (*TaskService) DeleteTask

func (s *TaskService) DeleteTask(ctx context.Context, id string, userID string) error

func (*TaskService) FindTaskByID

func (s *TaskService) FindTaskByID(ctx context.Context, id string) (*entity.Task, error)

func (*TaskService) FindTasksByUserID

func (s *TaskService) FindTasksByUserID(ctx context.Context, userID string) ([]*entity.Task, error)

func (*TaskService) UncompleteTask

func (s *TaskService) UncompleteTask(ctx context.Context, id string, userID string) error

type UserService

type UserService struct {
	repository.IUserRepository
}

func NewUserService

func NewUserService(repo repository.IUserRepository) *UserService

func (*UserService) FindUserByID

func (s *UserService) FindUserByID(ctx context.Context, id string) (*entity.User, error)

Jump to

Keyboard shortcuts

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