Documentation ¶
Index ¶
Constants ¶
const ( MovieCreatedMsg = "the Movie %v was created successfully" MovieUpdatedMsg = "the Movie with id: %v was updated successfully" MovieDeletedMsg = "the Movie with id: %v was deleted successfully" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheckController ¶
type HealthCheckController struct { }
func (*HealthCheckController) HealthCheck ¶
func (controller *HealthCheckController) HealthCheck(context *gin.Context)
HealthCheckController godoc @summary Health Check @description Health checking for the service @Tags monitoring @id HealthCheckController @produce plain @response 200 {string} string "OK" @router /healthcheck [get]
type MovieCreateController ¶
type MovieCreateController struct { InputValidate *validator.Validate IMovieCreateCommand commands.IMovieCreateCommand }
func (*MovieCreateController) Post ¶
func (controller *MovieCreateController) Post(context *gin.Context)
MovieCreateController godoc @Summary Add a movie @Description add by json movie @Tags movies @Accept json @Produce json @Param movie body models.Movie true "Add movie" @Success 200 {object} models.Movie @Failure 400 {object} apierrors.ApiError @Failure 404 {object} apierrors.ApiError @Failure 500 {object} apierrors.ApiError @Router /movies [post]
type MovieDeleteController ¶
type MovieDeleteController struct {
IMovieDeleteCommand commands.IMovieDeleteCommand
}
func (*MovieDeleteController) Delete ¶
func (controller *MovieDeleteController) Delete(context *gin.Context)
MovieDeleteController godoc @Summary Delete a movie @Description Delete by movie id @Tags movies @Accept json @Produce json @Param id path int true "movie id" Format(int64) @Success 204 {object} models.Movie @Failure 400 {object} apierrors.ApiError @Failure 404 {object} apierrors.ApiError @Failure 500 {object} apierrors.ApiError @Router /movies/{id} [delete]
type MovieFindAllController ¶
type MovieFindAllController struct {
IMovieFindAllQuery queries.IMovieFindAllQuery
}
func (*MovieFindAllController) Browse ¶
func (controller *MovieFindAllController) Browse(context *gin.Context)
MovieFindAllController godoc @Summary List movies @Description get movies @Tags movies @Accept json @Produce json @Success 200 {array} models.Movie @Failure 400 {object} apierrors.ApiError @Failure 404 {object} apierrors.ApiError @Failure 500 {object} apierrors.ApiError @Router /movies [get]
type MovieFindController ¶
type MovieFindController struct {
IMovieFindQuery queries.IMovieFindQuery
}
func (*MovieFindController) Find ¶
func (controller *MovieFindController) Find(context *gin.Context)
MovieFindController godoc @Summary Show a movie @Description get string by id @Tags movies @Accept json @Produce json @Param id path int true "movie id" @Success 200 {object} models.Movie @Failure 400 {object} apierrors.ApiError @Failure 404 {object} apierrors.ApiError @Failure 500 {object} apierrors.ApiError @Router /movies/{id} [get]
type MovieUpdateController ¶
type MovieUpdateController struct { InputValidate *validator.Validate IMovieUpdateCommand commands.IMovieUpdateCommand }
func (*MovieUpdateController) Put ¶
func (movieUpdateController *MovieUpdateController) Put(context *gin.Context)