review

package
v0.0.0-...-244d273 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TextReviewType    string = "text"
	DefaultReviewType        = "default"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ReviewModel

type ReviewModel struct {
	PK      string `json:"pk"`
	SK      string `json:"sk"`
	Rate    uint8  `json:"rate"`
	Review  string `json:"review"`
	User    string `json:"user"`
	From    string `json:"from"`
	Date    string `json:"date"`
	Session string `json:"session,omitempty"`
}

func NewReviewModel

func NewReviewModel(item map[string]*dynamodb.AttributeValue) *ReviewModel

func NewReviewModelList

func NewReviewModelList(items []map[string]*dynamodb.AttributeValue) []*ReviewModel

func (*ReviewModel) LoadCustomKeys

func (d *ReviewModel) LoadCustomKeys()

func (*ReviewModel) LoadReviewKeys

func (d *ReviewModel) LoadReviewKeys()

type ReviewRepository

type ReviewRepository interface {
	Add(review *ReviewModel) error
	Delete(key models.HashRange) error
	GetUserReviews(userId string) ([]*ReviewModel, error)
	GetBatchReviews(userIds []string) ([]*ReviewModel, error)
}

func NewRepo

func NewRepo() ReviewRepository

Directories

Path Synopsis
handlers
add

Jump to

Keyboard shortcuts

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