Documentation ¶
Index ¶
- func CreateNewPoll(w http.ResponseWriter, r *http.Request)
- func EditPollHandler(w http.ResponseWriter, r *http.Request)
- func FrontPage(w http.ResponseWriter, r *http.Request)
- func Handle404(w http.ResponseWriter, r *http.Request)
- func Login(w http.ResponseWriter, r *http.Request)
- func Logout(w http.ResponseWriter, r *http.Request)
- func Register(w http.ResponseWriter, r *http.Request)
- func UserDetails(w http.ResponseWriter, r *http.Request)
- func ViewPoll(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNewPoll ¶
func CreateNewPoll(w http.ResponseWriter, r *http.Request)
CreateNewPoll takes care of handling creation of the new poll in url: /new add post title to database
func EditPollHandler ¶
func EditPollHandler(w http.ResponseWriter, r *http.Request)
EditPollHandler handles displaying edit poll template and submitting updates to the database
func FrontPage ¶
func FrontPage(w http.ResponseWriter, r *http.Request)
FrontPage is used to display first page of the web application
func Handle404 ¶
func Handle404(w http.ResponseWriter, r *http.Request)
Handle404 handles default httpNotFound response for 'bone' router
func Login ¶
func Login(w http.ResponseWriter, r *http.Request)
Login is handling login part of the application, by displaying login screen, validating inputs and taking care of user sessions
func Logout ¶
func Logout(w http.ResponseWriter, r *http.Request)
Logout is handling user logout by destroying user session or redirecting to login page if client is not logged in
func Register ¶
func Register(w http.ResponseWriter, r *http.Request)
Register is handling registration of Voting application
func UserDetails ¶
func UserDetails(w http.ResponseWriter, r *http.Request)
UserDetails renders userDetail template and displays users data username and created polls
Types ¶
This section is empty.