Documentation
¶
Index ¶
- Variables
- func NewDB(c *conf.Data) (*gorm.DB, error)
- func NewESClient(c *conf.Elasticsearch) *elasticsearch.TypedClient
- func NewRedisClient(c *conf.Data) *redis.Client
- func NewReviewRepo(data *Data, logger log.Logger) biz.ReviewRepo
- type Data
- type ReviewRepo
- func (r *ReviewRepo) CreateAppeal(ctx context.Context, appeal *model.ReviewAppealInfo) (int64, error)
- func (r *ReviewRepo) GetReviewByOrderID(ctx context.Context, orderID int64) ([]*model.ReviewInfo, error)
- func (r *ReviewRepo) GetReviewByReviewID(ctx context.Context, reviewID int64) (*model.ReviewInfo, error)
- func (r *ReviewRepo) ListReviewByStoreID(ctx context.Context, storeID int64, page, size int32) ([]*model.ReviewInfo, error)
- func (r *ReviewRepo) ListReviewByStoreID_old(ctx context.Context, storeID int64, page, size int32) ([]*model.ReviewInfo, error)
- func (r *ReviewRepo) OperateAppeal(ctx context.Context, appeal *model.ReviewAppealInfo) (int64, error)
- func (r *ReviewRepo) SaveReply(ctx context.Context, reply *model.ReviewReplyInfo) error
- func (r *ReviewRepo) SaveReview(ctx context.Context, rinfo *model.ReviewInfo) (*model.ReviewInfo, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewDB, NewData, NewESClient, NewReviewRepo, NewRedisClient)
ProviderSet is data providers.
Functions ¶
func NewESClient ¶
func NewESClient(c *conf.Elasticsearch) *elasticsearch.TypedClient
func NewRedisClient ¶
func NewReviewRepo ¶
func NewReviewRepo(data *Data, logger log.Logger) biz.ReviewRepo
Types ¶
type Data ¶
type Data struct {
// TODO wrapped database client
Q *query.Query
ESCli *elasticsearch.TypedClient
RedisCli *redis.Client
}
Data .
type ReviewRepo ¶
type ReviewRepo struct {
// contains filtered or unexported fields
}
func (*ReviewRepo) CreateAppeal ¶
func (r *ReviewRepo) CreateAppeal(ctx context.Context, appeal *model.ReviewAppealInfo) (int64, error)
func (*ReviewRepo) GetReviewByOrderID ¶
func (r *ReviewRepo) GetReviewByOrderID(ctx context.Context, orderID int64) ([]*model.ReviewInfo, error)
func (*ReviewRepo) GetReviewByReviewID ¶
func (r *ReviewRepo) GetReviewByReviewID(ctx context.Context, reviewID int64) (*model.ReviewInfo, error)
func (*ReviewRepo) ListReviewByStoreID ¶
func (r *ReviewRepo) ListReviewByStoreID(ctx context.Context, storeID int64, page, size int32) ([]*model.ReviewInfo, error)
func (*ReviewRepo) ListReviewByStoreID_old ¶
func (r *ReviewRepo) ListReviewByStoreID_old(ctx context.Context, storeID int64, page, size int32) ([]*model.ReviewInfo, error)
func (*ReviewRepo) OperateAppeal ¶
func (r *ReviewRepo) OperateAppeal(ctx context.Context, appeal *model.ReviewAppealInfo) (int64, error)
func (*ReviewRepo) SaveReply ¶
func (r *ReviewRepo) SaveReply(ctx context.Context, reply *model.ReviewReplyInfo) error
func (*ReviewRepo) SaveReview ¶
func (r *ReviewRepo) SaveReview(ctx context.Context, rinfo *model.ReviewInfo) (*model.ReviewInfo, error)
Click to show internal directories.
Click to hide internal directories.