Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultReviews = []Review{
{BeerID: 1, FirstName: "Joe", LastName: "Tribiani", Score: 5, Text: "This is good but this is not pizza!"},
{BeerID: 2, FirstName: "Chandler", LastName: "Bing", Score: 1, Text: "I would SO NOT drink this ever again."},
{BeerID: 1, FirstName: "Ross", LastName: "Geller", Score: 4, Text: "Drank while on a break, was pretty good!"},
{BeerID: 2, FirstName: "Phoebe", LastName: "Buffay", Score: 2, Text: "Wasn't that great, so I gave it to my smelly cat."},
{BeerID: 1, FirstName: "Monica", LastName: "Geller", Score: 5, Text: "AMAZING! Like Chandler's jokes!"},
{BeerID: 2, FirstName: "Rachel", LastName: "Green", Score: 5, Text: "So yummy, just like my beef and custard trifle."},
}
Functions ¶
This section is empty.
Types ¶
type Repository ¶
Repository provides access to the review storage.
type Review ¶
type Review struct { BeerID int `json:"beer_id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Score int `json:"score"` Text string `json:"text"` }
Review defines a beer review
type Service ¶
Service provides reviewing operations.
func NewService ¶
func NewService(r Repository) Service
NewService creates an adding service with the necessary dependencies
Click to show internal directories.
Click to hide internal directories.