Documentation ¶
Index ¶
- func ApiIndex(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func NoWebFrontendIndex(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func SendJsonMessage(w http.ResponseWriter, code int, success bool, message string)
- func ViewAdmin(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func ViewIndex(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func ViewLogin(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- type AdminSiteData
- type BasicResponse
- type SiteData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiIndex ¶
func ApiIndex(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
Sends a simple welcome-message to the user.
func NoWebFrontendIndex ¶
func NoWebFrontendIndex(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
Sends a simple welcome-message to the user.
func SendJsonMessage ¶
func SendJsonMessage(w http.ResponseWriter, code int, success bool, message string)
Sends a simple Json-message. It contains a success-bool and a message, which may be empty.
func ViewAdmin ¶
func ViewAdmin(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
Renders the admin-backend if the user is logged in. If the user is not logged in, he will be redirected to the login-page.
func ViewIndex ¶
func ViewIndex(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
Renders the main-page
func ViewLogin ¶
func ViewLogin(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
Renders the login-page if the user is not logged in. If the user is logged in, he will be redirected to the admin-backend.
Types ¶
type AdminSiteData ¶
type AdminSiteData struct { Title string Interval int AppVersion string GoVersion string GoArch string }
Contains the application's data, which will be used on admin-pages.
type BasicResponse ¶
Contains a success-bool and a message, which may be empty.
Click to show internal directories.
Click to hide internal directories.