Documentation ¶
Index ¶
- func AdminAuth(c *fiber.Ctx) error
- func CreateTokenFromUser(user *types.User) string
- func ErrorHandler(c *fiber.Ctx, err error) error
- func InvalidCredentials(c *fiber.Ctx) error
- func JWTAuthentication(userStore db.UserStore) fiber.Handler
- type AuthHandler
- type AuthParams
- type AuthResponse
- type BookingHandler
- type BookingRoomParams
- type Error
- type HotelHandler
- type HotelQueryParams
- type ResourceResp
- type RoomHandler
- type UserHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTokenFromUser ¶
func ErrorHandler ¶
func InvalidCredentials ¶
func InvalidCredentials(c *fiber.Ctx) error
func JWTAuthentication ¶
Types ¶
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
func NewAuthHnadler ¶
func NewAuthHnadler(userStore db.UserStore) *AuthHandler
func (*AuthHandler) HandleAuthentication ¶
func (h *AuthHandler) HandleAuthentication(c *fiber.Ctx) error
type AuthParams ¶
type AuthResponse ¶
type BookingHandler ¶
type BookingHandler struct {
// contains filtered or unexported fields
}
func NewBookingHandler ¶
func NewBookingHandler(store db.Store) *BookingHandler
func (*BookingHandler) HandelGetBookings ¶
func (h *BookingHandler) HandelGetBookings(c *fiber.Ctx) error
func (*BookingHandler) HandleCancelBooking ¶
func (h *BookingHandler) HandleCancelBooking(c *fiber.Ctx) error
func (*BookingHandler) HandleGetBooking ¶
func (h *BookingHandler) HandleGetBooking(c *fiber.Ctx) error
type BookingRoomParams ¶
type Error ¶
func ErrBadRequest ¶
func ErrBadRequest() Error
func ErrInvalidID ¶
func ErrInvalidID() Error
func ErrResourceNotFound ¶
func ErrUnAuthorized ¶
func ErrUnAuthorized() Error
type HotelHandler ¶
type HotelHandler struct {
// contains filtered or unexported fields
}
func NewHotelHandler ¶
func NewHotelHandler(store db.Store) *HotelHandler
func (*HotelHandler) HandelGetHotel ¶
func (h *HotelHandler) HandelGetHotel(c *fiber.Ctx) error
func (*HotelHandler) HandelGetHotels ¶
func (h *HotelHandler) HandelGetHotels(c *fiber.Ctx) error
func (*HotelHandler) HandelGetRooms ¶
func (h *HotelHandler) HandelGetRooms(c *fiber.Ctx) error
type HotelQueryParams ¶
type HotelQueryParams struct { db.Pagination Rating int }
type ResourceResp ¶
type RoomHandler ¶
type RoomHandler struct {
// contains filtered or unexported fields
}
func NewRoomHandler ¶
func NewRoomHandler(store db.Store) *RoomHandler
func (*RoomHandler) BookingRoomHandler ¶
func (h *RoomHandler) BookingRoomHandler(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.Store) *UserHandler
func (*UserHandler) HandelGetUser ¶
func (h *UserHandler) HandelGetUser(c *fiber.Ctx) error
func (*UserHandler) HandleDeleteUser ¶
func (h *UserHandler) HandleDeleteUser(c *fiber.Ctx) error
func (*UserHandler) HandleListUsers ¶
func (h *UserHandler) HandleListUsers(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
Click to show internal directories.
Click to hide internal directories.