tasks

package
v2.5.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2018 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTask

func AddTask(w http.ResponseWriter, r *http.Request)

AddTask inserts a task into the database and returns a header or panics

func GetAllTasks

func GetAllTasks(w http.ResponseWriter, r *http.Request)

GetAllTasks returns all tasks for the current project

func GetLastTasks

func GetLastTasks(w http.ResponseWriter, r *http.Request)

GetLastTasks returns the hundred most recent tasks

func GetTask

func GetTask(w http.ResponseWriter, r *http.Request)

GetTask returns a task based on its id

func GetTaskMiddleware

func GetTaskMiddleware(w http.ResponseWriter, r *http.Request)

GetTaskMiddleware is middleware that gets a task by id and sets the context to it or panics

func GetTaskOutput

func GetTaskOutput(w http.ResponseWriter, r *http.Request)

GetTaskOutput returns the logged task output by id and writes it as json

func GetTasksList

func GetTasksList(w http.ResponseWriter, r *http.Request, limit uint64)

GetTasksList returns a list of tasks for the current project in desc order to limit or panics

func Readln

func Readln(r *bufio.Reader) (string, error)

Readln reads from the pipe

func RemoveTask

func RemoveTask(w http.ResponseWriter, r *http.Request)

RemoveTask removes a task from the database

func StartRunner

func StartRunner()

StartRunner begins the task pool, used as a goroutine

Types

type Alert

type Alert struct {
	TaskID  string
	Alias   string
	TaskURL string
	ChatID  string
}

Alert represents an alert that will be templated and sent to the appropriate service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL