订单服务初始化

master
shenzhuan 2 years ago
parent 9a7235f41d
commit 0f5f0e4aa6

@ -5,20 +5,17 @@ import (
"fmt" "fmt"
"github.com/afex/hystrix-go/hystrix" "github.com/afex/hystrix-go/hystrix"
consul "github.com/asim/go-micro/plugins/registry/consul/v4" consul "github.com/asim/go-micro/plugins/registry/consul/v4"
"github.com/dtm-labs/dtm/client/dtmcli"
"github.com/go-micro/plugins/v4/wrapper/select/roundrobin" "github.com/go-micro/plugins/v4/wrapper/select/roundrobin"
opentracing2 "github.com/go-micro/plugins/v4/wrapper/trace/opentracing" opentracing2 "github.com/go-micro/plugins/v4/wrapper/trace/opentracing"
"github.com/lithammer/shortuuid/v3"
"github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go"
"go-micro.dev/v4/client" "go-micro.dev/v4/client"
"go-micro.dev/v4/web" "go-micro.dev/v4/web"
//"goproduct/common" //"goproduct/common"
common "git.mashibing.com/msb_47094/shopping-comm" common "git.mashibing.com/msb_47094/shopping-comm"
"goproduct/proto"
"log" "log"
"net" "net"
"net/http" "net/http"
"strconv" "trade-order/proto"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go-micro.dev/v4" "go-micro.dev/v4"
@ -30,11 +27,11 @@ func main() {
const ( const (
//DTM 服务地址 //DTM 服务地址
DtmServer = "http://192.168.100.131:36789/api/dtmsvr" DtmServer = "http://192.168.100.131:36789/api/dtmsvr"
QSBusi = "http://192.168.1.135:6668" //注意 QSBusi = "http://192.168.1.135:6669" //注意
) )
var CartId int32 = 1 //var CartId int32 = 1
var Number int32 = 1 //var Number int32 = 1
resp := &proto.AddCartResp{} resp := &proto.AddTradeOrderResp{}
router := gin.Default() router := gin.Default()
@ -54,7 +51,7 @@ func main() {
hystrixStreamHandler := hystrix.NewStreamHandler() hystrixStreamHandler := hystrix.NewStreamHandler()
hystrixStreamHandler.Start() hystrixStreamHandler.Start()
go func() { go func() {
err := http.ListenAndServe(net.JoinHostPort("192.168.100.1", "9096"), hystrixStreamHandler) err := http.ListenAndServe(net.JoinHostPort("192.168.100.1", "9097"), hystrixStreamHandler)
if err != nil { if err != nil {
log.Panic(err) log.Panic(err)
} }
@ -69,142 +66,52 @@ func main() {
//负载均衡 //负载均衡
micro.WrapClient(roundrobin.NewClientWrapper()), micro.WrapClient(roundrobin.NewClientWrapper()),
) )
AddCartClient := proto.NewAddCartService("shop-cart", rpcServer.Client()) //AddCartClient := proto.NewAddCartService("shop-cart", rpcServer.Client())
UpdateCartClient := proto.NewUpdateCartService("shop-cart", rpcServer.Client()) //UpdateCartClient := proto.NewUpdateCartService("shop-cart", rpcServer.Client())
ShowProductDetailClient := proto.NewShowProductDetailService("shop-product", rpcServer.Client()) //ShowProductDetailClient := proto.NewShowProductDetailService("shop-product", rpcServer.Client())
ShowDetailSkuClient := proto.NewShowDetailSkuService("shop-product", rpcServer.Client()) //ShowDetailSkuClient := proto.NewShowDetailSkuService("shop-product", rpcServer.Client())
GetUserTokenClient := proto.NewGetUserTokenService("shop-user", rpcServer.Client()) //GetUserTokenClient := proto.NewGetUserTokenService("shop-user", rpcServer.Client())
UpdateSkuClient := proto.NewUpdateSkuService("shop-product", rpcServer.Client()) //UpdateSkuClient := proto.NewUpdateSkuService("shop-product", rpcServer.Client())
AddTraderClient := proto.NewAddTradeOrderService("trade-order", rpcServer.Client())
//添加购物车 //UpdateTraderClient := proto.NewUpdateTradeOrderService("trade-order", rpcServer.Client())
router.GET("/increase", func(c *gin.Context) {
number, _ := strconv.Atoi(c.Request.FormValue("number"))
productId, _ := strconv.Atoi(c.Request.FormValue("productId"))
productSkuId, _ := strconv.Atoi(c.Request.FormValue("productSkuId"))
uuid := c.Request.Header["Uuid"][0]
cc := common.GetInput(uuid)
out := common.SQ(cc)
sum := 0
for o := range out {
sum += o
}
//Token校验
//拼接请求信息
tokenReq := &proto.TokenReq{
Uuid: uuid,
}
//响应
tokenResp, err := GetUserTokenClient.GetUserToken(context.TODO(), tokenReq)
//拼接请求信息
respErr := &proto.AddCartResp{}
if err != nil || tokenResp.IsLogin == false {
log.Println("GetUserToken err : ", err)
common.RespFail(c.Writer, respErr, "未登录!")
return
}
log.Println("GetUserToken success : ", tokenResp)
//拼接请求信息
req := &proto.AddCartReq{
Number: int32(number),
ProductId: int32(productId),
ProductSkuId: int32(productSkuId),
UserId: int32(sum),
}
resp := &proto.AddCartResp{}
//商品详情
reqDetail := &proto.ProductDetailReq{
Id: int32(productId),
}
respDetail, err := ShowProductDetailClient.ShowProductDetail(context.TODO(), reqDetail)
if err != nil {
log.Println("ShowProductDetail err : ", err)
common.RespFail(c.Writer, respErr, "查询商品详情失败!")
return
}
if respDetail != nil {
req.ProductName = respDetail.ProductDetail[0].Name
req.ProductMainPicture = respDetail.ProductDetail[0].MainPicture
}
//log.Println(" /ShowProductDetail resp :", respDetail)
//SKU详情
reqDetail.Id = req.ProductSkuId
respSkuDetail, err := ShowDetailSkuClient.ShowDetailSku(context.TODO(), reqDetail)
//log.Println(" /ShowDetailSku resp :", respSkuDetail)
//添加购物车 远程调用服务
//log.Println(" /AddCart req :", req)
if respSkuDetail.ProductSku[0].Stock < req.Number {
common.RespFail(c.Writer, &proto.AddCartResp{}, "库存不足,添加失败")
return
}
sku := respSkuDetail.ProductSku[0]
sku.Stock -= req.Number
updateSkuReq := &proto.UpdateSkuReq{
ProductSku: sku,
}
respUpdate, err := UpdateSkuClient.UpdateSku(context.TODO(), updateSkuReq)
if err != nil {
log.Println(" /UpdateSku err :", err)
common.RespFail(c.Writer, resp, "修改库存失败!")
return
}
log.Println(" /UpdateSkuClient resp :", respUpdate.IsSuccess)
//开始增加购物车
resp, err = AddCartClient.AddCart(context.TODO(), req)
//根据响应做输出
if err != nil {
log.Println("addCart err ", err)
updateSkuReq.ProductSku.Stock += req.Number
_, err = UpdateSkuClient.UpdateSku(context.TODO(), updateSkuReq)
log.Println("rollback sku is Err :", err)
common.RespFail(c.Writer, resp, "添加购物车失败!")
return
}
resp.ProductSkuSimple = respSkuDetail.ProductSku[0]
resp.ProductSimple = respDetail.ProductDetail[0]
log.Println(" /AddCart resp :", resp)
////writer data message row total field
common.RespOK(c.Writer, resp, "请求成功")
})
//开始拆分 DTM服务 //开始拆分 DTM服务
// //
router.POST("/updateSku", func(c *gin.Context) { //router.POST("/updateSku", func(c *gin.Context) {
req := &proto.UpdateSkuReq{} // req := &proto.UpdateSkuReq{}
if err := c.BindJSON(req); err != nil { // if err := c.BindJSON(req); err != nil {
log.Fatalln(err) // log.Fatalln(err)
} // }
_, err := UpdateSkuClient.UpdateSku(context.TODO(), req) // _, err := UpdateSkuClient.UpdateSku(context.TODO(), req)
if err != nil { // if err != nil {
log.Println("/updateSku err ", err) // log.Println("/updateSku err ", err)
c.JSON(http.StatusOK, gin.H{"dtm_reslut": "FAILURE", "Message": "修改库存失败!"}) // c.JSON(http.StatusOK, gin.H{"dtm_reslut": "FAILURE", "Message": "修改库存失败!"})
return // return
} // }
c.JSON(http.StatusOK, gin.H{"updateSku": "SUCCESS", "Message": "修改库存成功!"}) // c.JSON(http.StatusOK, gin.H{"updateSku": "SUCCESS", "Message": "修改库存成功!"})
}) //})
router.POST("/updateSku-compensate", func(c *gin.Context) { //router.POST("/updateSku-compensate", func(c *gin.Context) {
req := &proto.UpdateSkuReq{} // req := &proto.UpdateSkuReq{}
// if err := c.BindJSON(req); err != nil {
// log.Fatalln(err)
// }
// req.ProductSku.Stock += Number
// _, err := UpdateSkuClient.UpdateSku(context.TODO(), req)
// if err != nil {
// log.Println("/updateSku err ", err)
// c.JSON(http.StatusOK, gin.H{"dtm_reslut": "FAILURE", "Message": "回滚库存失败!"})
// return
// }
// c.JSON(http.StatusOK, gin.H{"updateSku-compensate": "SUCCESS", "Message": "回滚库存成功!"})
//})
router.POST("/cartAdvanceOrder", func(c *gin.Context) {
req := &proto.AddTradeOrderReq{}
if err := c.BindJSON(req); err != nil { if err := c.BindJSON(req); err != nil {
log.Fatalln(err) log.Fatalln(err)
} }
req.ProductSku.Stock += Number resp, err = AddTraderClient.AddTradeOrder(context.TODO(), req)
_, err := UpdateSkuClient.UpdateSku(context.TODO(), req) fmt.Println(resp)
if err != nil { //CartId = resp.ID
log.Println("/updateSku err ", err)
c.JSON(http.StatusOK, gin.H{"dtm_reslut": "FAILURE", "Message": "回滚库存失败!"})
return
}
c.JSON(http.StatusOK, gin.H{"updateSku-compensate": "SUCCESS", "Message": "回滚库存成功!"})
})
router.POST("/addCart", func(c *gin.Context) {
req := &proto.AddCartReq{}
if err := c.BindJSON(req); err != nil {
log.Fatalln(err)
}
resp, err = AddCartClient.AddCart(context.TODO(), req)
CartId = resp.ID
//测试异常 //测试异常
//err = errors.New("400", "测试异常", 400) //err = errors.New("400", "测试异常", 400)
if err != nil { if err != nil {
@ -215,111 +122,111 @@ func main() {
c.JSON(http.StatusOK, gin.H{"addCart": "SUCCESS", "Message": "新增购物车成功!"}) c.JSON(http.StatusOK, gin.H{"addCart": "SUCCESS", "Message": "新增购物车成功!"})
}) })
router.POST("/addCart-compensate", func(c *gin.Context) { //router.POST("/addCart-compensate", func(c *gin.Context) {
req := &proto.AddCartReq{} // req := &proto.AddCartReq{}
if err := c.BindJSON(req); err != nil { // if err := c.BindJSON(req); err != nil {
log.Fatalln(err) // log.Fatalln(err)
} // }
req.Id = CartId // req.Id = CartId
resp, err = UpdateCartClient.UpdateCart(context.TODO(), req) // resp, err = UpdateCartClient.UpdateCart(context.TODO(), req)
CartId = resp.ID // CartId = resp.ID
if err != nil { // if err != nil {
log.Println("/addCart-compensate err ", err) // log.Println("/addCart-compensate err ", err)
c.JSON(http.StatusOK, gin.H{"dtm_reslut": "FAILURE", "Message": "删除购物车失败!"}) // c.JSON(http.StatusOK, gin.H{"dtm_reslut": "FAILURE", "Message": "删除购物车失败!"})
return // return
} // }
c.JSON(http.StatusOK, gin.H{"addCart-compensate": "SUCCESS", "Message": "删除购物车成功!"}) // c.JSON(http.StatusOK, gin.H{"addCart-compensate": "SUCCESS", "Message": "删除购物车成功!"})
}) //})
//
router.GET("/addShoppingCart", func(c *gin.Context) { //router.GET("/addShoppingCart", func(c *gin.Context) {
number, _ := strconv.Atoi(c.Request.FormValue("number")) // number, _ := strconv.Atoi(c.Request.FormValue("number"))
productId, _ := strconv.Atoi(c.Request.FormValue("productId")) // productId, _ := strconv.Atoi(c.Request.FormValue("productId"))
productSkuId, _ := strconv.Atoi(c.Request.FormValue("productSkuId")) // productSkuId, _ := strconv.Atoi(c.Request.FormValue("productSkuId"))
uuid := c.Request.Header["Uuid"][0] // uuid := c.Request.Header["Uuid"][0]
cc := common.GetInput(uuid) // cc := common.GetInput(uuid)
out := common.SQ(cc) // out := common.SQ(cc)
sum := 0 // sum := 0
for o := range out { // for o := range out {
sum += o // sum += o
} // }
//Token校验 // //Token校验
//拼接请求信息 // //拼接请求信息
tokenReq := &proto.TokenReq{ // tokenReq := &proto.TokenReq{
Uuid: uuid, // Uuid: uuid,
} // }
//响应 // //响应
tokenResp, err := GetUserTokenClient.GetUserToken(context.TODO(), tokenReq) // tokenResp, err := GetUserTokenClient.GetUserToken(context.TODO(), tokenReq)
//拼接请求信息 // //拼接请求信息
respErr := &proto.AddCartResp{} // respErr := &proto.AddCartResp{}
if err != nil || tokenResp.IsLogin == false { // if err != nil || tokenResp.IsLogin == false {
log.Println("GetUserToken err : ", err) // log.Println("GetUserToken err : ", err)
common.RespFail(c.Writer, respErr, "未登录!") // common.RespFail(c.Writer, respErr, "未登录!")
return // return
} // }
log.Println("GetUserToken success : ", tokenResp) // log.Println("GetUserToken success : ", tokenResp)
//
//拼接请求信息 // //拼接请求信息
req := &proto.AddCartReq{ // req := &proto.AddCartReq{
Number: int32(number), // Number: int32(number),
ProductId: int32(productId), // ProductId: int32(productId),
ProductSkuId: int32(productSkuId), // ProductSkuId: int32(productSkuId),
UserId: int32(sum), // UserId: int32(sum),
} // }
resp := &proto.AddCartResp{} // resp := &proto.AddCartResp{}
//商品详情 // //商品详情
reqDetail := &proto.ProductDetailReq{ // reqDetail := &proto.ProductDetailReq{
Id: int32(productId), // Id: int32(productId),
} // }
respDetail, err := ShowProductDetailClient.ShowProductDetail(context.TODO(), reqDetail) // respDetail, err := ShowProductDetailClient.ShowProductDetail(context.TODO(), reqDetail)
if err != nil { // if err != nil {
log.Println("ShowProductDetail err : ", err) // log.Println("ShowProductDetail err : ", err)
common.RespFail(c.Writer, respErr, "查询商品详情失败!") // common.RespFail(c.Writer, respErr, "查询商品详情失败!")
return // return
} // }
if respDetail != nil { // if respDetail != nil {
req.ProductName = respDetail.ProductDetail[0].Name // req.ProductName = respDetail.ProductDetail[0].Name
req.ProductMainPicture = respDetail.ProductDetail[0].MainPicture // req.ProductMainPicture = respDetail.ProductDetail[0].MainPicture
} // }
//
//log.Println(" /ShowProductDetail resp :", respDetail) // //log.Println(" /ShowProductDetail resp :", respDetail)
//SKU详情 // //SKU详情
reqDetail.Id = req.ProductSkuId // reqDetail.Id = req.ProductSkuId
respSkuDetail, err := ShowDetailSkuClient.ShowDetailSku(context.TODO(), reqDetail) // respSkuDetail, err := ShowDetailSkuClient.ShowDetailSku(context.TODO(), reqDetail)
//log.Println(" /ShowDetailSku resp :", respSkuDetail) // //log.Println(" /ShowDetailSku resp :", respSkuDetail)
//添加购物车 远程调用服务 // //添加购物车 远程调用服务
//log.Println(" /AddCart req :", req) // //log.Println(" /AddCart req :", req)
//
if respSkuDetail.ProductSku[0].Stock < req.Number { // if respSkuDetail.ProductSku[0].Stock < req.Number {
common.RespFail(c.Writer, &proto.AddCartResp{}, "库存不足,添加失败") // common.RespFail(c.Writer, &proto.AddCartResp{}, "库存不足,添加失败")
return // return
} // }
sku := respSkuDetail.ProductSku[0] // sku := respSkuDetail.ProductSku[0]
sku.Stock -= req.Number // sku.Stock -= req.Number
Number = req.Number // // Number = req.Number //
updateSkuReq := &proto.UpdateSkuReq{ // updateSkuReq := &proto.UpdateSkuReq{
ProductSku: sku, // ProductSku: sku,
} // }
resp.ProductSkuSimple = respSkuDetail.ProductSku[0] // resp.ProductSkuSimple = respSkuDetail.ProductSku[0]
resp.ProductSimple = respDetail.ProductDetail[0] // resp.ProductSimple = respDetail.ProductDetail[0]
//
//全局事务 // //全局事务
gid := shortuuid.New() // gid := shortuuid.New()
saga := dtmcli.NewSaga(DtmServer, gid). // saga := dtmcli.NewSaga(DtmServer, gid).
Add(QSBusi+"/updateSku", QSBusi+"/updateSku-compensate", updateSkuReq). // Add(QSBusi+"/updateSku", QSBusi+"/updateSku-compensate", updateSkuReq).
Add(QSBusi+"/addCart", QSBusi+"/addCart-compensate", req) // Add(QSBusi+"/addCart", QSBusi+"/addCart-compensate", req)
err = saga.Submit() // err = saga.Submit()
if err != nil { // if err != nil {
log.Println("saga submit err :", err) // log.Println("saga submit err :", err)
common.RespFail(c.Writer, resp, "添加失败") // common.RespFail(c.Writer, resp, "添加失败")
} // }
log.Println(" /saga submit submit :", gid) // log.Println(" /saga submit submit :", gid)
////writer data message row total field // ////writer data message row total field
common.RespOK(c.Writer, resp, "请求成功") // common.RespOK(c.Writer, resp, "请求成功")
}) //})
service := web.NewService( service := web.NewService(
web.Address(":6668"), web.Address(":6669"),
web.Name("shop-cart-client"), web.Name("trade-order-client"),
web.Registry(consulReg), web.Registry(consulReg),
web.Handler(router), web.Handler(router),
) )

@ -2,9 +2,9 @@ package repository
import ( import (
"fmt" "fmt"
"goproduct/domain/model"
"goproduct/proto"
"time" "time"
"trade-order/domain/model"
"trade-order/proto"
"gorm.io/gorm" "gorm.io/gorm"
) )
@ -16,50 +16,35 @@ import (
string verificationCode = 4; string verificationCode = 4;
**/ **/
//接口 //接口
type ICartRepository interface { type ITradeRepository interface {
AddCart(*proto.AddCartReq) (*model.ShoppingCart, error) AddTradeOrder(req *proto.AddTradeOrderReq) (*model.TraderOrder, error)
UpdateCart(*proto.AddCartReq) (*model.ShoppingCart, error) UpdateTradeOrder(req *proto.AddTradeOrderReq) (*model.TraderOrder, error)
} }
// 创建实例 // 创建实例
func NewCartRepository(db *gorm.DB) ICartRepository { func NewTradeRepository(db *gorm.DB) ITradeRepository {
return &CartRepository{mysqlDB: db} return &TradeRepository{mysqlDB: db}
} }
// 数据DB // 数据DB
type CartRepository struct { type TradeRepository struct {
mysqlDB *gorm.DB mysqlDB *gorm.DB
} }
func (u *CartRepository) AddCart(req *proto.AddCartReq) (obj *model.ShoppingCart, err error) { func (u *TradeRepository) AddTradeOrder(req *proto.AddTradeOrderReq) (obj *model.TraderOrder, err error) {
cart := model.ShoppingCart{ trade := model.TraderOrder{}
Number: req.Number, trade.CreateTime = time.Now() //
ProductId: req.ProductId, tb := u.mysqlDB.Create(&trade)
ProductSkuId: req.ProductSkuId,
ProductName: req.ProductName,
ProductMainPicture: req.ProductMainPicture,
UserId: req.UserId,
}
cart.CreateTime = time.Now() //
tb := u.mysqlDB.Create(&cart)
//err = errors.New("400", "测试异常", 400) //err = errors.New("400", "测试异常", 400)
fmt.Println("repository AddCart >>>> ", cart) fmt.Println("repository AddTradeOrder >>>> ", trade)
return &cart, tb.Error //err return &trade, tb.Error //err
} }
func (u *CartRepository) UpdateCart(req *proto.AddCartReq) (obj *model.ShoppingCart, err error) { func (u *TradeRepository) UpdateTradeOrder(req *proto.AddTradeOrderReq) (obj *model.TraderOrder, err error) {
cart := model.ShoppingCart{ trade := model.TraderOrder{}
Number: req.Number, trade.UpdateTime = time.Now() //
ProductId: req.ProductId, tb := u.mysqlDB.Model(&model.TraderOrder{}).Where("id = ?", trade.ID).Update("order_status", trade.OrderStatus)
ProductSkuId: req.ProductSkuId,
ProductName: req.ProductName,
ProductMainPicture: req.ProductMainPicture,
UserId: req.UserId,
ID: req.Id,
}
cart.UpdateTime = time.Now() //
tb := u.mysqlDB.Model(&model.ShoppingCart{}).Where("id = ?", cart.ID).Update("is_deleted", 1)
//err = errors.New("400", "测试异常", 400) //err = errors.New("400", "测试异常", 400)
fmt.Println("repository UpdateCart >>>> ", cart) fmt.Println("repository UpdateTradeOrder >>>> ", trade)
return &cart, tb.Error //err return &trade, tb.Error //err
} }

@ -1,21 +1,21 @@
package service package service
import ( import (
"goproduct/domain/model" "trade-order/domain/model"
"goproduct/domain/repository" "trade-order/domain/repository"
"goproduct/proto" "trade-order/proto"
) )
type ICartService interface { type ITradeOrderService interface {
AddCart(*proto.AddCartReq) (obj *model.ShoppingCart, err error) AddTradeOrder(req *proto.AddTradeOrderReq) (obj *model.TraderOrder, err error)
UpdateCart(*proto.AddCartReq) (obj *model.ShoppingCart, err error) UpdateTradeOrder(req *proto.AddTradeOrderReq) (obj *model.TraderOrder, err error)
} }
type CartService struct { type TradeOrderService struct {
cartRepository repository.ICartRepository tradeRepository repository.ITradeRepository
} }
func NewCartService(cartRepository repository.ICartRepository) ICartService { func NewTradeOrderService(cartRepository repository.ITradeRepository) ITradeOrderService {
return &CartService{cartRepository: cartRepository} return &TradeOrderService{tradeRepository: cartRepository}
} }
// "number": 0, // "number": 0,
@ -24,9 +24,9 @@ func NewCartService(cartRepository repository.ICartRepository) ICartService {
// "productSkuId": 0 // "productSkuId": 0
// //
// 重写接口方法 // 重写接口方法
func (u *CartService) AddCart(req *proto.AddCartReq) (obj *model.ShoppingCart, err error) { func (u *TradeOrderService) AddTradeOrder(req *proto.AddTradeOrderReq) (obj *model.TraderOrder, err error) {
return u.cartRepository.AddCart(req) return u.tradeRepository.AddTradeOrder(req)
} }
func (u *CartService) UpdateCart(req *proto.AddCartReq) (obj *model.ShoppingCart, err error) { func (u *TradeOrderService) UpdateTradeOrder(req *proto.AddTradeOrderReq) (obj *model.TraderOrder, err error) {
return u.cartRepository.UpdateCart(req) return u.tradeRepository.AddTradeOrder(req)
} }

@ -3,41 +3,35 @@ package handler
import ( import (
"context" "context"
"fmt" "fmt"
"goproduct/domain/service" "trade-order/domain/service"
"goproduct/proto" "trade-order/proto"
) )
type CartHandler struct { type TradeOrderHandler struct {
CartService service.ICartService TradeOrderService service.ITradeOrderService
} }
// 新增购物车 // 新增购物车
func (u *CartHandler) AddCart(ctx context.Context, req *proto.AddCartReq, resp *proto.AddCartResp) error { func (u *TradeOrderHandler) AddTradeOrder(ctx context.Context, req *proto.AddTradeOrderReq, resp *proto.AddTradeOrderResp) error {
obj, err := u.CartService.AddCart(req) obj, err := u.TradeOrderService.AddTradeOrder(req)
if err != nil { if err != nil {
println(" AddCart err :", err) println(" AddTradeOrder err :", err)
} else { } else {
resp.CanSetShoppingCartNumber = int64(obj.Number) fmt.Println(obj.UpdateTime)
resp.ShoppingCartNumber = int64(obj.Number) fmt.Println(" AddTradeOrder handler >>>>>> ", resp)
resp.IsBeyondMaxLimit = false // 查询sku
resp.ID = obj.ID //增加新增cart的ID
fmt.Println(" AddCart handler >>>>>> ", resp)
} }
return err return err
} }
//修改购物车 //修改购物车
func (u *CartHandler) UpdateCart(ctx context.Context, req *proto.AddCartReq, resp *proto.AddCartResp) error { func (u *TradeOrderHandler) UpdateTradeOrder(ctx context.Context, req *proto.AddTradeOrderReq, resp *proto.AddTradeOrderResp) error {
obj, err := u.CartService.UpdateCart(req) obj, err := u.TradeOrderService.UpdateTradeOrder(req)
if err != nil { if err != nil {
println(" UpdateCart err :", err) println(" UpdateTradeOrder err :", err)
} else { } else {
resp.CanSetShoppingCartNumber = int64(obj.Number) fmt.Println(obj.UpdateTime)
resp.ShoppingCartNumber = int64(obj.Number) fmt.Println(" UpdateTradeOrder handler >>>>>> ", resp)
resp.IsBeyondMaxLimit = false // 查询sku
resp.ID = obj.ID //增加新增cart的ID
fmt.Println(" UpdateCart handler >>>>>> ", resp)
} }
return err return err
} }

@ -8,18 +8,18 @@ import (
"github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go"
"go-micro.dev/v4" "go-micro.dev/v4"
"go-micro.dev/v4/registry" "go-micro.dev/v4/registry"
"goproduct/domain/repository"
"goproduct/domain/service"
"goproduct/handler"
"goproduct/proto"
"log" "log"
"time" "time"
"trade-order/domain/repository"
"trade-order/domain/service"
"trade-order/handler"
"trade-order/proto"
) )
const ( const (
consulStr = "http://192.168.100.131:8500" consulStr = "http://192.168.100.131:8500"
consulReistStr = "192.168.100.131:8500" consulReistStr = "192.168.100.131:8500"
fileKey = "mysql-product" fileKey = "mysql-trade"
QPS = 100 QPS = 100
) )
@ -34,7 +34,7 @@ func main() {
options.Addrs = []string{consulReistStr} options.Addrs = []string{consulReistStr}
}) })
//链路追踪实列化 注意addr是 jaeper地址 端口号6831 //链路追踪实列化 注意addr是 jaeper地址 端口号6831
t, io, err := common.NewTracer("shop-cart", "192.168.100.131:6831") t, io, err := common.NewTracer("trade-order", "192.168.100.131:6831")
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
@ -45,8 +45,8 @@ func main() {
repcService := micro.NewService( repcService := micro.NewService(
micro.RegisterTTL(time.Second*30), micro.RegisterTTL(time.Second*30),
micro.RegisterInterval(time.Second*30), micro.RegisterInterval(time.Second*30),
micro.Name("shop-cart"), micro.Name("trade-order"),
micro.Address(":8084"), micro.Address(":8085"),
micro.Version("v1"), micro.Version("v1"),
micro.Registry(consulReist), micro.Registry(consulReist),
//链路追踪 //链路追踪
@ -57,11 +57,11 @@ func main() {
//2.初始化db //2.初始化db
db, _ := common.GetMysqlFromConsul(consulConfig) db, _ := common.GetMysqlFromConsul(consulConfig)
//3.创建服务实例 //3.创建服务实例
cartService := service.NewCartService(repository.NewCartRepository(db)) tradeService := service.NewTradeOrderService(repository.NewTradeRepository(db))
//4.注册handler //4.注册handler
proto.RegisterAddCartHandler(repcService.Server(), &handler.CartHandler{cartService}) proto.RegisterAddTradeOrderHandler(repcService.Server(), &handler.TradeOrderHandler{tradeService})
//4.注册handler //4.注册handler
proto.RegisterUpdateCartHandler(repcService.Server(), &handler.CartHandler{cartService}) proto.RegisterUpdateTradeOrderHandler(repcService.Server(), &handler.TradeOrderHandler{tradeService})
//5.启动服务 //5.启动服务
if err := repcService.Run(); err != nil { if err := repcService.Run(); err != nil {

@ -36,7 +36,7 @@ const (
// UpdateUser int32 `json:"updateUser"` // UpdateUser int32 `json:"updateUser"`
// UpdateTime time.Time `json:"updateTime"` // UpdateTime time.Time `json:"updateTime"`
// IsDeleted bool `json:"isDeleted"` // IsDeleted bool `json:"isDeleted"`
type TraderOrder struct { type TradeOrder struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
@ -50,8 +50,8 @@ type TraderOrder struct {
Number int32 `protobuf:"varint,7,opt,name=number,proto3" json:"number,omitempty"` Number int32 `protobuf:"varint,7,opt,name=number,proto3" json:"number,omitempty"`
} }
func (x *TraderOrder) Reset() { func (x *TradeOrder) Reset() {
*x = TraderOrder{} *x = TradeOrder{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_trade_proto_msgTypes[0] mi := &file_trade_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -59,13 +59,13 @@ func (x *TraderOrder) Reset() {
} }
} }
func (x *TraderOrder) String() string { func (x *TradeOrder) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*TraderOrder) ProtoMessage() {} func (*TradeOrder) ProtoMessage() {}
func (x *TraderOrder) ProtoReflect() protoreflect.Message { func (x *TradeOrder) ProtoReflect() protoreflect.Message {
mi := &file_trade_proto_msgTypes[0] mi := &file_trade_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -77,54 +77,54 @@ func (x *TraderOrder) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use TraderOrder.ProtoReflect.Descriptor instead. // Deprecated: Use TradeOrder.ProtoReflect.Descriptor instead.
func (*TraderOrder) Descriptor() ([]byte, []int) { func (*TradeOrder) Descriptor() ([]byte, []int) {
return file_trade_proto_rawDescGZIP(), []int{0} return file_trade_proto_rawDescGZIP(), []int{0}
} }
func (x *TraderOrder) GetId() int32 { func (x *TradeOrder) GetId() int32 {
if x != nil { if x != nil {
return x.Id return x.Id
} }
return 0 return 0
} }
func (x *TraderOrder) GetUserId() int32 { func (x *TradeOrder) GetUserId() int32 {
if x != nil { if x != nil {
return x.UserId return x.UserId
} }
return 0 return 0
} }
func (x *TraderOrder) GetProductId() int32 { func (x *TradeOrder) GetProductId() int32 {
if x != nil { if x != nil {
return x.ProductId return x.ProductId
} }
return 0 return 0
} }
func (x *TraderOrder) GetProductSkuId() int32 { func (x *TradeOrder) GetProductSkuId() int32 {
if x != nil { if x != nil {
return x.ProductSkuId return x.ProductSkuId
} }
return 0 return 0
} }
func (x *TraderOrder) GetProductName() string { func (x *TradeOrder) GetProductName() string {
if x != nil { if x != nil {
return x.ProductName return x.ProductName
} }
return "" return ""
} }
func (x *TraderOrder) GetProductMainPicture() string { func (x *TradeOrder) GetProductMainPicture() string {
if x != nil { if x != nil {
return x.ProductMainPicture return x.ProductMainPicture
} }
return "" return ""
} }
func (x *TraderOrder) GetNumber() int32 { func (x *TradeOrder) GetNumber() int32 {
if x != nil { if x != nil {
return x.Number return x.Number
} }
@ -132,7 +132,7 @@ func (x *TraderOrder) GetNumber() int32 {
} }
// 请求 request struct // 请求 request struct
type AddTraderOrderReq struct { type AddTradeOrderReq struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
@ -146,8 +146,8 @@ type AddTraderOrderReq struct {
Id int32 `protobuf:"varint,7,opt,name=id,proto3" json:"id,omitempty"` Id int32 `protobuf:"varint,7,opt,name=id,proto3" json:"id,omitempty"`
} }
func (x *AddTraderOrderReq) Reset() { func (x *AddTradeOrderReq) Reset() {
*x = AddTraderOrderReq{} *x = AddTradeOrderReq{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_trade_proto_msgTypes[1] mi := &file_trade_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -155,13 +155,13 @@ func (x *AddTraderOrderReq) Reset() {
} }
} }
func (x *AddTraderOrderReq) String() string { func (x *AddTradeOrderReq) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*AddTraderOrderReq) ProtoMessage() {} func (*AddTradeOrderReq) ProtoMessage() {}
func (x *AddTraderOrderReq) ProtoReflect() protoreflect.Message { func (x *AddTradeOrderReq) ProtoReflect() protoreflect.Message {
mi := &file_trade_proto_msgTypes[1] mi := &file_trade_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -173,61 +173,61 @@ func (x *AddTraderOrderReq) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use AddTraderOrderReq.ProtoReflect.Descriptor instead. // Deprecated: Use AddTradeOrderReq.ProtoReflect.Descriptor instead.
func (*AddTraderOrderReq) Descriptor() ([]byte, []int) { func (*AddTradeOrderReq) Descriptor() ([]byte, []int) {
return file_trade_proto_rawDescGZIP(), []int{1} return file_trade_proto_rawDescGZIP(), []int{1}
} }
func (x *AddTraderOrderReq) GetNumber() int32 { func (x *AddTradeOrderReq) GetNumber() int32 {
if x != nil { if x != nil {
return x.Number return x.Number
} }
return 0 return 0
} }
func (x *AddTraderOrderReq) GetProductId() int32 { func (x *AddTradeOrderReq) GetProductId() int32 {
if x != nil { if x != nil {
return x.ProductId return x.ProductId
} }
return 0 return 0
} }
func (x *AddTraderOrderReq) GetProductSkuId() int32 { func (x *AddTradeOrderReq) GetProductSkuId() int32 {
if x != nil { if x != nil {
return x.ProductSkuId return x.ProductSkuId
} }
return 0 return 0
} }
func (x *AddTraderOrderReq) GetProductName() string { func (x *AddTradeOrderReq) GetProductName() string {
if x != nil { if x != nil {
return x.ProductName return x.ProductName
} }
return "" return ""
} }
func (x *AddTraderOrderReq) GetProductMainPicture() string { func (x *AddTradeOrderReq) GetProductMainPicture() string {
if x != nil { if x != nil {
return x.ProductMainPicture return x.ProductMainPicture
} }
return "" return ""
} }
func (x *AddTraderOrderReq) GetUserId() int32 { func (x *AddTradeOrderReq) GetUserId() int32 {
if x != nil { if x != nil {
return x.UserId return x.UserId
} }
return 0 return 0
} }
func (x *AddTraderOrderReq) GetId() int32 { func (x *AddTradeOrderReq) GetId() int32 {
if x != nil { if x != nil {
return x.Id return x.Id
} }
return 0 return 0
} }
type AddTraderOrderResp struct { type AddTradeOrderResp struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
@ -240,8 +240,8 @@ type AddTraderOrderResp struct {
ID int32 `protobuf:"varint,6,opt,name=ID,proto3" json:"ID,omitempty"` ID int32 `protobuf:"varint,6,opt,name=ID,proto3" json:"ID,omitempty"`
} }
func (x *AddTraderOrderResp) Reset() { func (x *AddTradeOrderResp) Reset() {
*x = AddTraderOrderResp{} *x = AddTradeOrderResp{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_trade_proto_msgTypes[2] mi := &file_trade_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -249,13 +249,13 @@ func (x *AddTraderOrderResp) Reset() {
} }
} }
func (x *AddTraderOrderResp) String() string { func (x *AddTradeOrderResp) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*AddTraderOrderResp) ProtoMessage() {} func (*AddTradeOrderResp) ProtoMessage() {}
func (x *AddTraderOrderResp) ProtoReflect() protoreflect.Message { func (x *AddTradeOrderResp) ProtoReflect() protoreflect.Message {
mi := &file_trade_proto_msgTypes[2] mi := &file_trade_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -267,47 +267,47 @@ func (x *AddTraderOrderResp) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use AddTraderOrderResp.ProtoReflect.Descriptor instead. // Deprecated: Use AddTradeOrderResp.ProtoReflect.Descriptor instead.
func (*AddTraderOrderResp) Descriptor() ([]byte, []int) { func (*AddTradeOrderResp) Descriptor() ([]byte, []int) {
return file_trade_proto_rawDescGZIP(), []int{2} return file_trade_proto_rawDescGZIP(), []int{2}
} }
func (x *AddTraderOrderResp) GetProductSimple() *ProductDetail { func (x *AddTradeOrderResp) GetProductSimple() *ProductDetail {
if x != nil { if x != nil {
return x.ProductSimple return x.ProductSimple
} }
return nil return nil
} }
func (x *AddTraderOrderResp) GetProductSkuSimple() *ProductSku { func (x *AddTradeOrderResp) GetProductSkuSimple() *ProductSku {
if x != nil { if x != nil {
return x.ProductSkuSimple return x.ProductSkuSimple
} }
return nil return nil
} }
func (x *AddTraderOrderResp) GetShoppingCartNumber() int64 { func (x *AddTradeOrderResp) GetShoppingCartNumber() int64 {
if x != nil { if x != nil {
return x.ShoppingCartNumber return x.ShoppingCartNumber
} }
return 0 return 0
} }
func (x *AddTraderOrderResp) GetCanSetShoppingCartNumber() int64 { func (x *AddTradeOrderResp) GetCanSetShoppingCartNumber() int64 {
if x != nil { if x != nil {
return x.CanSetShoppingCartNumber return x.CanSetShoppingCartNumber
} }
return 0 return 0
} }
func (x *AddTraderOrderResp) GetIsBeyondMaxLimit() bool { func (x *AddTradeOrderResp) GetIsBeyondMaxLimit() bool {
if x != nil { if x != nil {
return x.IsBeyondMaxLimit return x.IsBeyondMaxLimit
} }
return false return false
} }
func (x *AddTraderOrderResp) GetID() int32 { func (x *AddTradeOrderResp) GetID() int32 {
if x != nil { if x != nil {
return x.ID return x.ID
} }
@ -1226,203 +1226,202 @@ var File_trade_proto protoreflect.FileDescriptor
var file_trade_proto_rawDesc = []byte{ var file_trade_proto_rawDesc = []byte{
0x0a, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe1, 0x01, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x01, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72,
0x72, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20,
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70,
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f,
0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
0x52, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x49, 0x64, 0x12, 0x20, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x49, 0x64, 0x12, 0x20, 0x0a,
0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x69,
0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x6f,
0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12,
0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xe7, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xe6, 0x01, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x54,
0x54, 0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06,
0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75,
0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49,
0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
0x63, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75,
0x6b, 0x75, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x74, 0x53, 0x6b, 0x75, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f,
0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x64,
0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69,
0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72,
0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64,
0x69, 0x64, 0x22, 0xb7, 0x02, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x72, 0x22, 0xb6, 0x02, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64,
0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
0x64, 0x75, 0x63, 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74,
0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x61, 0x69, 0x6c, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x69, 0x6d, 0x70,
0x69, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x3d, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x6c, 0x65, 0x12, 0x3d, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75,
0x53, 0x6b, 0x75, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70,
0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52,
0x6b, 0x75, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x53, 0x69, 0x10, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x53, 0x69, 0x6d, 0x70, 0x6c,
0x6d, 0x70, 0x6c, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72,
0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x73,
0x52, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65,
0x6d, 0x62, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x18, 0x63, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x53, 0x68, 0x72, 0x12, 0x3a, 0x0a, 0x18, 0x63, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x70, 0x70,
0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20,
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x63, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x53, 0x68, 0x01, 0x28, 0x03, 0x52, 0x18, 0x63, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x70, 0x70,
0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2a, 0x0a,
0x12, 0x2a, 0x0a, 0x10, 0x69, 0x73, 0x42, 0x65, 0x79, 0x6f, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x4c, 0x10, 0x69, 0x73, 0x42, 0x65, 0x79, 0x6f, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69,
0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x42, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x42, 0x65, 0x79, 0x6f, 0x6e,
0x79, 0x6f, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x4d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18,
0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x44, 0x22, 0xec, 0x02, 0x0a, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x44, 0x22, 0xec, 0x02, 0x0a, 0x07, 0x50, 0x72,
0x07, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61,
0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12,
0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72,
0x74, 0x75, 0x72, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x05,
0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f,
0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x64, 0x75, 0x63, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e,
0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26,
0x74, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x0a, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74,
0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x42, 0x75,
0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08,
0x1a, 0x0a, 0x08, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08,
0x08, 0x52, 0x08, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64,
0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70,
0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x3c, 0x0a, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x3c, 0x0a, 0x0e, 0x4c, 0x61,
0x0e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3f, 0x0a, 0x07, 0x50, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3f, 0x0a, 0x07, 0x50, 0x61, 0x67, 0x65,
0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1c, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x70,
0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x5e, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x5e, 0x0a, 0x08, 0x50, 0x61, 0x67,
0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
0x75, 0x63, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50,
0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12,
0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20,
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x22, 0xbf, 0x04, 0x0a, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x22, 0xbf, 0x04, 0x0a, 0x0d, 0x50, 0x72,
0x0d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70,
0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18,
0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49,
0x72, 0x79, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69,
0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69,
0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c,
0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x50,
0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61,
0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x72, 0x65, 0x6d,
0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x72, 0x65, 0x61, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x67, 0x6f, 0x74, 0x65, 0x41, 0x72, 0x65, 0x61, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x08,
0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x72, 0x65, 0x61,
0x72, 0x65, 0x61, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x69, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c,
0x6e, 0x67, 0x6c, 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52,
0x28, 0x05, 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x6d, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12,
0x69, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28,
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x08, 0x52, 0x08, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72,
0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d,
0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x61, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65,
0x55, 0x73, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55,
0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
0x54, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65,
0x55, 0x73, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55,
0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
0x54, 0x69, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54,
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x49, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x49, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64,
0x74, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x49, 0x73, 0x44, 0x65, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x49, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x65, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x11, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x69, 0x63,
0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x09, 0x52, 0x0b, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x22, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x22, 0x0a, 0x10, 0x50,
0x0a, 0x10, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12,
0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22,
0x69, 0x64, 0x22, 0x4f, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x4f, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44,
0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69,
0x74, 0x61, 0x69, 0x6c, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x6c, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
0x61, 0x69, 0x6c, 0x22, 0x9c, 0x01, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x22, 0x9c, 0x01, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x12,
0x6b, 0x75, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6b, 0x75, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x14, 0x0a, 0x05, 0x73, 0x6b, 0x75, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x05, 0x52, 0x05, 0x73, 0x6b, 0x75, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x6b, 0x75, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x61, 0x74, 0x74,
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4c, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4c, 0x69, 0x73, 0x74,
0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x74, 0x74, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
0x62, 0x75, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x65, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73,
0x0a, 0x09, 0x73, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09,
0x02, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f,
0x73, 0x74, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x22,
0x63, 0x6b, 0x22, 0x2d, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x2d, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x71,
0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x22, 0x43,
0x64, 0x22, 0x43, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x73, 0x70,
0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x12, 0x31, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x18, 0x01,
0x75, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f,
0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x22, 0x1e, 0x0a, 0x08, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x53, 0x6b, 0x75, 0x22, 0x1e, 0x0a, 0x08, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12,
0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75,
0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x75, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70,
0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x4c, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x4c, 0x6f, 0x67, 0x69,
0x6f, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x4c, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
0x67, 0x69, 0x6e, 0x22, 0x41, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75, 0x22, 0x41, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x71,
0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x12, 0x31, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x18, 0x01,
0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f,
0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x22, 0x2d, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75, 0x22, 0x2d, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75,
0x53, 0x6b, 0x75, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73,
0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65,
0x63, 0x63, 0x65, 0x73, 0x73, 0x32, 0x59, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x73, 0x73, 0x32, 0x55, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72,
0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x64, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f,
0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x72, 0x64, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64,
0x6f, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e,
0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72,
0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x5b, 0x0a, 0x10, 0x55, 0x70, 0x64,
0x32, 0x5f, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x47, 0x0a,
0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65,
0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x72, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61,
0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f,
0x72, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72,
0x54, 0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x31, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x29,
0x00, 0x32, 0x31, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50,
0x65, 0x12, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50,
0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x5d, 0x0a, 0x11, 0x53, 0x68, 0x6f,
0x73, 0x70, 0x22, 0x00, 0x32, 0x5d, 0x0a, 0x11, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x64, 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x48,
0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x48, 0x0a, 0x11, 0x53, 0x68, 0x6f, 0x0a, 0x11, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74,
0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x17, 0x61, 0x69, 0x6c, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70,
0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61,
0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x51, 0x0a, 0x0e, 0x53, 0x68, 0x6f, 0x77,
0x70, 0x22, 0x00, 0x32, 0x51, 0x0a, 0x0e, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x12, 0x3f, 0x0a, 0x0e, 0x53, 0x68,
0x63, 0x74, 0x53, 0x6b, 0x75, 0x12, 0x3f, 0x0a, 0x0e, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x12, 0x14, 0x2e, 0x70,
0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52,
0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x52, 0x0a, 0x0d, 0x53,
0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x52, 0x0a, 0x0d, 0x53, 0x68, 0x6f, 0x77, 0x44, 0x65, 0x68, 0x6f, 0x77, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x6b, 0x75, 0x12, 0x41, 0x0a, 0x0d,
0x74, 0x61, 0x69, 0x6c, 0x53, 0x6b, 0x75, 0x12, 0x41, 0x0a, 0x0d, 0x53, 0x68, 0x6f, 0x77, 0x44, 0x53, 0x68, 0x6f, 0x77, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x6b, 0x75, 0x12, 0x17, 0x2e,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x6b, 0x75, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74,
0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50,
0x71, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32,
0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x43, 0x0a, 0x0c, 0x47, 0x65, 0x43, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x0a, 0x0c, 0x47, 0x65, 0x33, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71,
0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x72, 0x1a, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65,
0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x73, 0x70, 0x22, 0x00, 0x32, 0x45, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b,
0x45, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x12, 0x38, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75, 0x12, 0x13,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75, 0x12, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x71, 0x1a, 0x14,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75,
0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x74, 0x65, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2e,
0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -1439,9 +1438,9 @@ func file_trade_proto_rawDescGZIP() []byte {
var file_trade_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_trade_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
var file_trade_proto_goTypes = []interface{}{ var file_trade_proto_goTypes = []interface{}{
(*TraderOrder)(nil), // 0: proto.TraderOrder (*TradeOrder)(nil), // 0: proto.TradeOrder
(*AddTraderOrderReq)(nil), // 1: proto.AddTraderOrderReq (*AddTradeOrderReq)(nil), // 1: proto.AddTradeOrderReq
(*AddTraderOrderResp)(nil), // 2: proto.AddTraderOrderResp (*AddTradeOrderResp)(nil), // 2: proto.AddTradeOrderResp
(*Product)(nil), // 3: proto.Product (*Product)(nil), // 3: proto.Product
(*PageReq)(nil), // 4: proto.PageReq (*PageReq)(nil), // 4: proto.PageReq
(*PageResp)(nil), // 5: proto.PageResp (*PageResp)(nil), // 5: proto.PageResp
@ -1458,23 +1457,23 @@ var file_trade_proto_goTypes = []interface{}{
nil, // 16: proto.Product.LabelListEntry nil, // 16: proto.Product.LabelListEntry
} }
var file_trade_proto_depIdxs = []int32{ var file_trade_proto_depIdxs = []int32{
6, // 0: proto.AddTraderOrderResp.productSimple:type_name -> proto.ProductDetail 6, // 0: proto.AddTradeOrderResp.productSimple:type_name -> proto.ProductDetail
9, // 1: proto.AddTraderOrderResp.productSkuSimple:type_name -> proto.ProductSku 9, // 1: proto.AddTradeOrderResp.productSkuSimple:type_name -> proto.ProductSku
16, // 2: proto.Product.labelList:type_name -> proto.Product.LabelListEntry 16, // 2: proto.Product.labelList:type_name -> proto.Product.LabelListEntry
3, // 3: proto.PageResp.product:type_name -> proto.Product 3, // 3: proto.PageResp.product:type_name -> proto.Product
6, // 4: proto.ProductDetailResp.productDetail:type_name -> proto.ProductDetail 6, // 4: proto.ProductDetailResp.productDetail:type_name -> proto.ProductDetail
9, // 5: proto.ProductSkuResp.productSku:type_name -> proto.ProductSku 9, // 5: proto.ProductSkuResp.productSku:type_name -> proto.ProductSku
9, // 6: proto.UpdateSkuReq.productSku:type_name -> proto.ProductSku 9, // 6: proto.UpdateSkuReq.productSku:type_name -> proto.ProductSku
1, // 7: proto.AddTraderOrder.AddTraderOrder:input_type -> proto.AddTraderOrderReq 1, // 7: proto.AddTradeOrder.AddTradeOrder:input_type -> proto.AddTradeOrderReq
1, // 8: proto.UpdateTraderOrder.UpdateTraderOrder:input_type -> proto.AddTraderOrderReq 1, // 8: proto.UpdateTradeOrder.UpdateTradeOrder:input_type -> proto.AddTradeOrderReq
4, // 9: proto.Page.Page:input_type -> proto.PageReq 4, // 9: proto.Page.Page:input_type -> proto.PageReq
7, // 10: proto.ShowProductDetail.ShowProductDetail:input_type -> proto.ProductDetailReq 7, // 10: proto.ShowProductDetail.ShowProductDetail:input_type -> proto.ProductDetailReq
10, // 11: proto.ShowProductSku.ShowProductSku:input_type -> proto.ProductSkuReq 10, // 11: proto.ShowProductSku.ShowProductSku:input_type -> proto.ProductSkuReq
7, // 12: proto.ShowDetailSku.ShowDetailSku:input_type -> proto.ProductDetailReq 7, // 12: proto.ShowDetailSku.ShowDetailSku:input_type -> proto.ProductDetailReq
12, // 13: proto.GetUserToken.GetUserToken:input_type -> proto.TokenReq 12, // 13: proto.GetUserToken.GetUserToken:input_type -> proto.TokenReq
14, // 14: proto.UpdateSku.UpdateSku:input_type -> proto.UpdateSkuReq 14, // 14: proto.UpdateSku.UpdateSku:input_type -> proto.UpdateSkuReq
2, // 15: proto.AddTraderOrder.AddTraderOrder:output_type -> proto.AddTraderOrderResp 2, // 15: proto.AddTradeOrder.AddTradeOrder:output_type -> proto.AddTradeOrderResp
2, // 16: proto.UpdateTraderOrder.UpdateTraderOrder:output_type -> proto.AddTraderOrderResp 2, // 16: proto.UpdateTradeOrder.UpdateTradeOrder:output_type -> proto.AddTradeOrderResp
5, // 17: proto.Page.Page:output_type -> proto.PageResp 5, // 17: proto.Page.Page:output_type -> proto.PageResp
8, // 18: proto.ShowProductDetail.ShowProductDetail:output_type -> proto.ProductDetailResp 8, // 18: proto.ShowProductDetail.ShowProductDetail:output_type -> proto.ProductDetailResp
11, // 19: proto.ShowProductSku.ShowProductSku:output_type -> proto.ProductSkuResp 11, // 19: proto.ShowProductSku.ShowProductSku:output_type -> proto.ProductSkuResp
@ -1495,7 +1494,7 @@ func file_trade_proto_init() {
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_trade_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_trade_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TraderOrder); i { switch v := v.(*TradeOrder); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1507,7 +1506,7 @@ func file_trade_proto_init() {
} }
} }
file_trade_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_trade_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddTraderOrderReq); i { switch v := v.(*AddTradeOrderReq); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -1519,7 +1518,7 @@ func file_trade_proto_init() {
} }
} }
file_trade_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_trade_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddTraderOrderResp); i { switch v := v.(*AddTradeOrderResp); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:

@ -27,34 +27,34 @@ var _ context.Context
var _ client.Option var _ client.Option
var _ server.Option var _ server.Option
// Api Endpoints for AddTraderOrder service // Api Endpoints for AddTradeOrder service
func NewAddTraderOrderEndpoints() []*api.Endpoint { func NewAddTradeOrderEndpoints() []*api.Endpoint {
return []*api.Endpoint{} return []*api.Endpoint{}
} }
// Client API for AddTraderOrder service // Client API for AddTradeOrder service
type AddTraderOrderService interface { type AddTradeOrderService interface {
// rpc 服务 // rpc 服务
AddTraderOrder(ctx context.Context, in *AddTraderOrderReq, opts ...client.CallOption) (*AddTraderOrderResp, error) AddTradeOrder(ctx context.Context, in *AddTradeOrderReq, opts ...client.CallOption) (*AddTradeOrderResp, error)
} }
type addTraderOrderService struct { type addTradeOrderService struct {
c client.Client c client.Client
name string name string
} }
func NewAddTraderOrderService(name string, c client.Client) AddTraderOrderService { func NewAddTradeOrderService(name string, c client.Client) AddTradeOrderService {
return &addTraderOrderService{ return &addTradeOrderService{
c: c, c: c,
name: name, name: name,
} }
} }
func (c *addTraderOrderService) AddTraderOrder(ctx context.Context, in *AddTraderOrderReq, opts ...client.CallOption) (*AddTraderOrderResp, error) { func (c *addTradeOrderService) AddTradeOrder(ctx context.Context, in *AddTradeOrderReq, opts ...client.CallOption) (*AddTradeOrderResp, error) {
req := c.c.NewRequest(c.name, "AddTraderOrder.AddTraderOrder", in) req := c.c.NewRequest(c.name, "AddTradeOrder.AddTradeOrder", in)
out := new(AddTraderOrderResp) out := new(AddTradeOrderResp)
err := c.c.Call(ctx, req, out, opts...) err := c.c.Call(ctx, req, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
@ -62,60 +62,60 @@ func (c *addTraderOrderService) AddTraderOrder(ctx context.Context, in *AddTrade
return out, nil return out, nil
} }
// Server API for AddTraderOrder service // Server API for AddTradeOrder service
type AddTraderOrderHandler interface { type AddTradeOrderHandler interface {
// rpc 服务 // rpc 服务
AddTraderOrder(context.Context, *AddTraderOrderReq, *AddTraderOrderResp) error AddTradeOrder(context.Context, *AddTradeOrderReq, *AddTradeOrderResp) error
} }
func RegisterAddTraderOrderHandler(s server.Server, hdlr AddTraderOrderHandler, opts ...server.HandlerOption) error { func RegisterAddTradeOrderHandler(s server.Server, hdlr AddTradeOrderHandler, opts ...server.HandlerOption) error {
type addTraderOrder interface { type addTradeOrder interface {
AddTraderOrder(ctx context.Context, in *AddTraderOrderReq, out *AddTraderOrderResp) error AddTradeOrder(ctx context.Context, in *AddTradeOrderReq, out *AddTradeOrderResp) error
} }
type AddTraderOrder struct { type AddTradeOrder struct {
addTraderOrder addTradeOrder
} }
h := &addTraderOrderHandler{hdlr} h := &addTradeOrderHandler{hdlr}
return s.Handle(s.NewHandler(&AddTraderOrder{h}, opts...)) return s.Handle(s.NewHandler(&AddTradeOrder{h}, opts...))
} }
type addTraderOrderHandler struct { type addTradeOrderHandler struct {
AddTraderOrderHandler AddTradeOrderHandler
} }
func (h *addTraderOrderHandler) AddTraderOrder(ctx context.Context, in *AddTraderOrderReq, out *AddTraderOrderResp) error { func (h *addTradeOrderHandler) AddTradeOrder(ctx context.Context, in *AddTradeOrderReq, out *AddTradeOrderResp) error {
return h.AddTraderOrderHandler.AddTraderOrder(ctx, in, out) return h.AddTradeOrderHandler.AddTradeOrder(ctx, in, out)
} }
// Api Endpoints for UpdateTraderOrder service // Api Endpoints for UpdateTradeOrder service
func NewUpdateTraderOrderEndpoints() []*api.Endpoint { func NewUpdateTradeOrderEndpoints() []*api.Endpoint {
return []*api.Endpoint{} return []*api.Endpoint{}
} }
// Client API for UpdateTraderOrder service // Client API for UpdateTradeOrder service
type UpdateTraderOrderService interface { type UpdateTradeOrderService interface {
// rpc 服务 // rpc 服务
UpdateTraderOrder(ctx context.Context, in *AddTraderOrderReq, opts ...client.CallOption) (*AddTraderOrderResp, error) UpdateTradeOrder(ctx context.Context, in *AddTradeOrderReq, opts ...client.CallOption) (*AddTradeOrderResp, error)
} }
type updateTraderOrderService struct { type updateTradeOrderService struct {
c client.Client c client.Client
name string name string
} }
func NewUpdateTraderOrderService(name string, c client.Client) UpdateTraderOrderService { func NewUpdateTradeOrderService(name string, c client.Client) UpdateTradeOrderService {
return &updateTraderOrderService{ return &updateTradeOrderService{
c: c, c: c,
name: name, name: name,
} }
} }
func (c *updateTraderOrderService) UpdateTraderOrder(ctx context.Context, in *AddTraderOrderReq, opts ...client.CallOption) (*AddTraderOrderResp, error) { func (c *updateTradeOrderService) UpdateTradeOrder(ctx context.Context, in *AddTradeOrderReq, opts ...client.CallOption) (*AddTradeOrderResp, error) {
req := c.c.NewRequest(c.name, "UpdateTraderOrder.UpdateTraderOrder", in) req := c.c.NewRequest(c.name, "UpdateTradeOrder.UpdateTradeOrder", in)
out := new(AddTraderOrderResp) out := new(AddTradeOrderResp)
err := c.c.Call(ctx, req, out, opts...) err := c.c.Call(ctx, req, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
@ -123,30 +123,30 @@ func (c *updateTraderOrderService) UpdateTraderOrder(ctx context.Context, in *Ad
return out, nil return out, nil
} }
// Server API for UpdateTraderOrder service // Server API for UpdateTradeOrder service
type UpdateTraderOrderHandler interface { type UpdateTradeOrderHandler interface {
// rpc 服务 // rpc 服务
UpdateTraderOrder(context.Context, *AddTraderOrderReq, *AddTraderOrderResp) error UpdateTradeOrder(context.Context, *AddTradeOrderReq, *AddTradeOrderResp) error
} }
func RegisterUpdateTraderOrderHandler(s server.Server, hdlr UpdateTraderOrderHandler, opts ...server.HandlerOption) error { func RegisterUpdateTradeOrderHandler(s server.Server, hdlr UpdateTradeOrderHandler, opts ...server.HandlerOption) error {
type updateTraderOrder interface { type updateTradeOrder interface {
UpdateTraderOrder(ctx context.Context, in *AddTraderOrderReq, out *AddTraderOrderResp) error UpdateTradeOrder(ctx context.Context, in *AddTradeOrderReq, out *AddTradeOrderResp) error
} }
type UpdateTraderOrder struct { type UpdateTradeOrder struct {
updateTraderOrder updateTradeOrder
} }
h := &updateTraderOrderHandler{hdlr} h := &updateTradeOrderHandler{hdlr}
return s.Handle(s.NewHandler(&UpdateTraderOrder{h}, opts...)) return s.Handle(s.NewHandler(&UpdateTradeOrder{h}, opts...))
} }
type updateTraderOrderHandler struct { type updateTradeOrderHandler struct {
UpdateTraderOrderHandler UpdateTradeOrderHandler
} }
func (h *updateTraderOrderHandler) UpdateTraderOrder(ctx context.Context, in *AddTraderOrderReq, out *AddTraderOrderResp) error { func (h *updateTradeOrderHandler) UpdateTradeOrder(ctx context.Context, in *AddTradeOrderReq, out *AddTradeOrderResp) error {
return h.UpdateTraderOrderHandler.UpdateTraderOrder(ctx, in, out) return h.UpdateTradeOrderHandler.UpdateTradeOrder(ctx, in, out)
} }
// Api Endpoints for Page service // Api Endpoints for Page service

@ -22,7 +22,7 @@ package proto ; //默认在哪个包
UpdateTime time.Time `json:"updateTime"` UpdateTime time.Time `json:"updateTime"`
IsDeleted bool `json:"isDeleted"` IsDeleted bool `json:"isDeleted"`
*/ */
message TraderOrder { message TradeOrder {
int32 id = 1; int32 id = 1;
int32 userId = 2; int32 userId = 2;
int32 productId =3; int32 productId =3;
@ -40,7 +40,7 @@ message TraderOrder {
} }
**/ **/
// request struct // request struct
message AddTraderOrderReq { message AddTradeOrderReq {
int32 number = 1; int32 number = 1;
int32 productId = 2; int32 productId = 2;
int32 productSkuId =3; int32 productSkuId =3;
@ -50,7 +50,7 @@ message AddTraderOrderReq {
int32 id = 7; int32 id = 7;
} }
message AddTraderOrderResp{ message AddTradeOrderResp{
ProductDetail productSimple = 1; ProductDetail productSimple = 1;
ProductSku productSkuSimple =2; ProductSku productSkuSimple =2;
int64 shoppingCartNumber = 3; int64 shoppingCartNumber = 3;
@ -59,14 +59,14 @@ message AddTraderOrderResp{
int32 ID = 6; int32 ID = 6;
} }
//RPC //RPC
service AddTraderOrder { service AddTradeOrder {
//rpc //rpc
rpc AddTraderOrder (AddTraderOrderReq) returns (AddTraderOrderResp){} rpc AddTradeOrder (AddTradeOrderReq) returns (AddTradeOrderResp){}
} }
service UpdateTraderOrder { service UpdateTradeOrder {
//rpc //rpc
rpc UpdateTraderOrder (AddTraderOrderReq) returns (AddTraderOrderResp){} rpc UpdateTradeOrder (AddTradeOrderReq) returns (AddTradeOrderResp){}
} }

Loading…
Cancel
Save