Documentation ¶
Overview ¶
Package routes defines all the handling functions for all the routes
Index ¶
- type Controller
- func (controller Controller) Activate(c *gin.Context)
- func (controller Controller) Admin(c *gin.Context)
- func (controller Controller) DefaultPageData(c *gin.Context) PageData
- func (controller Controller) ForgotPassword(c *gin.Context)
- func (controller Controller) ForgotPasswordPost(c *gin.Context)
- func (controller Controller) Index(c *gin.Context)
- func (controller Controller) Login(c *gin.Context)
- func (controller Controller) LoginPost(c *gin.Context)
- func (controller Controller) Logout(c *gin.Context)
- func (controller Controller) NoRoute(c *gin.Context)
- func (controller Controller) Register(c *gin.Context)
- func (controller Controller) RegisterPost(c *gin.Context)
- func (controller Controller) ResendActivation(c *gin.Context)
- func (controller Controller) ResendActivationPost(c *gin.Context)
- func (controller Controller) ResetPassword(c *gin.Context)
- func (controller Controller) ResetPasswordPost(c *gin.Context)
- func (controller Controller) Search(c *gin.Context)
- type Message
- type PageData
- type ResetPasswordPageData
- type SearchData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller holds all the variables needed for routes to perform their logic
func (Controller) Activate ¶
func (controller Controller) Activate(c *gin.Context)
Activate handles requests used to activate a users account
func (Controller) Admin ¶
func (controller Controller) Admin(c *gin.Context)
Admin renders the admin dashboard
func (Controller) DefaultPageData ¶
func (controller Controller) DefaultPageData(c *gin.Context) PageData
func (Controller) ForgotPassword ¶
func (controller Controller) ForgotPassword(c *gin.Context)
ForgotPassword renders the HTML page where a password request can be initiated
func (Controller) ForgotPasswordPost ¶
func (controller Controller) ForgotPasswordPost(c *gin.Context)
ForgotPasswordPost handles the POST request which requests a password reset and then renders the HTML page with the appropriate message
func (Controller) Index ¶
func (controller Controller) Index(c *gin.Context)
Index renders the HTML of the index page
func (Controller) Login ¶
func (controller Controller) Login(c *gin.Context)
Login renders the HTML of the login page
func (Controller) LoginPost ¶
func (controller Controller) LoginPost(c *gin.Context)
LoginPost handles login requests and returns the appropriate HTML and messages
func (Controller) Logout ¶
func (controller Controller) Logout(c *gin.Context)
Logout deletes the current user session and redirects the user to the index page
func (Controller) NoRoute ¶
func (controller Controller) NoRoute(c *gin.Context)
NoRoute handles rendering of the 404 page
func (Controller) Register ¶
func (controller Controller) Register(c *gin.Context)
Register renders the HTML content of the register page
func (Controller) RegisterPost ¶
func (controller Controller) RegisterPost(c *gin.Context)
RegisterPost handles requests to register users and returns appropriate messages as HTML content
func (Controller) ResendActivation ¶
func (controller Controller) ResendActivation(c *gin.Context)
ResendActivation renders the HTML page used to request a new activation email
func (Controller) ResendActivationPost ¶
func (controller Controller) ResendActivationPost(c *gin.Context)
ResendActivationPost handles the post request for requesting a new activation email
func (Controller) ResetPassword ¶
func (controller Controller) ResetPassword(c *gin.Context)
ResetPassword renders the HTML page for resetting the users password
func (Controller) ResetPasswordPost ¶
func (controller Controller) ResetPasswordPost(c *gin.Context)
ResetPasswordPost handles post request used to reset users passwords
func (Controller) Search ¶
func (controller Controller) Search(c *gin.Context)
Search renders the search HTML page and any search results
type PageData ¶
type PageData struct { Title string Messages []Message IsAuthenticated bool CacheParameter string Trans func(s string) string }
PageData holds the default data needed for HTML pages to render
type ResetPasswordPageData ¶
ResetPasswordPageData defines additional data needed to render the reset password page