handlers

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: BSD-2-Clause Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppRoot string

TODO Use this

View Source
var DbFile string
View Source
var Files embed.FS
View Source
var Templates map[string]*template.Template

Set by calling code

View Source
var TemplatesDir string

Functions

func ChangePasswordHandler

func ChangePasswordHandler(w http.ResponseWriter, r *http.Request, title string)

func ConfirmHandler

func ConfirmHandler(w http.ResponseWriter, r *http.Request, title string)

func FaviconHandler

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

func ForgotPasswordHandler

func ForgotPasswordHandler(w http.ResponseWriter, r *http.Request, title string)

func HomeHandler

func HomeHandler(w http.ResponseWriter, r *http.Request, title string)

func IsLoggedIn

func IsLoggedIn(r *http.Request) (userrepo.User, error)

func LoadTemplates

func LoadTemplates() error

func LoginHandler

func LoginHandler(w http.ResponseWriter, r *http.Request, title string)

func LogoutHandler

func LogoutHandler(w http.ResponseWriter, r *http.Request, title string)

func SetAuthHandlers

func SetAuthHandlers()

func SignupHandler

func SignupHandler(w http.ResponseWriter, r *http.Request, title string)

Types

type PageInfo

type PageInfo struct {
	AppRoot  string
	Errors   []string
	User     userrepo.User
	Info     []string
	InfoHtml template.HTML
	Title    string
	H1       string

	BuildTime string
	Version   string
	Any       []any
}

func NewPageInfo

func NewPageInfo() PageInfo

Jump to

Keyboard shortcuts

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