Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteBook ¶
DeleteBook deletes a book from the DB by given ID
Types ¶
type Book ¶
type Book struct { gorm.Model Title string `gorm:"size:100;not null;unique" json:"title"` Author string `gorm:"not null" json:"author"` Year string `gorm:"not null" json:"year"` }
Book model
func GetBookByID ¶
GetBookByID returns a book by its ID
func (*Book) UpdateBook ¶
UpdateBook updates the provided book in the DB
Click to show internal directories.
Click to hide internal directories.