controller

package
v0.0.0-...-07dc153 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(db *gorm.DB, storage storage.Storage, enableCors bool) *Handler

func (*Handler) AddBook

func (h *Handler) AddBook(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

AddBook add a new book into database

func (*Handler) CommonMiddleware

func (h *Handler) CommonMiddleware(f http.Handler) http.Handler

func (*Handler) DeleteBook

func (h *Handler) DeleteBook(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

DeleteBook delete specified book from DB

func (*Handler) DeleteFile

func (h *Handler) DeleteFile(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*Handler) DownloadFile

func (h *Handler) DownloadFile(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*Handler) GetBook

func (h *Handler) GetBook(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

GetBook return a book having a specified bookid

func (*Handler) GetBooks

func (h *Handler) GetBooks(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

GetBooks returns list of books where next <= bookid < next+count

func (*Handler) GetMime

func (h *Handler) GetMime(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*Handler) GetMimes

func (h *Handler) GetMimes(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

func (*Handler) GetOPDSFeed

func (h *Handler) GetOPDSFeed(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*Handler) UpdateBook

func (h *Handler) UpdateBook(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

UpdateBook update book properties

func (*Handler) UploadFiles

func (h *Handler) UploadFiles(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Jump to

Keyboard shortcuts

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