service

package
v0.0.0-...-de569a9 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGoodsComments

func GetGoodsComments(id string) (common.CommentResult, error)

获取商品评论集合,使用断路器控制熔断

Types

type GoodsDetailServiceImpl

type GoodsDetailServiceImpl struct {
	// contains filtered or unexported fields
}

商品详情服务实现

func (*GoodsDetailServiceImpl) GetGoodsDetail

func (g *GoodsDetailServiceImpl) GetGoodsDetail(ctx context.Context, id string) (GoodsDetailVO, error)

获取商品详情

func (*GoodsDetailServiceImpl) InitConfig

func (g *GoodsDetailServiceImpl) InitConfig(ctx context.Context)

初始化配置

type GoodsDetailVO

type GoodsDetailVO struct {
	Id   string
	Name string
	// 评论列表
	Comments common.CommentListVO
}

商品详情视图对象

type Service

type Service interface {
	// 获取商品详情
	GetGoodsDetail(ctx context.Context, id string) (GoodsDetailVO, error)
	// 初始化配置
	InitConfig(ctx context.Context)
}

服务接口

func NewGoodsServiceImpl

func NewGoodsServiceImpl() Service

Jump to

Keyboard shortcuts

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