Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(CreateInitControllersFn, NewController, NewService, ws.NewHub, )
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller interface { GetTasks(c *gin.Context) GetTask(c *gin.Context) UpdateTask(c *gin.Context) ReserveTask(c *gin.Context) }
func NewController ¶
func NewController(logger *zap.Logger, s Service) Controller
type DefaultController ¶
type DefaultController struct {
// contains filtered or unexported fields
}
func (*DefaultController) GetTask ¶
func (d *DefaultController) GetTask(c *gin.Context)
func (*DefaultController) GetTasks ¶
func (d *DefaultController) GetTasks(c *gin.Context)
func (*DefaultController) ReserveTask ¶
func (d *DefaultController) ReserveTask(c *gin.Context)
func (*DefaultController) UpdateTask ¶
func (d *DefaultController) UpdateTask(c *gin.Context)
type InitTaskGroupFn ¶
type InitTaskGroupFn func(r *gin.RouterGroup)
func CreateInitControllersFn ¶
func CreateInitControllersFn(jc Controller, hub *ws.Hub) InitTaskGroupFn
type Service ¶
type Service interface { GetTasks(taskType string) (task []*models.Task, err error) GetTask(taskId string) (task *models.Task, err error) UpdateTask(taskId, warning, error string, outputs *models.Slots) (task *models.Task, err error) ReserveTask(taskId string) (token string, locked bool, err error) }
func NewService ¶
Click to show internal directories.
Click to hide internal directories.