Versions in this module Expand all Collapse all v1 v1.2.0 Sep 19, 2019 Changes in this version + func APIInvalidHandler(w http.ResponseWriter, _ *http.Request) + func DestroySessionsForUserID(dbMap *gorp.DbMap, userID int64) error + func DisableLog() + func GojiWebHandlerFunc(h http.HandlerFunc) web.HandlerFunc + func ReloadTemplatesSig(_ *Application) — windows/amd64 + func ReloadTemplatesSig(app *Application) — darwin/amd64, linux/amd64 + func UseLogger(logger slog.Logger) + func WriteAPIResponse(resp *APIResponse, code int, w http.ResponseWriter) + type APIResponse struct + Code codes.Code + Data interface{} + Message string + Status string + func NewAPIResponse(status string, code codes.Code, message string, data interface{}) *APIResponse + type Application struct + APISecret string + DbMap *gorp.DbMap + Store *SQLStore + Template *template.Template + TemplatesPath string + func (application *Application) APIHandler(apiFun func(web.C, *http.Request) *APIResponse) web.HandlerFunc + func (application *Application) ApplyAPI(c *web.C, h http.Handler) http.Handler + func (application *Application) ApplyAuth(c *web.C, h http.Handler) http.Handler + func (application *Application) ApplyCaptcha(c *web.C, h http.Handler) http.Handler + func (application *Application) ApplyDbMap(c *web.C, h http.Handler) http.Handler + func (application *Application) ApplyGzip(c *web.C, h http.Handler) http.Handler + func (application *Application) ApplySessions(c *web.C, h http.Handler) http.Handler + func (application *Application) ApplyTemplates(c *web.C, h http.Handler) http.Handler + func (application *Application) Close() + func (application *Application) Init(APISecret, baseURL, cookieSecret string, cookieSecure bool, ...) + func (application *Application) LoadTemplates(templatePath string) error + func (application *Application) Route(controller interface{}, route string) web.HandlerFunc + type Controller struct + func (controller *Controller) CheckPasswordResetToken(tokenStr string, c web.C) (models.UserToken, *models.PasswordReset, bool) + func (controller *Controller) GetDbMap(c web.C) *gorp.DbMap + func (controller *Controller) GetSession(c web.C) *sessions.Session + func (controller *Controller) GetTemplate(c web.C) *template.Template + func (controller *Controller) IsCaptchaDone(c web.C) bool + func (controller *Controller) Parse(t *template.Template, name string, data interface{}) string + type SQLStore struct + Options *sessions.Options + func NewSQLStore(dbMap *gorp.DbMap, keyPairs ...[]byte) *SQLStore + func (s *SQLStore) Get(r *http.Request, name string) (*sessions.Session, error) + func (s *SQLStore) New(r *http.Request, name string) (*sessions.Session, error) + func (s *SQLStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error