Documentation ¶
Index ¶
- type BookQueries
- func (q *BookQueries) CreateBook(b *models.Book) error
- func (q *BookQueries) DeleteBook(id uuid.UUID) error
- func (q *BookQueries) GetBook(id uuid.UUID) (models.Book, error)
- func (q *BookQueries) GetBooks() ([]models.Book, error)
- func (q *BookQueries) GetBooksByAuthor(author string) ([]models.Book, error)
- func (q *BookQueries) UpdateBook(id uuid.UUID, b *models.Book) error
- type UserQueries
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookQueries ¶ added in v1.2.0
BookQueries struct for queries from Book model.
func (*BookQueries) CreateBook ¶ added in v1.2.0
func (q *BookQueries) CreateBook(b *models.Book) error
CreateBook method for creating book by given Book object.
func (*BookQueries) DeleteBook ¶ added in v1.2.0
func (q *BookQueries) DeleteBook(id uuid.UUID) error
DeleteBook method for delete book by given ID.
func (*BookQueries) GetBooks ¶ added in v1.2.0
func (q *BookQueries) GetBooks() ([]models.Book, error)
GetBooks method for getting all books.
func (*BookQueries) GetBooksByAuthor ¶ added in v1.2.0
func (q *BookQueries) GetBooksByAuthor(author string) ([]models.Book, error)
GetBooksByAuthor method for getting all books by given author.
func (*BookQueries) UpdateBook ¶ added in v1.2.0
UpdateBook method for updating book by given Book object.
type UserQueries ¶
UserQueries struct for queries from User model.
func (*UserQueries) CreateUser ¶
func (q *UserQueries) CreateUser(u *models.User) error
CreateUser query for creating a new user by given email and password hash.
func (*UserQueries) GetUserByEmail ¶ added in v1.2.0
func (q *UserQueries) GetUserByEmail(email string) (models.User, error)
GetUserByEmail query for getting one User by given Email.
func (*UserQueries) GetUserByID ¶ added in v1.2.0
GetUserByID query for getting one User by given ID.
Click to show internal directories.
Click to hide internal directories.