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
Click to show internal directories.
Click to hide internal directories.