Documentation ¶
Index ¶
Constants ¶
const ( AdminPosition = "admin" ManagerPosition = "manager" AccountantPosition = "accountant" WorkerPosition = "worker" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountCreatedMessage ¶
type AuthAccount ¶
type BaseKafkaMessage ¶
type CreateTaskRequest ¶
type CreateTaskRequest struct {
Description string `json:"description"`
}
type CreateTaskResponse ¶
type CreateTaskResponse struct {
Task Task `json:"task"`
}
type ListMyTasksResponse ¶
type ListMyTasksResponse struct {
Tasks []Task `json:"tasks"`
}
type ListTasksResponse ¶
type ListTasksResponse struct {
Tasks []Task `json:"tasks"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New(tasksRepo *tasks_repo.Repository, accountsRepo *accounts_repo.Repository) *Service
func (*Service) CompleteTask ¶
CompleteTask godoc @Summary Complete firmware @Description Complete firmware @Tags tasks @Accept json @Produce json @Param id path int true "Task Id" @Success 201 @Router /api/v1/tasks/{id}/complete [post] @Security OAuth2Password
func (*Service) CreateTask ¶
CreateTask godoc @Summary Create new task @Description Create new task @Tags tasks @Accept json @Produce json @Param ecu body CreateTaskRequest true "Add task" @Success 201 {object} CreateTaskResponse @Router /api/v1/tasks [post] @Security OAuth2Password
func (*Service) ListMyTasks ¶
CreateTask godoc @Summary List my tasks @Description List my tasks @Tags tasks @Accept json @Produce json @Success 201 {object} ListMyTasksResponse @Router /api/v1/tasks/my [get] @Security OAuth2Password
func (*Service) ListTasks ¶
CreateTask godoc @Summary List all tasks @Description List all tasks @Tags tasks @Accept json @Produce json @Success 201 {object} ListTasksResponse @Router /api/v1/tasks [get] @Security OAuth2Password
func (*Service) SetupRoutes ¶
func (*Service) ShuffleTasks ¶
CreateTask godoc @Summary Shuffle tasks @Description Shuffle tasks @Tags tasks @Accept json @Produce json @Success 201 {object} ShuffleTasksResponse @Router /api/v1/tasks/shuffle [post] @Security OAuth2Password
type ShuffleTasksResponse ¶
type ShuffleTasksResponse struct{}