routes

package
v0.0.0-...-db47865 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *models.Config, db *gorm.DB) http.Handler

Types

type Claims

type Claims struct {
	Username string `json:"username"`
	HasMFA   bool   `json:"has_mfa"`
	jwt.StandardClaims
}

TODO: this is redefined in oauth_google.go!!!! Ugly!!!

type SessionHandler

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

func NewSessionHandler

func NewSessionHandler(config *models.Config) *SessionHandler

func (*SessionHandler) IdentificationMiddleware

func (s *SessionHandler) IdentificationMiddleware(jwtKey []byte, h http.HandlerFunc) http.HandlerFunc

func (*SessionHandler) SessionMiddleware

func (s *SessionHandler) SessionMiddleware(jwtKey []byte, h http.HandlerFunc, allowNoSession bool) http.HandlerFunc

type TemplateHandler

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

func NewTemplateHandler

func NewTemplateHandler(config *models.Config) *TemplateHandler

func (*TemplateHandler) CompileTemplates

func (g *TemplateHandler) CompileTemplates(dir string) error

func (*TemplateHandler) HandleEmbeddedTemplate

func (g *TemplateHandler) HandleEmbeddedTemplate(response http.ResponseWriter, request *http.Request)

func (*TemplateHandler) HandleStaticAsset

func (g *TemplateHandler) HandleStaticAsset(response http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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