handlers

package
v0.0.0-...-ee44259 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandlers

func NewHandlers(r *Repository)

NewHandlers sets the repository for the handlers

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 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) 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 deletes a reservation

func (*Repository) AdminPostReservation

func (m *Repository) AdminPostReservation(w http.ResponseWriter, r *http.Request)

func (*Repository) AdminPostReservationsCalendar

func (m *Repository) AdminPostReservationsCalendar(w http.ResponseWriter, r *http.Request)

AdminPostReservationsCalendar handles post of reservations calendar

func (*Repository) AdminProcessReservation

func (m *Repository) AdminProcessReservation(w http.ResponseWriter, r *http.Request)

AdminProcessReservation marks a reservation as processed

func (*Repository) AdminReservationShow

func (m *Repository) AdminReservationShow(w http.ResponseWriter, r *http.Request)

AdminReservationShow shows the reservation in admin

func (*Repository) AdminReservationsAll

func (m *Repository) AdminReservationsAll(w http.ResponseWriter, r *http.Request)

AdminReservationsAll show all reservations in admin

func (*Repository) AdminReservationsCalendar

func (m *Repository) AdminReservationsCalendar(w http.ResponseWriter, r *http.Request)

func (*Repository) AdminReservationsNew

func (m *Repository) AdminReservationsNew(w http.ResponseWriter, r *http.Request)

AdminReservationsNew show all new reservations in admin

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 requests for availability and sends JSON response

func (*Repository) BookRoom

func (m *Repository) BookRoom(w http.ResponseWriter, r *http.Request)

BookRoom takes URL params, build session variable and redirects to make reservation

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 contact page

func (*Repository) Generals

func (m *Repository) Generals(w http.ResponseWriter, r *http.Request)

Generals renders the generals 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)

Logout logs a user out

func (*Repository) Majors

func (m *Repository) Majors(w http.ResponseWriter, r *http.Request)

Majors renders the majors 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 handles logging the user in

func (*Repository) Reservation

func (m *Repository) Reservation(w http.ResponseWriter, r *http.Request)

Reservation renders the reservation page

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)

Jump to

Keyboard shortcuts

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