beers

package
Version: v0.0.0-...-bc4fcfc Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 7 Imported by: 4

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

Source Files

Jump to

Keyboard shortcuts

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