Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware func(ReviewService) ReviewService
Middleware describes a service middleware.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) Middleware
LoggingMiddleware takes a logger as a dependency and returns a ReviewService Middleware.
type ReviewService ¶
type ReviewService interface { // 商家提交审核 PostReview(ctx context.Context, review model.Review) (status bool, errinfo string, data model.Review) // 查看指定id审核结果 GetReview(ctx context.Context, rid string) (status bool, errinfo string, data model.Review) // 查询所有审核结果 GetReviews(ctx context.Context) (status bool, errinfo string, data []model.Review) // 修改审核状态 PutReview(ctx context.Context, rid string, review model.Review) (status bool, errinfo string, data model.Review) }
ReviewService describes the service.
func New ¶
func New(middleware []Middleware) ReviewService
New returns a ReviewService with all of the expected middleware wired in.
func NewBasicReviewService ¶
func NewBasicReviewService() ReviewService
NewBasicReviewService returns a naive, stateless implementation of ReviewService.
Click to show internal directories.
Click to hide internal directories.