service

package
v0.0.0-...-681e4f9 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSecRequest

func NewSecRequest() *model.SecRequest

func SecInfoById

func SecInfoById(productId int) (map[string]interface{}, int, error)

Types

type Service

type Service interface {
	// HealthCheck check service health status
	HealthCheck() bool
	SecInfo(productId int) (date map[string]interface{})
	SecKill(req *model.SecRequest) (map[string]interface{}, int, error)
	SecInfoList() ([]map[string]interface{}, int, error)
}

Service Define a service interface

type ServiceMiddleware

type ServiceMiddleware func(Service) Service

type SkAppService

type SkAppService struct {
}

UserService implement Service interface

func (SkAppService) HealthCheck

func (s SkAppService) HealthCheck() bool

HealthCheck implement Service method 用于检查服务的健康状态,这里仅仅返回true

func (SkAppService) SecInfo

func (s SkAppService) SecInfo(productId int) (date map[string]interface{})

func (SkAppService) SecInfoList

func (s SkAppService) SecInfoList() ([]map[string]interface{}, int, error)

func (SkAppService) SecKill

func (s SkAppService) SecKill(req *model.SecRequest) (map[string]interface{}, int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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