Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookList ¶
type BookList struct {
Items []BookModel `json:"items"`
}
BookList response model
func NewBookListModel ¶
NewBookListModel constructs a BookList model from a set of books
type BookModel ¶
type BookModel struct { ID string `json:"id"` Title string `json:"title"` Author string `json:"author"` PubDate string `json:"pubdate"` Rating int `json:"rating"` Status string `json:"status"` }
BookModel is a response model for a book
func NewBookModel ¶
NewBookModel is the BookModel constructor
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
ErrorResponse response model
Click to show internal directories.
Click to hide internal directories.