service

package
v0.0.0-...-4aec9fb Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: MIT Imports: 6 Imported by: 2

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.

Jump to

Keyboard shortcuts

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