controller

package
v0.0.0-...-26b15f6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2017 License: MIT Imports: 10 Imported by: 1

Documentation

Index

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

func ViewPoll

func ViewPoll(w http.ResponseWriter, r *http.Request)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL