Documentation ¶
Index ¶
- func GetTaskHandler(e *Executor) http.HandlerFunc
- func GetTasksHandler(e *Executor) http.HandlerFunc
- func MakeHandler(taskService TaskService, timeoutsService TimeoutsService, ...) http.Handler
- func PostTaskHandler(e *Executor) http.HandlerFunc
- type Distributer
- type Executor
- type GetTaskResp
- type GetTasksResp
- type PostTaskBody
- type PostTaskResp
- type TaskService
- type TaskSource
- type TimeoutsService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTaskHandler ¶
func GetTaskHandler(e *Executor) http.HandlerFunc
func GetTasksHandler ¶
func GetTasksHandler(e *Executor) http.HandlerFunc
func MakeHandler ¶
func MakeHandler(taskService TaskService, timeoutsService TimeoutsService, distributer Distributer) http.Handler
func PostTaskHandler ¶
func PostTaskHandler(e *Executor) http.HandlerFunc
Types ¶
type Distributer ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func NewExecutor(tasksService TaskService, timeoutsService TimeoutsService, distributer Distributer) *Executor
func (*Executor) GetTask ¶
func (e *Executor) GetTask(taskId int64, userId int64) (GetTaskResp, error)
func (*Executor) GetTasks ¶
func (e *Executor) GetTasks(userId int64, limit, offset int) (GetTasksResp, error)
func (*Executor) PostTask ¶
func (e *Executor) PostTask(body PostTaskBody, userId int64) (PostTaskResp, error)
type GetTaskResp ¶
type GetTaskResp struct {
Task TaskSource `json:"task"`
}
type GetTasksResp ¶
type GetTasksResp struct {
Tasks []TaskSource `json:"tasks"`
}
type PostTaskBody ¶
type PostTaskBody struct {
Expression string `json:"expression" validate:"required"`
}
type PostTaskResp ¶
type PostTaskResp struct {
Task TaskSource `json:"task"`
}
type TaskService ¶
type TaskSource ¶
Click to show internal directories.
Click to hide internal directories.