routes

package
v0.0.0-...-00868d9 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitSessionStore

func InitSessionStore() (*redistore.RediStore, error)

func JSONHandler

func JSONHandler(handler func(dec *json.Decoder, enc *json.Encoder, w http.ResponseWriter, r *http.Request) error) func(w http.ResponseWriter, r *http.Request)

func MakeRouter

func MakeRouter() *mux.Router

func ServeError403

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

func ServeError404

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

func ServeError500

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

func ServeWithTemplateAndStatusCode

func ServeWithTemplateAndStatusCode(w http.ResponseWriter, r *http.Request, templateName string, code int)

func ServeWithTemplateName

func ServeWithTemplateName(w http.ResponseWriter, r *http.Request, templateName string)

Types

type AuthPayload

type AuthPayload struct {
	User string `user`
}

type ContextType

type ContextType string
const ContextUserKey ContextType = "user"

Jump to

Keyboard shortcuts

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