handlers

package
v0.0.0-...-c57eb44 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const JOB = "job"

JOB is used as key in map of http vars

View Source
const MAXFORMMEM = 1024

MAXFORMMEM is used to setup max form memory limit

Variables

This section is empty.

Functions

func RegisterAPI

func RegisterAPI(router *mux.Router, schd *scheduler.Scheduler, validator *task.Validator, authKey string)

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func (*API) GetDataDir

func (a *API) GetDataDir() string

GetDataDir return the configured storage directory for this runner

func (*API) HandleDeleteTasks

func (a *API) HandleDeleteTasks(u *claims.Claims,
	w http.ResponseWriter, r *http.Request) (interface{}, error)

HandleDeleteTasks handle a delete on schedules

func (*API) HandleGetTask

func (a *API) HandleGetTask(u *claims.Claims, _ http.ResponseWriter, r *http.Request) (interface{}, error)

HandleGetTask will retreive a task, convert it into a resp and return the data

func (*API) HandleGetTasks

func (a *API) HandleGetTasks(c *claims.Claims, w http.ResponseWriter,
	r *http.Request) (interface{}, error)

HandleGetTasks handles a get on /schedules endpoint

func (*API) HandleGetVolumes

func (a *API) HandleGetVolumes(c *claims.Claims, w http.ResponseWriter, r *http.Request) (interface{}, error)

HandleGetVolumes handler a Get query to retrive file status from a task volume

func (*API) HandlePostTasks

func (a *API) HandlePostTasks(c *claims.Claims,
	w http.ResponseWriter, r *http.Request) (interface{}, error)

HandlePostTasks handles a post on /tasks endpoint

Jump to

Keyboard shortcuts

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