Documentation ¶
Index ¶
- func NewHandlers(r *Repository)
- type Repository
- func (m *Repository) About(w http.ResponseWriter, r *http.Request)
- func (m *Repository) AdminAllReservation(w http.ResponseWriter, r *http.Request)
- func (m *Repository) AdminDashboard(w http.ResponseWriter, r *http.Request)
- func (m *Repository) AdminDeleteReservation(w http.ResponseWriter, r *http.Request)
- func (m *Repository) AdminNewReservation(w http.ResponseWriter, r *http.Request)
- func (m *Repository) AdminPostReservationsCalendar(w http.ResponseWriter, r *http.Request)
- func (m *Repository) AdminPostShowReservation(w http.ResponseWriter, r *http.Request)
- func (m *Repository) AdminProcessReservation(w http.ResponseWriter, r *http.Request)
- func (m *Repository) AdminReservationsCalendar(w http.ResponseWriter, r *http.Request)
- func (m *Repository) AdminShowReservation(w http.ResponseWriter, r *http.Request)
- func (m *Repository) Availability(w http.ResponseWriter, r *http.Request)
- func (m *Repository) AvailabilityJSON(w http.ResponseWriter, r *http.Request)
- func (m *Repository) BookRoom(w http.ResponseWriter, r *http.Request)
- func (m *Repository) ChooseRoom(w http.ResponseWriter, r *http.Request)
- func (m *Repository) Contact(w http.ResponseWriter, r *http.Request)
- func (m *Repository) Generals(w http.ResponseWriter, r *http.Request)
- func (m *Repository) Home(w http.ResponseWriter, r *http.Request)
- func (m *Repository) Logout(w http.ResponseWriter, r *http.Request)
- func (m *Repository) Majors(w http.ResponseWriter, r *http.Request)
- func (m *Repository) PostAvailability(w http.ResponseWriter, r *http.Request)
- func (m *Repository) PostReservation(w http.ResponseWriter, r *http.Request)
- func (m *Repository) PostShowLogin(w http.ResponseWriter, r *http.Request)
- func (m *Repository) Reservation(w http.ResponseWriter, r *http.Request)
- func (m *Repository) ReservationSummary(w http.ResponseWriter, r *http.Request)
- func (m *Repository) ShowLogin(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Repository ¶
type Repository struct { App *config.AppConfig DB repository.DatabaseRepo }
Repository is the repository type
var Repo *Repository
Repo the repository used by the handlers
func NewRepo ¶
func NewRepo(a *config.AppConfig, db *driver.DB) *Repository
NewRepo creates a new repository
func NewTestRepo ¶
func NewTestRepo(a *config.AppConfig) *Repository
NewTestRepo creates a new repository
func (*Repository) About ¶
func (m *Repository) About(w http.ResponseWriter, r *http.Request)
About is the about page handler
func (*Repository) AdminAllReservation ¶
func (m *Repository) AdminAllReservation(w http.ResponseWriter, r *http.Request)
AdminReservation shows all processed reservation to the dashboard
func (*Repository) AdminDashboard ¶
func (m *Repository) AdminDashboard(w http.ResponseWriter, r *http.Request)
func (*Repository) AdminDeleteReservation ¶
func (m *Repository) AdminDeleteReservation(w http.ResponseWriter, r *http.Request)
AdminDeleteReservation delete a reservation from database
func (*Repository) AdminNewReservation ¶
func (m *Repository) AdminNewReservation(w http.ResponseWriter, r *http.Request)
AdminNewReservation shows all new reservation to the dashboard
func (*Repository) AdminPostReservationsCalendar ¶
func (m *Repository) AdminPostReservationsCalendar(w http.ResponseWriter, r *http.Request)
func (*Repository) AdminPostShowReservation ¶
func (m *Repository) AdminPostShowReservation(w http.ResponseWriter, r *http.Request)
func (*Repository) AdminProcessReservation ¶
func (m *Repository) AdminProcessReservation(w http.ResponseWriter, r *http.Request)
AdminProcessReservation marked reservation as processed
func (*Repository) AdminReservationsCalendar ¶
func (m *Repository) AdminReservationsCalendar(w http.ResponseWriter, r *http.Request)
AdminReservationsCalendar displays the reservation calendar
func (*Repository) AdminShowReservation ¶
func (m *Repository) AdminShowReservation(w http.ResponseWriter, r *http.Request)
func (*Repository) Availability ¶
func (m *Repository) Availability(w http.ResponseWriter, r *http.Request)
Availability renders the search availability page
func (*Repository) AvailabilityJSON ¶
func (m *Repository) AvailabilityJSON(w http.ResponseWriter, r *http.Request)
AvailabilityJSON handles request for availability and send JSON response
func (*Repository) BookRoom ¶
func (m *Repository) BookRoom(w http.ResponseWriter, r *http.Request)
BookRoom takes URL parameters, builds a sessional variable, and takes user to make res screen
func (*Repository) ChooseRoom ¶
func (m *Repository) ChooseRoom(w http.ResponseWriter, r *http.Request)
ChooseRoom displays list of available rooms
func (*Repository) Contact ¶
func (m *Repository) Contact(w http.ResponseWriter, r *http.Request)
Contact renders the search availability page
func (*Repository) Generals ¶
func (m *Repository) Generals(w http.ResponseWriter, r *http.Request)
Generals renders the room page
func (*Repository) Home ¶
func (m *Repository) Home(w http.ResponseWriter, r *http.Request)
Home is the home page handler
func (*Repository) Logout ¶
func (m *Repository) Logout(w http.ResponseWriter, r *http.Request)
func (*Repository) Majors ¶
func (m *Repository) Majors(w http.ResponseWriter, r *http.Request)
Majors renders the room page
func (*Repository) PostAvailability ¶
func (m *Repository) PostAvailability(w http.ResponseWriter, r *http.Request)
PostAvailability renders the search availability page
func (*Repository) PostReservation ¶
func (m *Repository) PostReservation(w http.ResponseWriter, r *http.Request)
PostReservation handles the posting of a reservation form
func (*Repository) PostShowLogin ¶
func (m *Repository) PostShowLogin(w http.ResponseWriter, r *http.Request)
PostShowLogin handle user authentication
func (*Repository) Reservation ¶
func (m *Repository) Reservation(w http.ResponseWriter, r *http.Request)
Reservation renders the make a reservation page and displays form
func (*Repository) ReservationSummary ¶
func (m *Repository) ReservationSummary(w http.ResponseWriter, r *http.Request)
ReservationSummary displays the reservation summary page
func (*Repository) ShowLogin ¶
func (m *Repository) ShowLogin(w http.ResponseWriter, r *http.Request)