2024-12-12 13:27:07 +00:00
|
|
|
package taskcontroller
|
|
|
|
|
|
|
|
import (
|
2025-01-07 14:54:16 +00:00
|
|
|
"code.aides.space/aides-infra/aides-repo-api/internal/models"
|
|
|
|
"code.aides.space/aides-infra/aides-repo-api/internal/services/taskservice"
|
2024-12-12 13:27:07 +00:00
|
|
|
)
|
|
|
|
|
2024-12-26 18:16:05 +00:00
|
|
|
type TaskService interface {
|
|
|
|
Create(repo string) (*models.Task, error)
|
|
|
|
Upload(input *taskservice.TaskUploadInput) error
|
|
|
|
}
|
|
|
|
|
2024-12-12 13:27:07 +00:00
|
|
|
type TaskController struct {
|
2024-12-26 18:16:05 +00:00
|
|
|
taskService TaskService
|
2024-12-12 13:27:07 +00:00
|
|
|
}
|
|
|
|
|
2024-12-26 18:16:05 +00:00
|
|
|
func New(taskService TaskService) *TaskController {
|
2024-12-12 13:27:07 +00:00
|
|
|
return &TaskController{
|
|
|
|
taskService: taskService,
|
|
|
|
}
|
|
|
|
}
|