review

package
v0.0.0-...-90e0d95 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	GetReviewStatistics(w http.ResponseWriter, r *http.Request)
	AddNewReview(w http.ResponseWriter, r *http.Request)
	GetReviewsForProduct(w http.ResponseWriter, r *http.Request)
	CheckReviewRights(w http.ResponseWriter, r *http.Request)
}

type Repository

type Repository interface {
	SelectStatisticsByProductId(productId uint64) (*models.ReviewStatistics, error)
	CheckReview(userId uint64, productId uint64) bool
	AddReview(userId uint64, review *models.Review) (uint64, error)
	GetCountPages(productId uint64, countOrdersOnPage int) (int, error)
	CreateSortString(sortKey, sortDirection string) (string, error)
	SelectRangeReviews(productId uint64, sortString string,
		paginator *models.PaginatorReviews) ([]*models.ViewReview, error)
}

type UseCase

type UseCase interface {
	GetStatisticsByProductId(productId uint64) (*models.ReviewStatistics, error)
	CheckReviewUserRights(userId uint64, productId uint64) error
	AddNewReviewForProduct(userId uint64, review *models.Review) error
	GetReviewsByProductId(productId uint64, paginator *models.PaginatorReviews) (*models.RangeReviews, error)
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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