review

package
v0.0.0-...-37565ce Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 11 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 struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(reviewStore types.ReviewStore, orderStore types.OrderStore,
	listingStore types.ListingStore, userStore types.UserStore) *Handler

func (*Handler) RegisterRoutes

func (h *Handler) RegisterRoutes(router *mux.Router)

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(db *sql.DB) *Store

func (*Store) CreateReview

func (s *Store) CreateReview(review types.Review) error

func (*Store) DeleteReview

func (s *Store) DeleteReview(id int) error

func (*Store) GetAverageRating

func (s *Store) GetAverageRating(userId int, reviewType int) (float64, error)

func (*Store) GetReceivedReviewsByUserID

func (s *Store) GetReceivedReviewsByUserID(uid int) ([]types.ReceivedReviewReturnPayload, error)

func (*Store) GetReviewByID

func (s *Store) GetReviewByID(id int) (*types.Review, error)

func (*Store) GetSentReviewsByUserID

func (s *Store) GetSentReviewsByUserID(uid int) ([]types.SentReviewReturnPayload, error)

func (*Store) IsReviewDuplicate

func (s *Store) IsReviewDuplicate(reviewerId, revieweeId, orderId int) (bool, error)

func (*Store) ModifyReview

func (s *Store) ModifyReview(id int, content string, rating float64) error

Jump to

Keyboard shortcuts

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