Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct {
ID string `json:"id" bson:"_id"`
Title string `json:"title" bson:"title"`
Author string `json:"author" bson:"author"`
Synopsis string `json:"synopsis,omitempty" bson:"synopsis,omitempty"`
Links *Link `json:"links,omitempty" bson:"links,omitempty"`
History []Checkout `json:"history,omitempty" bson:"history,omitempty"`
}
A Book contains the fields that identify a book and its status.
type Checkout ¶
Checkout stores the details of when a someone has borrowed/returned a Book, as well as their review. To be deprecated
type Link ¶
type Link struct {
Self string `json:"self" bson:"self"`
Reservations string `json:"reservations" bson:"reservations"`
Reviews string `json:"reviews" bson:"reviews"`
}
Link stores the details of when a someone has borrowed/returned a Book, as well user reviews.
type Review ¶ added in v1.10.0
type Review struct {
ID string `json:"id" bson:"_id"`
User User `json:"user,omitempty" bson:"user,omitempty"`
Message string `json:"message,omitempty" bson:"message,omitempty"`
BookID string `json:"book_id" bson:"book_id"`
Links *ReviewLink `json:"links,omitempty" bson:"links,omitempty"`
LastUpdated time.Time `json:"last_updated" bson:"last_updated"`
}
A Review contains the fields that identify a review
type ReviewLink ¶ added in v1.10.0
type ReviewLink struct {
Self string `json:"self" bson:"self"`
Book string `json:"book" bson:"book"`
}
ReviewLink is the relationship between a Book and a Review
Click to show internal directories.
Click to hide internal directories.