comment

package
v0.0.0-...-2fe0e47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 (repo *RepoPostgre) AddComment(filmId uint64, userId uint64, rating uint16, text string) error

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL