core

package
v0.0.0-...-6f3022d Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDataNotFound = errors.New("Data not found")
)

Functions

This section is empty.

Types

type Data

type Data struct {
	ProductID     int64  `db:"product_id" json:"product_id,omitempty"`
	ReviewComment string `db:"review_commment" json:"review_comment,omitempty"`
	Rating        int    `db:"rating" json:"rating,omitempty"`
}

type ProductReview

type ProductReview interface {
	CreateProductReview(ctx context.Context, data Data) error
}

ProductReview is an interface for product review object

func NewProductReview

func NewProductReview() ProductReview

NewProduct will return Product object

type ProductReviewInput

type ProductReviewInput struct {
	ReviewID      int64  `db:"review_id" json:"review_id,omitempty"`
	ReviewComment string `db:"review_commment" json:"review_comment,omitempty"`
	Rating        int    `db:"rating" json:"rating,omitempty"`
}

Jump to

Keyboard shortcuts

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