beers

package
v0.0.0-...-b3f917f Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBeer

func AddBeer(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

AddBeer adds a new beer to the cellar

func GetBeer

func GetBeer(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

GetBeer returns a beer from the cellar

func GetBeers

func GetBeers(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

GetBeers returns the cellar

Types

type Beer

type Beer struct {
	ID        int       `json:"id"`
	Name      string    `json:"name"`
	Brewery   string    `json:"brewery"`
	Abv       float32   `json:"abv"`
	ShortDesc string    `json:"short_description"`
	Created   time.Time `json:"created"`
}

Beer defines the properties of a beer

Jump to

Keyboard shortcuts

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