Documentation
¶
Index ¶
- type Server
- func (server *Server) AddRepertoire(ctx *gin.Context)
- func (server *Server) AddReservation(ctx *gin.Context)
- func (server *Server) CancelReservation(ctx *gin.Context)
- func (server *Server) DeleteHall(ctx *gin.Context)
- func (server *Server) DeleteMovie(ctx *gin.Context)
- func (server *Server) DeleteRepertoire(ctx *gin.Context)
- func (server *Server) DeleteRepertoireForMovie(ctx *gin.Context)
- func (server *Server) GetAllRepertoireForMovie(ctx *gin.Context)
- func (server *Server) GetAllReservationsForUser(ctx *gin.Context)
- func (server *Server) GetRepertoire(ctx *gin.Context)
- func (server *Server) InsertHall(ctx *gin.Context)
- func (server *Server) InsertMovie(ctx *gin.Context)
- func (server *Server) InsertUser(ctx *gin.Context)
- func (server *Server) ListRepertoires(ctx *gin.Context)
- func (server *Server) Start(address string) error
- func (server *Server) UpdateHall(ctx *gin.Context)
- func (server *Server) UpdateMovie(ctx *gin.Context)
- func (server *Server) UpdateRepertoire(ctx *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves HTTP requests for our banking service.
func (*Server) AddRepertoire ¶
AddRepertoire godoc @Security bearerAuth @Summary Insert new repertoire @Description Insert new repertoire @ID AddRepertoire @Accept json @Produce json @Param repertoire body models.Repertoire true "Create repertoire" @Success 201 {array} models.Repertoire @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /repertoires [post]
func (*Server) AddReservation ¶
AddReservation godoc @Security bearerAuth @Summary Insert new reservation @Description Insert new reservation @ID AddReservation @Accept json @Produce json @Param reservation body models.Reservation true "Create reservation" @Success 201 {array} models.Reservation @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /reservation [post]
func (*Server) CancelReservation ¶
CancelReservation godoc @Security bearerAuth @Summary Delete a single reservation @Description Delete a single reservation @ID CancelReservation @Accept json @Produce json @Param id path string true "reservation ID" @Success 200 {array} apiResponse @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /reservation/{id} [delete]
func (*Server) DeleteHall ¶
DeleteHall godoc @Security bearerAuth @Summary Delete a single hall @Description Delete a single hall @ID DeleteHall @Accept json @Produce json @Param id path string true "Hall ID" @Success 200 {array} apiResponse @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /halls/{id} [delete]
func (*Server) DeleteMovie ¶
DeleteMovie godoc @Security bearerAuth @Summary Delete a single movie @Description Delete a single movie @ID DeleteMovie @Accept json @Produce json @Param id path string true "Movie ID" @Success 200 {array} apiResponse @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /movies/{id} [delete]
func (*Server) DeleteRepertoire ¶
DeleteRepertoire godoc @Security bearerAuth @Summary Delete a single repertoire @Description Delete a single repertoire @ID DeleteRepertoire @Accept json @Produce json @Param id path string true "repertoire ID" @Success 200 {array} apiResponse @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /repertoires/{id} [delete]
func (*Server) DeleteRepertoireForMovie ¶
DeleteRepertoireForMovie godoc @Security bearerAuth @Summary Delete all repertoires for the movie @Description Delete all repertoires for the movie @ID DeleteRepertoireForMovie @Accept json @Produce json @Param movie_id query string true "movie ID" @Success 200 {array} apiResponse @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /repertoires/movie [delete]
func (*Server) GetAllRepertoireForMovie ¶
GetAllRepertoireForMovie godoc @Security bearerAuth @Summary Get all the existing repertoires for the movie between startDate and endDate @Description Get all the existing repertoires for the movie between startDate and endDate @ID GetAllRepertoireForMovie @Accept json @Produce json @Param movie_id query string true "Movie ID" @Param start_date query string true "Start Date" @Param end_date query string true "End Date" @Success 200 {array} models.Repertoire @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /repertoires/movie [get]
func (*Server) GetAllReservationsForUser ¶
GetAllReservationsForUser godoc @Security bearerAuth @Summary Get all the existing reservations for user @Description Get all the existing reservations for user @ID GetAllReservationsForUser @Accept json @Produce json @Param username query string true "Username" @Success 200 {array} models.Reservation @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /reservationforuser [get]
func (*Server) GetRepertoire ¶
GetRepertoire godoc @Security bearerAuth @Summary List existing repertoire by id @Description Get the existing repertoire by id @ID GetRepertoire @Accept json @Produce json @Param id path string true "Repertoire ID" @Success 200 {array} models.Repertoire @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /repertoires/{id} [get]
func (*Server) InsertHall ¶
InsertHall godoc @Security bearerAuth @Summary Insert new hall @Description Insert new hall @ID InsertHall @Accept json @Produce json @Param hall body models.Hall true "Create hall" @Success 201 {array} models.Hall @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /halls [post]
func (*Server) InsertMovie ¶
InsertMovie godoc @Security bearerAuth @Summary Insert new movie @Description Insert new movie @ID InsertMovie @Accept json @Produce json @Param movie body models.Movie true "Create movie" @Success 201 {array} models.Movie @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /movies [post]
func (*Server) InsertUser ¶
func (*Server) ListRepertoires ¶
ListRepertoires godoc @Security bearerAuth @Summary List existing repertoires @Description Get the existing repertoires @ID ListRepertoires @Accept json @Produce json @Success 200 {array} models.Repertoire @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /repertoires [get]
func (*Server) UpdateHall ¶
UpdateHall godoc @Security bearerAuth @Summary Update a single hall @Description Update a single hall @ID UpdateHall @Accept json @Produce json @Param id path string true "Hall ID" @Param hall body models.Hall true "Update hall" @Success 200 {array} models.Hall @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /halls/{id} [put]
func (*Server) UpdateMovie ¶
UpdateMovie godoc @Security bearerAuth @Summary Update a single movie @Description Update a single movie @ID UpdateMovie @Accept json @Produce json @Param id path string true "Movie ID" @Param movie body models.Movie true "Update hall" @Success 200 {array} models.Movie @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /movies/{id} [put]
func (*Server) UpdateRepertoire ¶
UpdateRepertoire godoc @Security bearerAuth @Summary Update a single repertoire @Description Update a single repertoire @ID UpdateRepertoire @Accept json @Produce json @Param id path string true "Repertoire ID" @Param repertoire body models.Repertoire true "Update repertoire" @Success 200 {array} models.Repertoire @Failure 400 {object} apiErrorResponse @Failure 401 {object} apiErrorResponse @Router /repertoires/{id} [put]