reviews

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 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