Documentation ¶
Index ¶
- Variables
- func HandleCron(handler httprouter.Handle) httprouter.Handle
- func HandleFile(file string) httprouter.Handle
- func HandleJson(handler RestEndpoint) httprouter.Handle
- func TestCronjob(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func TestHander(w http.ResponseWriter, r *http.Request, _ httprouter.Params) interface{}
- type CronJob
- type CronJobs
- type Error
- type FileRoute
- type FileRoutes
- type HTTPMethod
- type JSONRoute
- type JSONRoutes
- type RestEndpoint
- type Test
- type TestResults
Constants ¶
This section is empty.
Variables ¶
View Source
var CRONJOBS = CronJobs{ CronJob{ "/tasks/test", TestCronjob, }, }
View Source
var FILE_ROUTES = FileRoutes{ FileRoute{ "/", "./static/index.html", }, }
View Source
var JSON_ROUTES = JSONRoutes{ JSONRoute{ "/api/test_results", GET, TestHander, }, }
Functions ¶
func HandleCron ¶
func HandleCron(handler httprouter.Handle) httprouter.Handle
func HandleFile ¶
func HandleFile(file string) httprouter.Handle
func HandleJson ¶
func HandleJson(handler RestEndpoint) httprouter.Handle
func TestCronjob ¶
func TestCronjob(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func TestHander ¶
func TestHander(w http.ResponseWriter, r *http.Request, _ httprouter.Params) interface{}
Types ¶
type CronJob ¶
type CronJob struct { Path string Job httprouter.Handle }
type FileRoutes ¶
type FileRoutes []FileRoute
type JSONRoute ¶
type JSONRoute struct { Path string Method HTTPMethod Handler RestEndpoint }
type JSONRoutes ¶
type JSONRoutes []JSONRoute
type RestEndpoint ¶
type RestEndpoint func(http.ResponseWriter, *http.Request, httprouter.Params) interface{}
type TestResults ¶
type TestResults []Test
Click to show internal directories.
Click to hide internal directories.