package
0.0.0-20240303080910-d93108cd4fe9
Repository: https://github.com/r4ulcl/ntask.git
Documentation: pkg.go.dev

# Functions

@description Get status summary from Manager @summary Get status summary from Manager @Tags status @accept application/json @produce application/json @success 200 "OK" {object} utils.Status @failure 400 {object} globalstructs.Error @failure 403 {object} globalstructs.Error @security ApiKeyAuth @router /status [get].
@description Delete a tasks @summary Delete a tasks @Tags task @accept application/json @produce application/json @param ID path string true "task ID" @success 200 {object} globalstructs.Task @Failure 400 {object} globalstructs.Error @Failure 403 {object} globalstructs.Error @security ApiKeyAuth @router /task/{ID} [delete].
@description Get status of tasks @summary Get all tasks @Tags task @accept application/json @produce application/json @param ID query string false "Task ID" @param command query string false "Task command" @param name query string false "Task name" @param createdAt query string false "Task createdAt" @param updatedAt query string false "Task updatedAt" @param executedAt query string false "Task executedAt" @param status query string false "Task status" Enums(pending, running, done, failed, deleted) @param workerName query string false "Task workerName" @param username query string false "Task username" @param priority query string false "Task priority" @param callbackURL query string false "Task callbackURL" @param callbackToken query string false "Task callbackToken" @param limit query int false "limit output DB" @param page query int false "page output DB" @success 200 {array} globalstructs.Task @Failure 400 {object} globalstructs.Error @Failure 403 {object} globalstructs.Error @security ApiKeyAuth @router /task [get].
@description Add a new tasks @summary Add a new tasks @Tags task @accept application/json @produce application/json @param task body globalstructs.TaskSwagger true "Task object to create" @success 200 {object} globalstructs.Task @Failure 400 {object} globalstructs.Error @Failure 403 {object} globalstructs.Error @security ApiKeyAuth @router /task [post].
@description Get status of a task @summary Get status of a task @Tags task @accept application/json @produce application/json @param ID path string true "task ID" @success 200 {array} globalstructs.Task @Failure 400 {object} globalstructs.Error @Failure 403 {object} globalstructs.Error @security ApiKeyAuth @router /task/{ID} [get].
HandleWorkerDeleteName handles the request to remove a worker @description Remove a worker from the system @summary Remove a worker @Tags worker @accept application/json @produce application/json @param NAME path string true "Worker NAME" @success 200 {array} string @failure 400 {object} globalstructs.Error @failure 403 {object} globalstructs.Error @security ApiKeyAuth @router /worker/{NAME} [delete].
HandleWorker Get handles the request to get workers @description Handle worker request @summary Get workers @Tags worker @accept application/json @produce application/json @success 200 {array} globalstructs.Worker @failure 400 {object} globalstructs.Error @failure 403 {object} globalstructs.Error @security ApiKeyAuth @router /worker [get].
HandleWorkerPost handles the request to add a worker @description Add a worker, normally done by the worker @summary Add a worker @Tags worker @accept application/json @produce application/json @param worker body globalstructs.Worker true "Worker object to create" @success 200 {array} globalstructs.Worker @failure 400 {object} globalstructs.Error @failure 403 {object} globalstructs.Error @security ApiKeyAuth @router /worker [post].
No description provided by the author
HandleWorkerStatus returns the status of a worker @description Get status of worker @summary Get status of worker @Tags worker @accept application/json @produce application/json @param NAME path string true "Worker NAME" @success 200 {object} globalstructs.Worker @failure 400 {object} globalstructs.Error @failure 403 {object} globalstructs.Error @security ApiKeyAuth @router /worker/{NAME} [get].
ReadUserIP reads the user's IP address from the request.