Documentation
¶
Index ¶
- type MovieApi
- func (route *MovieApi) Add(ctx *gin.Context)
- func (route *MovieApi) Delete(ctx *gin.Context)
- func (route *MovieApi) GetAll(ctx *gin.Context)
- func (route *MovieApi) GetAllUsersMethod(ctx *gin.Context)
- func (route *MovieApi) GetOne(ctx *gin.Context)
- func (route *MovieApi) HealthCheck(ctx *gin.Context)
- func (route *MovieApi) LoginMethod(ctx *gin.Context)
- func (route *MovieApi) RegisterMethod(ctx *gin.Context)
- func (route *MovieApi) Update(ctx *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MovieApi ¶
type MovieApi struct {
// contains filtered or unexported fields
}
func NewMoviesApi ¶
func NewMoviesApi(loginController controller.LoginController, movieController controller.MovieController) *MovieApi
func (*MovieApi) Add ¶
AddMovies godoc @Security bearerAuth @Summary Adds a Movie Info @Accept json @Produce json @Param movie body operation.Movie true "Add Movie" @Success 200 @Failure 401 @Failure 400 @Router /movies [post] @Description Adds a movie to database
func (*MovieApi) Delete ¶
DeleteMovies godoc @Security bearerAuth @Summary Deletes a Movie Info @Produce json @Param id path int true "Delete Movie" @Success 200 @Failure 401 @Failure 400 @Router /movies/{id} [delete] @Description Deletes a movie in database
func (*MovieApi) GetAll ¶
GetMovies godoc @Security bearerAuth @Summary Displays all Movies Info @Accept json @Produce json @Success 200 @Failure 401 @Router /movies [get] @Description Gets all the existing Movies from database
func (*MovieApi) GetAllUsersMethod ¶
Users godoc @Summary Displays all Users @Produce json @Success 200 @Failure 401 @Router /auth/userdisplay [get] @Description Displays all users
func (*MovieApi) GetOne ¶
GetMovie godoc @Security bearerAuth @Summary Displays one movie detail @Produce json @Param id path int true "Display Movie" @Success 200 @Failure 401 @Failure 400 @Router /movies/{id} [get] @Description Displays a movie in database
func (*MovieApi) HealthCheck ¶
Check Health of Server HealthCheck godoc @Summary Checks Health of Server @Produce json @Success 200 @Failure 401 @Failure 400 @Router /health [get] @Description Checks Server Health While Running
func (*MovieApi) LoginMethod ¶
Authenticate godoc @Summary Generates a JWT @ID Authentication @Consume application/json @Produce json @Param user body user.User true "Login User" @Success 200 @Failure 401 @Router /auth/login [post] @Description Authenticates a user and provides a JWT to Authorize API calls
func (*MovieApi) RegisterMethod ¶
Register godoc @Summary Registers a User @Consume application/json @Produce json @Param user body user.User true "Register User" @Success 200 @Failure 401 @Router /auth/register [post] @Description Registers a User in the application