controllers

package
v0.0.0-...-9867eb1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct{}

func (Controller) AddBook

func (c Controller) AddBook(db *sql.DB) http.HandlerFunc

AddBook godoc @Summary Create a new book @Description Create a new book with the input paylod @Tags books @Accept json @Produce json @Param Book body object true "New Book" @Router /addBook [post]

func (Controller) GetBook

func (c Controller) GetBook(db *sql.DB) http.HandlerFunc

GetBook godoc @Summary Get a specific book based on its ID @Description Get a specific book based on its ID @Tags books @Accept json @Produce json @Param id path integer true "Book ID" @Router /book/{id} [get]

func (Controller) GetBooks

func (c Controller) GetBooks(db *sql.DB) http.HandlerFunc

GetBooks godoc @Summary Get details of all books @Description Get details of all books @Tags books @Accept json @Produce json @Router /books [get]

func (Controller) RemoveBook

func (c Controller) RemoveBook(db *sql.DB) http.HandlerFunc

RemoveBook godoc @Summary Delete book @Description Delete a book with the input paylod @Tags books @Accept json @Produce json @Param id path integer true "Book ID" @Router /removeBook/{id} [delete]

func (Controller) UpdateBook

func (c Controller) UpdateBook(db *sql.DB) http.HandlerFunc

UpdateBook godoc @Summary Update book @Description Update a new book with the input paylod @Tags books @Accept json @Produce json @Param Book body object true "Update Book" @Router /updateBook [put]

Jump to

Keyboard shortcuts

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