Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
type Application struct {
DB *sql.DB
FormDecoder *form.Decoder
Logger *slog.Logger
SessionManager *scs.SessionManager
Snippets *models.SnippetModel
TemplateCache map[string]*template.Template
Users *models.UserModel
}
func (*Application) IsAuthenticated ¶
func (app *Application) IsAuthenticated(r *http.Request) bool
Return true if the current request is from an authenticated user, otherwise false.
func (*Application) NewTemplateData ¶
func (app *Application) NewTemplateData(r *http.Request) templateData
Source Files
¶
Click to show internal directories.
Click to hide internal directories.