routes

package
v0.0.0-...-cbdd806 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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

func (route *MovieApi) Add(ctx *gin.Context)

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

func (route *MovieApi) Delete(ctx *gin.Context)

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

func (route *MovieApi) GetAll(ctx *gin.Context)

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

func (route *MovieApi) GetAllUsersMethod(ctx *gin.Context)

Users godoc @Summary Displays all Users @Produce json @Success 200 @Failure 401 @Router /auth/userdisplay [get] @Description Displays all users

func (*MovieApi) GetOne

func (route *MovieApi) GetOne(ctx *gin.Context)

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

func (route *MovieApi) HealthCheck(ctx *gin.Context)

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

func (route *MovieApi) LoginMethod(ctx *gin.Context)

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

func (route *MovieApi) RegisterMethod(ctx *gin.Context)

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

func (*MovieApi) Update

func (route *MovieApi) Update(ctx *gin.Context)

UpdateMovies godoc @Security bearerAuth @Summary Updates a Movie Info @Accept json @Produce json @Param id path int true "Update Movie" @Success 200 @Failure 401 @Failure 400 @Router /movies/{id} [put] @Description Updates a movie in database

Jump to

Keyboard shortcuts

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