controllers

package
v0.0.0-...-969d1c3 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBook

func CreateBook(c *gin.Context)

POST /books Create new book

func CreateValoracion

func CreateValoracion(c *gin.Context)

POST /valoraciones Create new valoracion

func DeleteBook

func DeleteBook(c *gin.Context)

DELETE /books/:id Delete a book

func FindBook

func FindBook(c *gin.Context)

GET /books/:id Find a book

func FindBooks

func FindBooks(c *gin.Context)

GET /books Find all books

func FindMediaAsignatura

func FindMediaAsignatura(c *gin.Context)

GET /books/:id Find a book

func FindValAsignatura

func FindValAsignatura(c *gin.Context)

GET /books/:id Find a book

func FindValoraciones

func FindValoraciones(c *gin.Context)

GET /valoraciones Find all valoraciones

func UpdateBook

func UpdateBook(c *gin.Context)

PATCH /books/:id Update a book

Types

type CreateBookInput

type CreateBookInput struct {
	Title  string `json:"title" binding:"required"`
	Author string `json:"author" binding:"required"`
}

type CreateValoracionInput

type CreateValoracionInput struct {
	Asignatura string `json:"asignatura" binding:"required"`
	Valoracion int    `json:"valoracion" binding:"required"`
}

type MediaAsignaturaOutput

type MediaAsignaturaOutput struct {
	Asignatura string `json:"asignatura" binding:"required"`
	Media      int    `json:"media" binding:"required"`
}

type UpdateBookInput

type UpdateBookInput struct {
	Title  string `json:"title"`
	Author string `json:"author"`
}

Jump to

Keyboard shortcuts

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