Back to

Package responses

Latest Go to latest

The latest major version is .

Published: Jul 30, 2020 | License: MIT | Module:


func Configure

func Configure()

Configure see main.go configure()

func Error400

func Error400(w http.ResponseWriter, r *http.Request, e error)

Error400 Bad Request

func Error401

func Error401(w http.ResponseWriter, r *http.Request, e error)

Error401 Unauthorized the standard error this is captured by nginx, which converts the 401 into 302 to the login page

func Error403

func Error403(w http.ResponseWriter, r *http.Request, e error)

Error403 Forbidden if there's an error during /auth or if they don't pass validation in /auth

func OK200

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

OK200 returns "200 OK"

func Redirect302

func Redirect302(w http.ResponseWriter, r *http.Request, rURL string)

Redirect302 redirect to the specificed rURL

func RenderIndex

func RenderIndex(w http.ResponseWriter, msg string)

RenderIndex render the response as an HTML page, mostly used in testing

type Index

type Index struct {
	Msg      string
	TestURLs []string
	Testing  bool

Index variables passed to index.tmpl

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier