Documentation ¶
Index ¶
- func SetupHandlers(r *Repository)
- type Repository
- func (rep *Repository) About(w http.ResponseWriter, r *http.Request)
- func (rep *Repository) Booking(w http.ResponseWriter, r *http.Request)
- func (rep *Repository) BookingJSON(w http.ResponseWriter, r *http.Request)
- func (rep *Repository) BookingSummary(w http.ResponseWriter, r *http.Request)
- func (rep *Repository) Comfortable(w http.ResponseWriter, r *http.Request)
- func (rep *Repository) Contact(w http.ResponseWriter, r *http.Request)
- func (rep *Repository) Home(w http.ResponseWriter, r *http.Request)
- func (rep *Repository) Majestic(w http.ResponseWriter, r *http.Request)
- func (rep *Repository) MakeReservation(w http.ResponseWriter, r *http.Request)
- func (rep *Repository) PostBooking(w http.ResponseWriter, r *http.Request)
- func (rep *Repository) PostMakeReservation(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupHandlers ¶
func SetupHandlers(r *Repository)
SetupHandlers initialize Repository used by handlers
Types ¶
type Repository ¶
Repository type
var Repo *Repository
NOTE: Using repository pattern allows to swap componets around the app without huge changes in code base
func (*Repository) About ¶
func (rep *Repository) About(w http.ResponseWriter, r *http.Request)
About is the about handler
func (*Repository) Booking ¶
func (rep *Repository) Booking(w http.ResponseWriter, r *http.Request)
Booking is the booking handler
func (*Repository) BookingJSON ¶
func (rep *Repository) BookingJSON(w http.ResponseWriter, r *http.Request)
BookingJSON is handler to create a reservation
func (*Repository) BookingSummary ¶
func (rep *Repository) BookingSummary(w http.ResponseWriter, r *http.Request)
BookingSummary is handler for display a reservation summary
func (*Repository) Comfortable ¶
func (rep *Repository) Comfortable(w http.ResponseWriter, r *http.Request)
Comfortable is the comfortable place handler
func (*Repository) Contact ¶
func (rep *Repository) Contact(w http.ResponseWriter, r *http.Request)
Contact is the comfortable place handler
func (*Repository) Home ¶
func (rep *Repository) Home(w http.ResponseWriter, r *http.Request)
NOTE: Using receivers grant func to access receiver data Home is the home handler
func (*Repository) Majestic ¶
func (rep *Repository) Majestic(w http.ResponseWriter, r *http.Request)
Majestic is the majestic suite handler
func (*Repository) MakeReservation ¶
func (rep *Repository) MakeReservation(w http.ResponseWriter, r *http.Request)
MakeReservation is the comfortable place handler
func (*Repository) PostBooking ¶
func (rep *Repository) PostBooking(w http.ResponseWriter, r *http.Request)
PostBooking is handler to create a reservation
func (*Repository) PostMakeReservation ¶
func (rep *Repository) PostMakeReservation(w http.ResponseWriter, r *http.Request)
PostMakeReservation handles the post make reservation form