Documentation ¶
Index ¶
- type ICommentRepo
- type RepoPostgre
- func (repo *RepoPostgre) AddComment(filmId uint64, userId uint64, rating uint16, text string) error
- func (repo *RepoPostgre) DeleteComment(idUser uint64, idFilm uint64) error
- func (repo *RepoPostgre) GetFilmComments(filmId uint64, first uint64, limit uint64) ([]models.CommentItem, error)
- func (repo *RepoPostgre) HasUsersComment(userId uint64, filmId uint64) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ICommentRepo ¶
type ICommentRepo interface { GetFilmComments(filmId uint64, first uint64, limit uint64) ([]models.CommentItem, error) AddComment(filmId uint64, userId uint64, rating uint16, text string) error HasUsersComment(userId uint64, filmId uint64) (bool, error) DeleteComment(idUser uint64, idFilm uint64) error }
type RepoPostgre ¶
type RepoPostgre struct {
// contains filtered or unexported fields
}
func GetCommentRepo ¶
func GetCommentRepo(config *configs.CommentCfg, lg *slog.Logger) (*RepoPostgre, error)
func (*RepoPostgre) AddComment ¶
func (*RepoPostgre) DeleteComment ¶
func (repo *RepoPostgre) DeleteComment(idUser uint64, idFilm uint64) error
func (*RepoPostgre) GetFilmComments ¶
func (repo *RepoPostgre) GetFilmComments(filmId uint64, first uint64, limit uint64) ([]models.CommentItem, error)
func (*RepoPostgre) HasUsersComment ¶
func (repo *RepoPostgre) HasUsersComment(userId uint64, filmId uint64) (bool, error)
Click to show internal directories.
Click to hide internal directories.