data

package
v0.0.0-...-8e7c8ee Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: MIT Imports: 18 Imported by: 0

README

Data

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func NewDB

func NewDB(c *conf.Data) (*gorm.DB, error)

func NewESClient

func NewESClient(c *conf.Elasticsearch) *elasticsearch.TypedClient

func NewRedisClient

func NewRedisClient(c *conf.Data) *redis.Client

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 .

func NewData

func NewData(db *gorm.DB, es *elasticsearch.TypedClient, r *redis.Client, logger log.Logger) (*Data, func(), error)

NewData .

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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