handler

package
v0.0.0-...-976adb4 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRouter

func GetRouter(app *App) *gin.Engine

GetRouter return gin router for the full API

Types

type App

type App struct {
	BooksDatabase postgres.BooksDatabaseImpl
}

App contain data and functions to make the app works

type BooksDatabase

type BooksDatabase interface {
	GetBooks() ([]model.Book, error)
	GetBook() (model.Book, error)
	DeleteBook() (model.Book, error)
}

BooksDatabase interface contains function to call in order to get data from an "abstract" database todo move this interface in service file

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is the expected struct of an HTTP call handler

func GetBooksHandlers

func GetBooksHandlers(app *App) []Handler

GetBooksHandlers export books handlers todo remove this function

Jump to

Keyboard shortcuts

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