restbooksserver

package
v0.0.0-...-ba4ce30 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SuccessResponseFieldKey = "status"
	ErrorResponseFieldKey   = "error"
)

Variables

This section is empty.

Functions

func Book

func Book(dbBooks *model.DBBook) *model.Book

func DBBook

func DBBook(book *model.Book) *model.DBBook

func ProvideRouter

func ProvideRouter(bookService service.BooksService) *mux.Router

Types

type App

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

func NewApp

func NewApp() *App

func (*App) Shutdown

func (a *App) Shutdown()

func (*App) Start

func (a *App) Start()

type BooksHandler

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

func GetNewBooksHandler

func GetNewBooksHandler(bookService service.BooksService) *BooksHandler

func (*BooksHandler) AddOrRemoveBookHandler

func (bh *BooksHandler) AddOrRemoveBookHandler(w http.ResponseWriter, r *http.Request)

func (*BooksHandler) BooksHandler

func (bh *BooksHandler) BooksHandler(w http.ResponseWriter, r *http.Request)

func (*BooksHandler) UpsertBookHandler

func (bh *BooksHandler) UpsertBookHandler(w http.ResponseWriter, r *http.Request)

type Mapper

type Mapper interface {
	DBBook(*model.Book) *model.DBBook
	Book(*model.DBBook) *model.Book
}

Jump to

Keyboard shortcuts

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