reviews

package
v0.0.0-...-63f3735 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBeerReview

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

AddBeerReview adds a new review for a beer

func GetBeerReviews

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

GetBeerReviews returns all reviews for a beer

Types

type Review

type Review struct {
	ID        string    `json:"id"`
	BeerID    int       `json:"beer_id"`
	FirstName string    `json:"first_name"`
	LastName  string    `json:"last_name"`
	Score     int       `json:"score"`
	Text      string    `json:"text"`
	Created   time.Time `json:"created"`
}

Review defines the properties of a beer review

Jump to

Keyboard shortcuts

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