controller

package
v0.0.0-...-8b019b1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Books

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

func NewBooks

func NewBooks(s models.BookService, r *mux.Router) *Books

func (*Books) AddBook

func (b *Books) AddBook() http.HandlerFunc

func (*Books) GetBook

func (b *Books) GetBook() http.HandlerFunc

func (*Books) GetBooks

func (b *Books) GetBooks() http.HandlerFunc

func (*Books) RemoveBook

func (b *Books) RemoveBook() http.HandlerFunc

func (*Books) UpdateBook

func (b *Books) UpdateBook() http.HandlerFunc

type WithCORS

type WithCORS struct {
	Router *mux.Router
}

func (*WithCORS) ServeHTTP

func (s *WithCORS) ServeHTTP(w http.ResponseWriter, req *http.Request)

Simple wrapper to Allow CORS for setting HTTP headers, except OPTIONS. See: http://stackoverflow.com/a/24818638/1058612.

Jump to

Keyboard shortcuts

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