Documentation
¶
Index ¶
- Variables
- func AdminIndex(w http.ResponseWriter, req *http.Request, app *App)
- func ApproveComment(w http.ResponseWriter, req *http.Request, app *App)
- func CreateComment(w http.ResponseWriter, req *http.Request, app *App)
- func DestroyComment(w http.ResponseWriter, req *http.Request, app *App)
- func GetComments(w http.ResponseWriter, req *http.Request, app *App)
- func GetIndex(w http.ResponseWriter, req *http.Request, app *App)
- func GetLogin(w http.ResponseWriter, req *http.Request, app *App)
- func GetRegister(w http.ResponseWriter, req *http.Request, app *App)
- func PostLogout(w http.ResponseWriter, req *http.Request, app *App)
- func PostSession(w http.ResponseWriter, req *http.Request, app *App)
- func PostUser(w http.ResponseWriter, req *http.Request, app *App)
- type App
- Bugs
Constants ¶
This section is empty.
Variables ¶
var (
SessionName = "disgo"
)
Functions ¶
func AdminIndex ¶
func AdminIndex(w http.ResponseWriter, req *http.Request, app *App)
AdminIndex shows the overview of the admin interface with latest comments.
func ApproveComment ¶
func ApproveComment(w http.ResponseWriter, req *http.Request, app *App)
ApproveComment allows admins to approve a comment by id.
func CreateComment ¶
func CreateComment(w http.ResponseWriter, req *http.Request, app *App)
CreateComment validates and creates a new comment. It also saves the client's IP-adress to reduce spam.
func DestroyComment ¶
func DestroyComment(w http.ResponseWriter, req *http.Request, app *App)
DestroyComment deletes a comment from the database by id.
func GetComments ¶
func GetComments(w http.ResponseWriter, req *http.Request, app *App)
GetComments will display all comments for a given URL-parameter. If configured, it only displays approved comments.
func GetIndex ¶
func GetIndex(w http.ResponseWriter, req *http.Request, app *App)
GetIndex shows a simple introduction.
func GetLogin ¶
func GetLogin(w http.ResponseWriter, req *http.Request, app *App)
GetLogin shows the login form for the backend.
func GetRegister ¶
func GetRegister(w http.ResponseWriter, req *http.Request, app *App)
GetRegister shows the register form.
func PostLogout ¶
func PostLogout(w http.ResponseWriter, req *http.Request, app *App)
PostLogout logs the user out and redirects to the login page.
func PostSession ¶
func PostSession(w http.ResponseWriter, req *http.Request, app *App)
PostLogin takes the email and password parameter and logs the user in if they are correct.
Types ¶
Notes ¶
Bugs ¶
Use migrations instead.