Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DealService ¶
type DealService interface { // Add your methods here // e.x: Foo(ctx context.Context,s string)(rs string, err error) GetUserDealByState(ctx context.Context, id string, state string) (status bool, errinfo string, data []model.Deal) GetDealByDID(ctx context.Context, id string) (status bool, errinfo string, data model.Deal) GetDealByState(ctx context.Context, state string) (status bool, errinfo string, data []model.Deal) PostAcceptDeal(ctx context.Context, deal model.Deal) (status bool, errinfo string, data model.Deal) PutDealState(ctx context.Context, deal model.Deal) (status bool, errinfo string, data *model.Deal) }
DealService describes the service.
func New ¶
func New(middleware []Middleware) DealService
New returns a DealService with all of the expected middleware wired in.
func NewBasicDealService ¶
func NewBasicDealService() DealService
NewBasicDealService returns a naive, stateless implementation of DealService.
type Middleware ¶
type Middleware func(DealService) DealService
Middleware describes a service middleware.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) Middleware
LoggingMiddleware takes a logger as a dependency and returns a DealService Middleware.
Click to show internal directories.
Click to hide internal directories.