api

package
v0.0.0-...-0469c04 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

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     *storm.DB
}

App is a wrapper around a storm.DB instance to allow access to DB in HTTP handlers

func (*App) AddBookGet

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

func (*App) AddBookPost

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

func (*App) AddBooksJSON

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

func (*App) DeleteBook

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

func (*App) FillSampleData

func (a *App) FillSampleData()

func (*App) Initialize

func (a *App) Initialize(dbname string)

func (*App) ListBooks

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

func (*App) ListBooksJSON

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

func (*App) ListBooksTable

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

func (*App) Run

func (a *App) Run(addr string)

func (*App) UpdateBookGet

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

func (*App) UpdateBookPost

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

Jump to

Keyboard shortcuts

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