controller

package
v0.0.0-...-1f33363 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMovies

func AddMovies(context *gin.Context)

func AddScreens

func AddScreens(context *gin.Context)

func AddSeats

func AddSeats(context *gin.Context)

func AddShowsInTheatre

func AddShowsInTheatre(context *gin.Context)

func AddTheaters

func AddTheaters(context *gin.Context)

func BookTicket

func BookTicket(context *gin.Context)

func CreateCities

func CreateCities(context *gin.Context)

func GetMovies

func GetMovies(context *gin.Context)

func GetSeatsForTheater

func GetSeatsForTheater(context *gin.Context)

func GetShowsForTheatre

func GetShowsForTheatre(context *gin.Context)

func GetTheatresByCity

func GetTheatresByCity(context *gin.Context)

func GetUserTickets

func GetUserTickets(context *gin.Context)

func LoginUser

func LoginUser(context *gin.Context)

LoginUser method to login user by generating JWT Token and setting cookie

func LogoutUser

func LogoutUser(context *gin.Context)

LogoutUser method logs out the user by deleting the cookie

func RegisterUser

func RegisterUser(context *gin.Context)

func ShowCities

func ShowCities(context *gin.Context)

func ShowScreens

func ShowScreens(context *gin.Context)

func ShowTheaters

func ShowTheaters(context *gin.Context)

func ValidateLogin

func ValidateLogin(handlerFunc gin.HandlerFunc) func(ctx *gin.Context)

ValidateLogin is the middleware.

Types

type AddSeatsRequest

type AddSeatsRequest struct {
	TheaterCompReferId uint32        `json:"theaterId"`
	ScreenSeats        []ScreenSeats `json:"screenSeats"`
}

type BookSeatRequest

type BookSeatRequest struct {
	EmailId     string   `json:"emailId"` // consider using it from cookie/session
	ShowSeatIds []uint32 `json:"showSeatIds"`
}

type ScreenSeats

type ScreenSeats struct {
	ScreenReferId uint32 `json:"screenId"`
	NumSeats      int    `json:"numSeats"`
}

Jump to

Keyboard shortcuts

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