Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { gorm.Model Email string `json:"email"` Password string `json:"password"` Admin bool `json:"admin"` Token string `json:"token";sql:"-"` }
a struct to rep user account
func GetUser ¶
GetUser returns the information for user with id u or nil if the user does not exists. User password field, when user is found, is blank.
type Book ¶
type Review ¶
type Review struct { gorm.Model Text string `json:"text"` UserId uint `json:"user_id"` //The user that this review belongs to BookISBN string `json:"book_isbn"` //The book that this review belongs to }
func GetReviews ¶
GetReviews returns the reviews of the book associated with 'isbn' and the status code for the request Reviews are returned as a list or nil if no reviews are found.
Click to show internal directories.
Click to hide internal directories.