Documentation ¶
Index ¶
- Constants
- func ActionRequired(w http.ResponseWriter, r *http.Request)
- func DashBoard(w http.ResponseWriter, r *http.Request)
- func DashBoardIcon(w http.ResponseWriter, r *http.Request)
- func DraftsToComplete(w http.ResponseWriter, r *http.Request)
- func Home(w http.ResponseWriter, r *http.Request)
- func InternalServerError(w http.ResponseWriter, r *http.Request)
- func NotFound(w http.ResponseWriter, r *http.Request)
- func RecentActivity(w http.ResponseWriter, r *http.Request)
- type BaseContext
- type BaseHandler
- func (h BaseHandler) ActionError(w http.ResponseWriter, r *http.Request, ctx BaseContext, msg string, err error, ...)
- func (h BaseHandler) AddFlash(r *http.Request, w http.ResponseWriter, f flash.Flash) error
- func (h *BaseHandler) ErrorModal(w http.ResponseWriter, r *http.Request, errID string, ctx BaseContext)
- func (h *BaseHandler) InternalServerError(w http.ResponseWriter, r *http.Request, ctx BaseContext)
- func (h BaseHandler) NewContext(r *http.Request, w http.ResponseWriter) (BaseContext, error)
- func (h *BaseHandler) NotFound(w http.ResponseWriter, r *http.Request, ctx BaseContext)
- func (h BaseHandler) PathFor(name string, pairs ...string) *url.URL
- func (h BaseHandler) URLFor(name string, pairs ...string) *url.URL
- func (h BaseHandler) Wrap(fn func(http.ResponseWriter, *http.Request, BaseContext)) http.HandlerFunc
- type YieldErrorDialog
- type YieldModalError
- type YieldNotFound
Constants ¶
View Source
const ( UserIDKey = "user_id" OriginalUserIDKey = "original_user_id" UserRoleKey = "user_role" OriginalUserRoleKey = "original_user_role" FlashCookiePrefix = "flash" )
Variables ¶
This section is empty.
Functions ¶
func ActionRequired ¶ added in v1.0.42
func ActionRequired(w http.ResponseWriter, r *http.Request)
func DashBoardIcon ¶ added in v1.0.42
func DashBoardIcon(w http.ResponseWriter, r *http.Request)
func DraftsToComplete ¶ added in v1.0.42
func DraftsToComplete(w http.ResponseWriter, r *http.Request)
func InternalServerError ¶ added in v1.0.42
func InternalServerError(w http.ResponseWriter, r *http.Request)
func RecentActivity ¶ added in v1.0.42
func RecentActivity(w http.ResponseWriter, r *http.Request)
Types ¶
type BaseContext ¶
type BaseContext struct { CurrentURL *url.URL Flash []flash.Flash Timezone *time.Location Loc *gotext.Locale User *models.Person UserRole string OriginalUser *models.Person CSRFToken string CSRFTag template.HTML CSPNonce string FrontendBaseUrl string }
also add fields to Yield method
type BaseHandler ¶
type BaseHandler struct { Router *ich.Mux Logger *zap.SugaredLogger SessionName string SessionStore sessions.Store UserService backends.UserService Timezone *time.Location Loc *gotext.Locale BaseURL *url.URL FrontendBaseUrl string }
TODO handlers should only have access to a url builder, the session and maybe the localizer
func (BaseHandler) ActionError ¶
func (h BaseHandler) ActionError(w http.ResponseWriter, r *http.Request, ctx BaseContext, msg string, err error, ID string)
func (BaseHandler) AddFlash ¶
func (h BaseHandler) AddFlash(r *http.Request, w http.ResponseWriter, f flash.Flash) error
func (*BaseHandler) ErrorModal ¶
func (h *BaseHandler) ErrorModal(w http.ResponseWriter, r *http.Request, errID string, ctx BaseContext)
func (*BaseHandler) InternalServerError ¶
func (h *BaseHandler) InternalServerError(w http.ResponseWriter, r *http.Request, ctx BaseContext)
func (BaseHandler) NewContext ¶
func (h BaseHandler) NewContext(r *http.Request, w http.ResponseWriter) (BaseContext, error)
func (*BaseHandler) NotFound ¶
func (h *BaseHandler) NotFound(w http.ResponseWriter, r *http.Request, ctx BaseContext)
func (BaseHandler) Wrap ¶
func (h BaseHandler) Wrap(fn func(http.ResponseWriter, *http.Request, BaseContext)) http.HandlerFunc
type YieldErrorDialog ¶
type YieldModalError ¶
type YieldModalError struct { BaseContext ID string }
type YieldNotFound ¶
type YieldNotFound struct { BaseContext PageTitle string ErrorTitle string ErrorDescription string }
Directories ¶
Path | Synopsis |
---|---|
TODO this replicates to much of publicationviewing and publicationsearching
|
TODO this replicates to much of publicationviewing and publicationsearching |
Click to show internal directories.
Click to hide internal directories.