Documentation ¶
Index ¶
- type Repository
- func (r *Repository) AddTask(ctx context.Context, task model.Task) error
- func (r *Repository) DeleteTask(ctx context.Context, taskID int64) error
- func (r *Repository) FindTaskByID(ctx context.Context, taskID int64) (*model.Task, error)
- func (r *Repository) FindTasksByManagerID(ctx context.Context, userID int64) (*model.Tasks, error)
- func (r *Repository) GetAllTasks(ctx context.Context) (*model.Tasks, error)
- func (r *Repository) UpdateTask(ctx context.Context, taskID int64, task model.Task) error
- type TaskManager
- type TaskService
- func (t *TaskService) CreateTaskHandler(w http.ResponseWriter, r *http.Request)
- func (t *TaskService) DeleteTaskHandler(w http.ResponseWriter, r *http.Request)
- func (t *TaskService) FindTasksByManagerID(w http.ResponseWriter, r *http.Request)
- func (t *TaskService) GetAllTasksHandler(w http.ResponseWriter, r *http.Request)
- func (t *TaskService) GetTaskHandler(w http.ResponseWriter, r *http.Request)
- func (t *TaskService) UpdateTaskHandler(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewTaskRepository ¶
func NewTaskRepository(client *storage.MySQLStorage) (*Repository, error)
func (*Repository) DeleteTask ¶
func (r *Repository) DeleteTask(ctx context.Context, taskID int64) error
func (*Repository) FindTaskByID ¶
func (*Repository) FindTasksByManagerID ¶
func (*Repository) GetAllTasks ¶
func (*Repository) UpdateTask ¶
type TaskManager ¶
type TaskManager interface { AddTask(ctx context.Context, task model.Task) error UpdateTask(ctx context.Context, taskID int64, task model.Task) error DeleteTask(ctx context.Context, taskID int64) error FindTaskByID(ctx context.Context, taskID int64) (*model.Task, error) FindTasksByManagerID(ctx context.Context, userID int64) (*model.Tasks, error) GetAllTasks(ctx context.Context) (*model.Tasks, error) }
type TaskService ¶
type TaskService struct {
// contains filtered or unexported fields
}
func NewTaskService ¶
func NewTaskService(repository *Repository) *TaskService
func (*TaskService) CreateTaskHandler ¶
func (t *TaskService) CreateTaskHandler(w http.ResponseWriter, r *http.Request)
func (*TaskService) DeleteTaskHandler ¶
func (t *TaskService) DeleteTaskHandler(w http.ResponseWriter, r *http.Request)
func (*TaskService) FindTasksByManagerID ¶
func (t *TaskService) FindTasksByManagerID(w http.ResponseWriter, r *http.Request)
func (*TaskService) GetAllTasksHandler ¶
func (t *TaskService) GetAllTasksHandler(w http.ResponseWriter, r *http.Request)
func (*TaskService) GetTaskHandler ¶
func (t *TaskService) GetTaskHandler(w http.ResponseWriter, r *http.Request)
func (*TaskService) UpdateTaskHandler ¶
func (t *TaskService) UpdateTaskHandler(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.