handlers

package
v0.0.0-...-f39640c Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

type Repository struct {
	App *config.AppConfig
}

Repository type

var Repo *Repository

NOTE: Using repository pattern allows to swap componets around the app without huge changes in code base

func NewRepo

func NewRepo(a *config.AppConfig) *Repository

NewRepo creates Repository

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

Jump to

Keyboard shortcuts

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