Documentation
¶
Index ¶
- Variables
- type Book
- type BookModel
- func (b *BookModel) Get(id int) (*Book, error)
- func (b *BookModel) Insert(title string, author string, language string, category string, isbn10 string, ...) (int, error)
- func (b *BookModel) Latest(limit int) ([]*Book, error)
- func (b *BookModel) Search(query string) ([]*Book, error)
- func (b *BookModel) SumPageCount() int
- type Result
- type User
- type UserModel
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicateEmail = errors.New("models: duplicate email")
View Source
var ErrInvalidCredentials = errors.New("models: invalid credentials")
View Source
var ErrNoRecord = errors.New("models: no matching record found")
View Source
var ErrSumPageCount = errors.New("models: error while querying page count")
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct { ID uint `json:"id"` CreatedAt sql.NullTime `json:"created_at"` UpdatedAt sql.NullTime `json:"updated_at"` DeletedAt sql.NullTime `json:"deleted_at"` Title string `json:"title"` Author string `json:"author"` Language string `json:"language"` Category string `json:"category"` ISBN10 string `json:"isbn10"` ISBN13 string `json:"isbn13"` PageCount int `json:"page_count"` Rating int `json:"rating"` Review string `json:"review"` }
Book
type BookModel ¶
func (*BookModel) SumPageCount ¶
type UserModel ¶
func (*UserModel) Authenticate ¶
Click to show internal directories.
Click to hide internal directories.