NewBook constructs a book with the given data
(uuid, label string, usn int, deleted, dirty bool)
| 105 | |
| 106 | // NewBook constructs a book with the given data |
| 107 | func NewBook(uuid, label string, usn int, deleted, dirty bool) Book { |
| 108 | return Book{ |
| 109 | UUID: uuid, |
| 110 | Label: label, |
| 111 | USN: usn, |
| 112 | Deleted: deleted, |
| 113 | Dirty: dirty, |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | // Insert inserts a new book |
| 118 | func (b Book) Insert(db *DB) error { |
no outgoing calls