api

package
v0.0.0-...-75ad9af Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHandler

type AuthHandler struct {
	// contains filtered or unexported fields
}

func NewAuthHandler

func NewAuthHandler(us db.UserStore) *AuthHandler

func (*AuthHandler) HandleAuthenticate

func (h *AuthHandler) HandleAuthenticate(c *fiber.Ctx) error

type AuthParams

type AuthParams struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type AuthResponse

type AuthResponse struct {
	User  *customtypes.User
	Token string
}

type BookRoomParams

type BookRoomParams struct {
	FromDate   time.Time `json:"from_date"`
	TillDate   time.Time `json:"till_date"`
	NumPersons int       `json:"num_persons"`
}

type BookingHandler

type BookingHandler struct {
	// contains filtered or unexported fields
}

func NewBookingHandler

func NewBookingHandler(s *db.Store) *BookingHandler

func (*BookingHandler) HandleGetBooking

func (h *BookingHandler) HandleGetBooking(c *fiber.Ctx) error

func (*BookingHandler) HandleGetBookings

func (h *BookingHandler) HandleGetBookings(c *fiber.Ctx) error

type HotelHandler

type HotelHandler struct {
	// contains filtered or unexported fields
}

func NewHotelHandler

func NewHotelHandler(store *db.Store) *HotelHandler

func (*HotelHandler) HandleGetHotelByID

func (h *HotelHandler) HandleGetHotelByID(c *fiber.Ctx) error

func (*HotelHandler) HandleGetHotels

func (h *HotelHandler) HandleGetHotels(c *fiber.Ctx) error

func (*HotelHandler) HandleGetRooms

func (h *HotelHandler) HandleGetRooms(c *fiber.Ctx) error

type RoomHandler

type RoomHandler struct {
	// contains filtered or unexported fields
}

func NewRoomHandler

func NewRoomHandler(store *db.Store) *RoomHandler

func (*RoomHandler) HandleBookRoom

func (h *RoomHandler) HandleBookRoom(c *fiber.Ctx) error

func (*RoomHandler) HandleGetRooms

func (h *RoomHandler) HandleGetRooms(c *fiber.Ctx) error

type UserHandler

type UserHandler struct {
	// contains filtered or unexported fields
}

func NewUserHandler

func NewUserHandler(userStore db.UserStore) *UserHandler

func (*UserHandler) HandleDeleteUser

func (h *UserHandler) HandleDeleteUser(c *fiber.Ctx) error

func (*UserHandler) HandleGetUserById

func (h *UserHandler) HandleGetUserById(c *fiber.Ctx) error

func (*UserHandler) HandleGetUsers

func (h *UserHandler) HandleGetUsers(c *fiber.Ctx) error

func (*UserHandler) HandlePostUser

func (h *UserHandler) HandlePostUser(c *fiber.Ctx) error

func (*UserHandler) HandlePutUser

func (h *UserHandler) HandlePutUser(c *fiber.Ctx) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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