controllers

package
v0.0.0-...-749cb02 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Router *mux.Router
	DB     *gorm.DB
}

App the main App

func (*App) CreateBooks

func (a *App) CreateBooks(w http.ResponseWriter, r *http.Request)

CreateBooks creates a new book

func (*App) DeleteBooks

func (a *App) DeleteBooks(w http.ResponseWriter, r *http.Request)

DeleteBooks deletes a book

func (*App) GetBookByID

func (a *App) GetBookByID(w http.ResponseWriter, r *http.Request)

GetBookByID returns a single book from the id provided

func (*App) GetBooks

func (a *App) GetBooks(w http.ResponseWriter, r *http.Request)

GetBooks returns all books

func (*App) Initialize

func (a *App) Initialize(DbHost, DbPort, DbUser, DbName, DbPassword string)

Initialize initializes the server

func (*App) Runserver

func (a *App) Runserver()

Runserver starts the server

func (*App) UpdateBooks

func (a *App) UpdateBooks(w http.ResponseWriter, r *http.Request)

UpdateBooks updates a book

Jump to

Keyboard shortcuts

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