diff --git a/trade-order/client/client.go b/trade-order/client/client.go index 98ab60a..e8ba2f0 100644 --- a/trade-order/client/client.go +++ b/trade-order/client/client.go @@ -5,20 +5,17 @@ import ( "fmt" "github.com/afex/hystrix-go/hystrix" 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" opentracing2 "github.com/go-micro/plugins/v4/wrapper/trace/opentracing" - "github.com/lithammer/shortuuid/v3" "github.com/opentracing/opentracing-go" "go-micro.dev/v4/client" "go-micro.dev/v4/web" //"goproduct/common" common "git.mashibing.com/msb_47094/shopping-comm" - "goproduct/proto" "log" "net" "net/http" - "strconv" + "trade-order/proto" "github.com/gin-gonic/gin" "go-micro.dev/v4" @@ -30,11 +27,11 @@ func main() { const ( //DTM 服务地址 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 Number int32 = 1 - resp := &proto.AddCartResp{} + //var CartId int32 = 1 + //var Number int32 = 1 + resp := &proto.AddTradeOrderResp{} router := gin.Default() @@ -54,7 +51,7 @@ func main() { hystrixStreamHandler := hystrix.NewStreamHandler() hystrixStreamHandler.Start() 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 { log.Panic(err) } @@ -69,142 +66,52 @@ func main() { //负载均衡 micro.WrapClient(roundrobin.NewClientWrapper()), ) - AddCartClient := proto.NewAddCartService("shop-cart", rpcServer.Client()) - UpdateCartClient := proto.NewUpdateCartService("shop-cart", rpcServer.Client()) - ShowProductDetailClient := proto.NewShowProductDetailService("shop-product", rpcServer.Client()) - ShowDetailSkuClient := proto.NewShowDetailSkuService("shop-product", rpcServer.Client()) - GetUserTokenClient := proto.NewGetUserTokenService("shop-user", rpcServer.Client()) - UpdateSkuClient := proto.NewUpdateSkuService("shop-product", 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, "请求成功") - }) + //AddCartClient := proto.NewAddCartService("shop-cart", rpcServer.Client()) + //UpdateCartClient := proto.NewUpdateCartService("shop-cart", rpcServer.Client()) + //ShowProductDetailClient := proto.NewShowProductDetailService("shop-product", rpcServer.Client()) + //ShowDetailSkuClient := proto.NewShowDetailSkuService("shop-product", rpcServer.Client()) + //GetUserTokenClient := proto.NewGetUserTokenService("shop-user", rpcServer.Client()) + //UpdateSkuClient := proto.NewUpdateSkuService("shop-product", rpcServer.Client()) + AddTraderClient := proto.NewAddTradeOrderService("trade-order", rpcServer.Client()) + //UpdateTraderClient := proto.NewUpdateTradeOrderService("trade-order", rpcServer.Client()) //开始拆分 DTM服务 // - router.POST("/updateSku", func(c *gin.Context) { - req := &proto.UpdateSkuReq{} - if err := c.BindJSON(req); err != nil { - log.Fatalln(err) - } - _, 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": "SUCCESS", "Message": "修改库存成功!"}) - }) - router.POST("/updateSku-compensate", func(c *gin.Context) { - req := &proto.UpdateSkuReq{} + //router.POST("/updateSku", func(c *gin.Context) { + // req := &proto.UpdateSkuReq{} + // if err := c.BindJSON(req); err != nil { + // log.Fatalln(err) + // } + // _, 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": "SUCCESS", "Message": "修改库存成功!"}) + //}) + //router.POST("/updateSku-compensate", func(c *gin.Context) { + // 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 { 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("/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 + resp, err = AddTraderClient.AddTradeOrder(context.TODO(), req) + fmt.Println(resp) + //CartId = resp.ID //测试异常 //err = errors.New("400", "测试异常", 400) if err != nil { @@ -215,111 +122,111 @@ func main() { c.JSON(http.StatusOK, gin.H{"addCart": "SUCCESS", "Message": "新增购物车成功!"}) }) - router.POST("/addCart-compensate", func(c *gin.Context) { - req := &proto.AddCartReq{} - if err := c.BindJSON(req); err != nil { - log.Fatalln(err) - } - req.Id = CartId - resp, err = UpdateCartClient.UpdateCart(context.TODO(), req) - CartId = resp.ID - if err != nil { - log.Println("/addCart-compensate err ", err) - c.JSON(http.StatusOK, gin.H{"dtm_reslut": "FAILURE", "Message": "删除购物车失败!"}) - return - } - c.JSON(http.StatusOK, gin.H{"addCart-compensate": "SUCCESS", "Message": "删除购物车成功!"}) - }) - - router.GET("/addShoppingCart", 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 - Number = req.Number // - updateSkuReq := &proto.UpdateSkuReq{ - ProductSku: sku, - } - resp.ProductSkuSimple = respSkuDetail.ProductSku[0] - resp.ProductSimple = respDetail.ProductDetail[0] - - //全局事务 - gid := shortuuid.New() - saga := dtmcli.NewSaga(DtmServer, gid). - Add(QSBusi+"/updateSku", QSBusi+"/updateSku-compensate", updateSkuReq). - Add(QSBusi+"/addCart", QSBusi+"/addCart-compensate", req) - err = saga.Submit() - if err != nil { - log.Println("saga submit err :", err) - common.RespFail(c.Writer, resp, "添加失败") - } - log.Println(" /saga submit submit :", gid) - ////writer data message row total field - common.RespOK(c.Writer, resp, "请求成功") - }) + //router.POST("/addCart-compensate", func(c *gin.Context) { + // req := &proto.AddCartReq{} + // if err := c.BindJSON(req); err != nil { + // log.Fatalln(err) + // } + // req.Id = CartId + // resp, err = UpdateCartClient.UpdateCart(context.TODO(), req) + // CartId = resp.ID + // if err != nil { + // log.Println("/addCart-compensate err ", err) + // c.JSON(http.StatusOK, gin.H{"dtm_reslut": "FAILURE", "Message": "删除购物车失败!"}) + // return + // } + // c.JSON(http.StatusOK, gin.H{"addCart-compensate": "SUCCESS", "Message": "删除购物车成功!"}) + //}) + // + //router.GET("/addShoppingCart", 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 + // Number = req.Number // + // updateSkuReq := &proto.UpdateSkuReq{ + // ProductSku: sku, + // } + // resp.ProductSkuSimple = respSkuDetail.ProductSku[0] + // resp.ProductSimple = respDetail.ProductDetail[0] + // + // //全局事务 + // gid := shortuuid.New() + // saga := dtmcli.NewSaga(DtmServer, gid). + // Add(QSBusi+"/updateSku", QSBusi+"/updateSku-compensate", updateSkuReq). + // Add(QSBusi+"/addCart", QSBusi+"/addCart-compensate", req) + // err = saga.Submit() + // if err != nil { + // log.Println("saga submit err :", err) + // common.RespFail(c.Writer, resp, "添加失败") + // } + // log.Println(" /saga submit submit :", gid) + // ////writer data message row total field + // common.RespOK(c.Writer, resp, "请求成功") + //}) service := web.NewService( - web.Address(":6668"), - web.Name("shop-cart-client"), + web.Address(":6669"), + web.Name("trade-order-client"), web.Registry(consulReg), web.Handler(router), ) diff --git a/trade-order/domain/repository/trade_repository.go b/trade-order/domain/repository/trade_repository.go index 7efd4cc..292e00e 100644 --- a/trade-order/domain/repository/trade_repository.go +++ b/trade-order/domain/repository/trade_repository.go @@ -2,9 +2,9 @@ package repository import ( "fmt" - "goproduct/domain/model" - "goproduct/proto" "time" + "trade-order/domain/model" + "trade-order/proto" "gorm.io/gorm" ) @@ -16,50 +16,35 @@ import ( string verificationCode = 4; **/ //接口 -type ICartRepository interface { - AddCart(*proto.AddCartReq) (*model.ShoppingCart, error) - UpdateCart(*proto.AddCartReq) (*model.ShoppingCart, error) +type ITradeRepository interface { + AddTradeOrder(req *proto.AddTradeOrderReq) (*model.TraderOrder, error) + UpdateTradeOrder(req *proto.AddTradeOrderReq) (*model.TraderOrder, error) } // 创建实例 -func NewCartRepository(db *gorm.DB) ICartRepository { - return &CartRepository{mysqlDB: db} +func NewTradeRepository(db *gorm.DB) ITradeRepository { + return &TradeRepository{mysqlDB: db} } // 数据DB -type CartRepository struct { +type TradeRepository struct { mysqlDB *gorm.DB } -func (u *CartRepository) AddCart(req *proto.AddCartReq) (obj *model.ShoppingCart, err error) { - cart := model.ShoppingCart{ - Number: req.Number, - ProductId: req.ProductId, - ProductSkuId: req.ProductSkuId, - ProductName: req.ProductName, - ProductMainPicture: req.ProductMainPicture, - UserId: req.UserId, - } - cart.CreateTime = time.Now() // - tb := u.mysqlDB.Create(&cart) +func (u *TradeRepository) AddTradeOrder(req *proto.AddTradeOrderReq) (obj *model.TraderOrder, err error) { + trade := model.TraderOrder{} + trade.CreateTime = time.Now() // + tb := u.mysqlDB.Create(&trade) //err = errors.New("400", "测试异常", 400) - fmt.Println("repository AddCart >>>> ", cart) - return &cart, tb.Error //err + fmt.Println("repository AddTradeOrder >>>> ", trade) + return &trade, tb.Error //err } -func (u *CartRepository) UpdateCart(req *proto.AddCartReq) (obj *model.ShoppingCart, err error) { - cart := model.ShoppingCart{ - Number: req.Number, - ProductId: req.ProductId, - 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) +func (u *TradeRepository) UpdateTradeOrder(req *proto.AddTradeOrderReq) (obj *model.TraderOrder, err error) { + trade := model.TraderOrder{} + trade.UpdateTime = time.Now() // + tb := u.mysqlDB.Model(&model.TraderOrder{}).Where("id = ?", trade.ID).Update("order_status", trade.OrderStatus) //err = errors.New("400", "测试异常", 400) - fmt.Println("repository UpdateCart >>>> ", cart) - return &cart, tb.Error //err + fmt.Println("repository UpdateTradeOrder >>>> ", trade) + return &trade, tb.Error //err } diff --git a/trade-order/domain/service/trade_service.go b/trade-order/domain/service/trade_service.go index 5cf86a0..001849b 100644 --- a/trade-order/domain/service/trade_service.go +++ b/trade-order/domain/service/trade_service.go @@ -1,21 +1,21 @@ package service import ( - "goproduct/domain/model" - "goproduct/domain/repository" - "goproduct/proto" + "trade-order/domain/model" + "trade-order/domain/repository" + "trade-order/proto" ) -type ICartService interface { - AddCart(*proto.AddCartReq) (obj *model.ShoppingCart, err error) - UpdateCart(*proto.AddCartReq) (obj *model.ShoppingCart, err error) +type ITradeOrderService interface { + AddTradeOrder(req *proto.AddTradeOrderReq) (obj *model.TraderOrder, err error) + UpdateTradeOrder(req *proto.AddTradeOrderReq) (obj *model.TraderOrder, err error) } -type CartService struct { - cartRepository repository.ICartRepository +type TradeOrderService struct { + tradeRepository repository.ITradeRepository } -func NewCartService(cartRepository repository.ICartRepository) ICartService { - return &CartService{cartRepository: cartRepository} +func NewTradeOrderService(cartRepository repository.ITradeRepository) ITradeOrderService { + return &TradeOrderService{tradeRepository: cartRepository} } // "number": 0, @@ -24,9 +24,9 @@ func NewCartService(cartRepository repository.ICartRepository) ICartService { // "productSkuId": 0 // // 重写接口方法 -func (u *CartService) AddCart(req *proto.AddCartReq) (obj *model.ShoppingCart, err error) { - return u.cartRepository.AddCart(req) +func (u *TradeOrderService) AddTradeOrder(req *proto.AddTradeOrderReq) (obj *model.TraderOrder, err error) { + return u.tradeRepository.AddTradeOrder(req) } -func (u *CartService) UpdateCart(req *proto.AddCartReq) (obj *model.ShoppingCart, err error) { - return u.cartRepository.UpdateCart(req) +func (u *TradeOrderService) UpdateTradeOrder(req *proto.AddTradeOrderReq) (obj *model.TraderOrder, err error) { + return u.tradeRepository.AddTradeOrder(req) } diff --git a/trade-order/handler/trade_handler.go b/trade-order/handler/trade_handler.go index 82e5c2a..a58c4d6 100644 --- a/trade-order/handler/trade_handler.go +++ b/trade-order/handler/trade_handler.go @@ -3,41 +3,35 @@ package handler import ( "context" "fmt" - "goproduct/domain/service" - "goproduct/proto" + "trade-order/domain/service" + "trade-order/proto" ) -type CartHandler struct { - CartService service.ICartService +type TradeOrderHandler struct { + TradeOrderService service.ITradeOrderService } // 新增购物车 -func (u *CartHandler) AddCart(ctx context.Context, req *proto.AddCartReq, resp *proto.AddCartResp) error { - obj, err := u.CartService.AddCart(req) +func (u *TradeOrderHandler) AddTradeOrder(ctx context.Context, req *proto.AddTradeOrderReq, resp *proto.AddTradeOrderResp) error { + obj, err := u.TradeOrderService.AddTradeOrder(req) if err != nil { - println(" AddCart err :", err) + println(" AddTradeOrder err :", err) } else { - resp.CanSetShoppingCartNumber = int64(obj.Number) - resp.ShoppingCartNumber = int64(obj.Number) - resp.IsBeyondMaxLimit = false // 查询sku - resp.ID = obj.ID //增加新增cart的ID - fmt.Println(" AddCart handler >>>>>> ", resp) + fmt.Println(obj.UpdateTime) + fmt.Println(" AddTradeOrder handler >>>>>> ", resp) } return err } //修改购物车 -func (u *CartHandler) UpdateCart(ctx context.Context, req *proto.AddCartReq, resp *proto.AddCartResp) error { - obj, err := u.CartService.UpdateCart(req) +func (u *TradeOrderHandler) UpdateTradeOrder(ctx context.Context, req *proto.AddTradeOrderReq, resp *proto.AddTradeOrderResp) error { + obj, err := u.TradeOrderService.UpdateTradeOrder(req) if err != nil { - println(" UpdateCart err :", err) + println(" UpdateTradeOrder err :", err) } else { - resp.CanSetShoppingCartNumber = int64(obj.Number) - resp.ShoppingCartNumber = int64(obj.Number) - resp.IsBeyondMaxLimit = false // 查询sku - resp.ID = obj.ID //增加新增cart的ID - fmt.Println(" UpdateCart handler >>>>>> ", resp) + fmt.Println(obj.UpdateTime) + fmt.Println(" UpdateTradeOrder handler >>>>>> ", resp) } return err } diff --git a/trade-order/main.go b/trade-order/main.go index b96ffb3..210f347 100644 --- a/trade-order/main.go +++ b/trade-order/main.go @@ -8,18 +8,18 @@ import ( "github.com/opentracing/opentracing-go" "go-micro.dev/v4" "go-micro.dev/v4/registry" - "goproduct/domain/repository" - "goproduct/domain/service" - "goproduct/handler" - "goproduct/proto" "log" "time" + "trade-order/domain/repository" + "trade-order/domain/service" + "trade-order/handler" + "trade-order/proto" ) const ( consulStr = "http://192.168.100.131:8500" consulReistStr = "192.168.100.131:8500" - fileKey = "mysql-product" + fileKey = "mysql-trade" QPS = 100 ) @@ -34,7 +34,7 @@ func main() { options.Addrs = []string{consulReistStr} }) //链路追踪实列化 注意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 { log.Fatal(err) } @@ -45,8 +45,8 @@ func main() { repcService := micro.NewService( micro.RegisterTTL(time.Second*30), micro.RegisterInterval(time.Second*30), - micro.Name("shop-cart"), - micro.Address(":8084"), + micro.Name("trade-order"), + micro.Address(":8085"), micro.Version("v1"), micro.Registry(consulReist), //链路追踪 @@ -57,11 +57,11 @@ func main() { //2.初始化db db, _ := common.GetMysqlFromConsul(consulConfig) //3.创建服务实例 - cartService := service.NewCartService(repository.NewCartRepository(db)) + tradeService := service.NewTradeOrderService(repository.NewTradeRepository(db)) //4.注册handler - proto.RegisterAddCartHandler(repcService.Server(), &handler.CartHandler{cartService}) + proto.RegisterAddTradeOrderHandler(repcService.Server(), &handler.TradeOrderHandler{tradeService}) //4.注册handler - proto.RegisterUpdateCartHandler(repcService.Server(), &handler.CartHandler{cartService}) + proto.RegisterUpdateTradeOrderHandler(repcService.Server(), &handler.TradeOrderHandler{tradeService}) //5.启动服务 if err := repcService.Run(); err != nil { diff --git a/trade-order/proto/trade.pb.go b/trade-order/proto/trade.pb.go index ec11134..2a0b345 100644 --- a/trade-order/proto/trade.pb.go +++ b/trade-order/proto/trade.pb.go @@ -36,7 +36,7 @@ const ( // UpdateUser int32 `json:"updateUser"` // UpdateTime time.Time `json:"updateTime"` // IsDeleted bool `json:"isDeleted"` -type TraderOrder struct { +type TradeOrder struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -50,8 +50,8 @@ type TraderOrder struct { Number int32 `protobuf:"varint,7,opt,name=number,proto3" json:"number,omitempty"` } -func (x *TraderOrder) Reset() { - *x = TraderOrder{} +func (x *TradeOrder) Reset() { + *x = TradeOrder{} if protoimpl.UnsafeEnabled { mi := &file_trade_proto_msgTypes[0] 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) } -func (*TraderOrder) ProtoMessage() {} +func (*TradeOrder) ProtoMessage() {} -func (x *TraderOrder) ProtoReflect() protoreflect.Message { +func (x *TradeOrder) ProtoReflect() protoreflect.Message { mi := &file_trade_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -77,54 +77,54 @@ func (x *TraderOrder) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TraderOrder.ProtoReflect.Descriptor instead. -func (*TraderOrder) Descriptor() ([]byte, []int) { +// Deprecated: Use TradeOrder.ProtoReflect.Descriptor instead. +func (*TradeOrder) Descriptor() ([]byte, []int) { return file_trade_proto_rawDescGZIP(), []int{0} } -func (x *TraderOrder) GetId() int32 { +func (x *TradeOrder) GetId() int32 { if x != nil { return x.Id } return 0 } -func (x *TraderOrder) GetUserId() int32 { +func (x *TradeOrder) GetUserId() int32 { if x != nil { return x.UserId } return 0 } -func (x *TraderOrder) GetProductId() int32 { +func (x *TradeOrder) GetProductId() int32 { if x != nil { return x.ProductId } return 0 } -func (x *TraderOrder) GetProductSkuId() int32 { +func (x *TradeOrder) GetProductSkuId() int32 { if x != nil { return x.ProductSkuId } return 0 } -func (x *TraderOrder) GetProductName() string { +func (x *TradeOrder) GetProductName() string { if x != nil { return x.ProductName } return "" } -func (x *TraderOrder) GetProductMainPicture() string { +func (x *TradeOrder) GetProductMainPicture() string { if x != nil { return x.ProductMainPicture } return "" } -func (x *TraderOrder) GetNumber() int32 { +func (x *TradeOrder) GetNumber() int32 { if x != nil { return x.Number } @@ -132,7 +132,7 @@ func (x *TraderOrder) GetNumber() int32 { } // 请求 request struct -type AddTraderOrderReq struct { +type AddTradeOrderReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -146,8 +146,8 @@ type AddTraderOrderReq struct { Id int32 `protobuf:"varint,7,opt,name=id,proto3" json:"id,omitempty"` } -func (x *AddTraderOrderReq) Reset() { - *x = AddTraderOrderReq{} +func (x *AddTradeOrderReq) Reset() { + *x = AddTradeOrderReq{} if protoimpl.UnsafeEnabled { mi := &file_trade_proto_msgTypes[1] 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) } -func (*AddTraderOrderReq) ProtoMessage() {} +func (*AddTradeOrderReq) ProtoMessage() {} -func (x *AddTraderOrderReq) ProtoReflect() protoreflect.Message { +func (x *AddTradeOrderReq) ProtoReflect() protoreflect.Message { mi := &file_trade_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -173,61 +173,61 @@ func (x *AddTraderOrderReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddTraderOrderReq.ProtoReflect.Descriptor instead. -func (*AddTraderOrderReq) Descriptor() ([]byte, []int) { +// Deprecated: Use AddTradeOrderReq.ProtoReflect.Descriptor instead. +func (*AddTradeOrderReq) Descriptor() ([]byte, []int) { return file_trade_proto_rawDescGZIP(), []int{1} } -func (x *AddTraderOrderReq) GetNumber() int32 { +func (x *AddTradeOrderReq) GetNumber() int32 { if x != nil { return x.Number } return 0 } -func (x *AddTraderOrderReq) GetProductId() int32 { +func (x *AddTradeOrderReq) GetProductId() int32 { if x != nil { return x.ProductId } return 0 } -func (x *AddTraderOrderReq) GetProductSkuId() int32 { +func (x *AddTradeOrderReq) GetProductSkuId() int32 { if x != nil { return x.ProductSkuId } return 0 } -func (x *AddTraderOrderReq) GetProductName() string { +func (x *AddTradeOrderReq) GetProductName() string { if x != nil { return x.ProductName } return "" } -func (x *AddTraderOrderReq) GetProductMainPicture() string { +func (x *AddTradeOrderReq) GetProductMainPicture() string { if x != nil { return x.ProductMainPicture } return "" } -func (x *AddTraderOrderReq) GetUserId() int32 { +func (x *AddTradeOrderReq) GetUserId() int32 { if x != nil { return x.UserId } return 0 } -func (x *AddTraderOrderReq) GetId() int32 { +func (x *AddTradeOrderReq) GetId() int32 { if x != nil { return x.Id } return 0 } -type AddTraderOrderResp struct { +type AddTradeOrderResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -240,8 +240,8 @@ type AddTraderOrderResp struct { ID int32 `protobuf:"varint,6,opt,name=ID,proto3" json:"ID,omitempty"` } -func (x *AddTraderOrderResp) Reset() { - *x = AddTraderOrderResp{} +func (x *AddTradeOrderResp) Reset() { + *x = AddTradeOrderResp{} if protoimpl.UnsafeEnabled { mi := &file_trade_proto_msgTypes[2] 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) } -func (*AddTraderOrderResp) ProtoMessage() {} +func (*AddTradeOrderResp) ProtoMessage() {} -func (x *AddTraderOrderResp) ProtoReflect() protoreflect.Message { +func (x *AddTradeOrderResp) ProtoReflect() protoreflect.Message { mi := &file_trade_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -267,47 +267,47 @@ func (x *AddTraderOrderResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddTraderOrderResp.ProtoReflect.Descriptor instead. -func (*AddTraderOrderResp) Descriptor() ([]byte, []int) { +// Deprecated: Use AddTradeOrderResp.ProtoReflect.Descriptor instead. +func (*AddTradeOrderResp) Descriptor() ([]byte, []int) { return file_trade_proto_rawDescGZIP(), []int{2} } -func (x *AddTraderOrderResp) GetProductSimple() *ProductDetail { +func (x *AddTradeOrderResp) GetProductSimple() *ProductDetail { if x != nil { return x.ProductSimple } return nil } -func (x *AddTraderOrderResp) GetProductSkuSimple() *ProductSku { +func (x *AddTradeOrderResp) GetProductSkuSimple() *ProductSku { if x != nil { return x.ProductSkuSimple } return nil } -func (x *AddTraderOrderResp) GetShoppingCartNumber() int64 { +func (x *AddTradeOrderResp) GetShoppingCartNumber() int64 { if x != nil { return x.ShoppingCartNumber } return 0 } -func (x *AddTraderOrderResp) GetCanSetShoppingCartNumber() int64 { +func (x *AddTradeOrderResp) GetCanSetShoppingCartNumber() int64 { if x != nil { return x.CanSetShoppingCartNumber } return 0 } -func (x *AddTraderOrderResp) GetIsBeyondMaxLimit() bool { +func (x *AddTradeOrderResp) GetIsBeyondMaxLimit() bool { if x != nil { return x.IsBeyondMaxLimit } return false } -func (x *AddTraderOrderResp) GetID() int32 { +func (x *AddTradeOrderResp) GetID() int32 { if x != nil { return x.ID } @@ -1226,203 +1226,202 @@ var File_trade_proto protoreflect.FileDescriptor var file_trade_proto_rawDesc = []byte{ 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, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, - 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, - 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x49, 0x64, 0x12, 0x20, - 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x50, - 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, - 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xe7, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, - 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, - 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, - 0x6b, 0x75, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x64, - 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, - 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, - 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, - 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, - 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, - 0x69, 0x64, 0x22, 0xb7, 0x02, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x72, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0d, 0x70, 0x72, 0x6f, - 0x64, 0x75, 0x63, 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, - 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x3d, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, - 0x53, 0x6b, 0x75, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, - 0x6b, 0x75, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x53, 0x69, - 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x18, 0x63, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x53, 0x68, - 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x63, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x53, 0x68, - 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x73, 0x42, 0x65, 0x79, 0x6f, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x42, 0x65, - 0x79, 0x6f, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x44, 0x22, 0xec, 0x02, 0x0a, - 0x07, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, - 0x74, 0x75, 0x72, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, - 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, - 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, - 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, - 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, - 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x3c, 0x0a, - 0x0e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3f, 0x0a, 0x07, 0x50, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1c, - 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x5e, 0x0a, 0x08, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, - 0x75, 0x63, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x22, 0xbf, 0x04, 0x0a, - 0x0d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, - 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, - 0x72, 0x79, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, - 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x11, - 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x72, 0x65, 0x61, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x67, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, - 0x72, 0x65, 0x61, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x69, - 0x6e, 0x67, 0x6c, 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x49, 0x73, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x49, 0x73, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, - 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x22, - 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, - 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x4f, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x22, 0x9c, 0x01, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, - 0x6b, 0x75, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6b, 0x75, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x73, 0x6b, 0x75, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x13, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4c, - 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x02, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x6f, - 0x63, 0x6b, 0x22, 0x2d, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, - 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, - 0x64, 0x22, 0x43, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, - 0x75, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x64, - 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x22, 0x1e, 0x0a, 0x08, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, - 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x4c, 0x6f, - 0x67, 0x69, 0x6e, 0x22, 0x41, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75, - 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, - 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x64, - 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x22, 0x2d, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x6b, 0x75, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x32, 0x59, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, - 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x54, 0x72, - 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, - 0x32, 0x5f, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x72, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, - 0x00, 0x32, 0x31, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x50, 0x61, 0x67, - 0x65, 0x12, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x00, 0x32, 0x5d, 0x0a, 0x11, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x64, - 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x48, 0x0a, 0x11, 0x53, 0x68, 0x6f, - 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x17, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x00, 0x32, 0x51, 0x0a, 0x0e, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x74, 0x53, 0x6b, 0x75, 0x12, 0x3f, 0x0a, 0x0e, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x6f, - 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x52, 0x0a, 0x0d, 0x53, 0x68, 0x6f, 0x77, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x53, 0x6b, 0x75, 0x12, 0x41, 0x0a, 0x0d, 0x53, 0x68, 0x6f, 0x77, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x6b, 0x75, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, - 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, - 0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x43, 0x0a, 0x0c, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x0a, 0x0c, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x0f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, - 0x45, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75, 0x12, 0x38, 0x0a, 0x09, - 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, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x01, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x49, 0x64, 0x12, 0x20, 0x0a, + 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x69, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xe6, 0x01, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x54, + 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, + 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x74, 0x53, 0x6b, 0x75, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x69, + 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, + 0x22, 0xb6, 0x02, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x74, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x12, 0x3d, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, + 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, + 0x10, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x53, 0x69, 0x6d, 0x70, 0x6c, + 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, + 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x73, + 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x3a, 0x0a, 0x18, 0x63, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x18, 0x63, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x53, 0x68, 0x6f, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x43, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2a, 0x0a, + 0x10, 0x69, 0x73, 0x42, 0x65, 0x79, 0x6f, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x42, 0x65, 0x79, 0x6f, 0x6e, + 0x64, 0x4d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x44, 0x22, 0xec, 0x02, 0x0a, 0x07, 0x50, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26, + 0x0a, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x42, 0x75, + 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, + 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x3c, 0x0a, 0x0e, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3f, 0x0a, 0x07, 0x50, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x5e, 0x0a, 0x08, 0x50, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x22, 0xbf, 0x04, 0x0a, 0x0d, 0x50, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, + 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, + 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x63, 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x50, + 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, + 0x69, 0x6e, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x41, 0x72, 0x65, 0x61, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x72, 0x65, 0x61, + 0x50, 0x6f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x42, 0x75, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d, + 0x61, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x49, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x49, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x69, 0x63, + 0x74, 0x75, 0x72, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x22, 0x0a, 0x10, 0x50, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x4f, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x22, 0x9c, 0x01, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x6b, 0x75, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x73, 0x6b, 0x75, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4c, 0x69, 0x73, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, + 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, + 0x73, 0x65, 0x6c, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, + 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x22, + 0x2d, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x71, + 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x22, 0x43, + 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x31, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x53, 0x6b, 0x75, 0x22, 0x1e, 0x0a, 0x08, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, + 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, + 0x75, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x22, 0x41, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x71, + 0x12, 0x31, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x53, 0x6b, 0x75, 0x22, 0x2d, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, 0x75, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x32, 0x55, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, + 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x5b, 0x0a, 0x10, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x47, 0x0a, + 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, + 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x31, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x29, + 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x5d, 0x0a, 0x11, 0x53, 0x68, 0x6f, + 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x48, + 0x0a, 0x11, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x51, 0x0a, 0x0e, 0x53, 0x68, 0x6f, 0x77, + 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x12, 0x3f, 0x0a, 0x0e, 0x53, 0x68, + 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x12, 0x14, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, + 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, 0x52, 0x0a, 0x0d, 0x53, + 0x68, 0x6f, 0x77, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x6b, 0x75, 0x12, 0x41, 0x0a, 0x0d, + 0x53, 0x68, 0x6f, 0x77, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x6b, 0x75, 0x12, 0x17, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x6b, 0x75, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x32, + 0x43, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x33, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, + 0x1a, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x00, 0x32, 0x45, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x6b, + 0x75, 0x12, 0x38, 0x0a, 0x09, 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, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x71, 0x1a, 0x14, 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, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1439,42 +1438,42 @@ func file_trade_proto_rawDescGZIP() []byte { var file_trade_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_trade_proto_goTypes = []interface{}{ - (*TraderOrder)(nil), // 0: proto.TraderOrder - (*AddTraderOrderReq)(nil), // 1: proto.AddTraderOrderReq - (*AddTraderOrderResp)(nil), // 2: proto.AddTraderOrderResp - (*Product)(nil), // 3: proto.Product - (*PageReq)(nil), // 4: proto.PageReq - (*PageResp)(nil), // 5: proto.PageResp - (*ProductDetail)(nil), // 6: proto.ProductDetail - (*ProductDetailReq)(nil), // 7: proto.ProductDetailReq - (*ProductDetailResp)(nil), // 8: proto.ProductDetailResp - (*ProductSku)(nil), // 9: proto.ProductSku - (*ProductSkuReq)(nil), // 10: proto.ProductSkuReq - (*ProductSkuResp)(nil), // 11: proto.ProductSkuResp - (*TokenReq)(nil), // 12: proto.TokenReq - (*TokenResp)(nil), // 13: proto.TokenResp - (*UpdateSkuReq)(nil), // 14: proto.UpdateSkuReq - (*UpdateSkuResp)(nil), // 15: proto.UpdateSkuResp - nil, // 16: proto.Product.LabelListEntry + (*TradeOrder)(nil), // 0: proto.TradeOrder + (*AddTradeOrderReq)(nil), // 1: proto.AddTradeOrderReq + (*AddTradeOrderResp)(nil), // 2: proto.AddTradeOrderResp + (*Product)(nil), // 3: proto.Product + (*PageReq)(nil), // 4: proto.PageReq + (*PageResp)(nil), // 5: proto.PageResp + (*ProductDetail)(nil), // 6: proto.ProductDetail + (*ProductDetailReq)(nil), // 7: proto.ProductDetailReq + (*ProductDetailResp)(nil), // 8: proto.ProductDetailResp + (*ProductSku)(nil), // 9: proto.ProductSku + (*ProductSkuReq)(nil), // 10: proto.ProductSkuReq + (*ProductSkuResp)(nil), // 11: proto.ProductSkuResp + (*TokenReq)(nil), // 12: proto.TokenReq + (*TokenResp)(nil), // 13: proto.TokenResp + (*UpdateSkuReq)(nil), // 14: proto.UpdateSkuReq + (*UpdateSkuResp)(nil), // 15: proto.UpdateSkuResp + nil, // 16: proto.Product.LabelListEntry } var file_trade_proto_depIdxs = []int32{ - 6, // 0: proto.AddTraderOrderResp.productSimple:type_name -> proto.ProductDetail - 9, // 1: proto.AddTraderOrderResp.productSkuSimple:type_name -> proto.ProductSku + 6, // 0: proto.AddTradeOrderResp.productSimple:type_name -> proto.ProductDetail + 9, // 1: proto.AddTradeOrderResp.productSkuSimple:type_name -> proto.ProductSku 16, // 2: proto.Product.labelList:type_name -> proto.Product.LabelListEntry 3, // 3: proto.PageResp.product:type_name -> proto.Product 6, // 4: proto.ProductDetailResp.productDetail:type_name -> proto.ProductDetail 9, // 5: proto.ProductSkuResp.productSku:type_name -> proto.ProductSku 9, // 6: proto.UpdateSkuReq.productSku:type_name -> proto.ProductSku - 1, // 7: proto.AddTraderOrder.AddTraderOrder:input_type -> proto.AddTraderOrderReq - 1, // 8: proto.UpdateTraderOrder.UpdateTraderOrder:input_type -> proto.AddTraderOrderReq + 1, // 7: proto.AddTradeOrder.AddTradeOrder:input_type -> proto.AddTradeOrderReq + 1, // 8: proto.UpdateTradeOrder.UpdateTradeOrder:input_type -> proto.AddTradeOrderReq 4, // 9: proto.Page.Page:input_type -> proto.PageReq 7, // 10: proto.ShowProductDetail.ShowProductDetail:input_type -> proto.ProductDetailReq 10, // 11: proto.ShowProductSku.ShowProductSku:input_type -> proto.ProductSkuReq 7, // 12: proto.ShowDetailSku.ShowDetailSku:input_type -> proto.ProductDetailReq 12, // 13: proto.GetUserToken.GetUserToken:input_type -> proto.TokenReq 14, // 14: proto.UpdateSku.UpdateSku:input_type -> proto.UpdateSkuReq - 2, // 15: proto.AddTraderOrder.AddTraderOrder:output_type -> proto.AddTraderOrderResp - 2, // 16: proto.UpdateTraderOrder.UpdateTraderOrder:output_type -> proto.AddTraderOrderResp + 2, // 15: proto.AddTradeOrder.AddTradeOrder:output_type -> proto.AddTradeOrderResp + 2, // 16: proto.UpdateTradeOrder.UpdateTradeOrder:output_type -> proto.AddTradeOrderResp 5, // 17: proto.Page.Page:output_type -> proto.PageResp 8, // 18: proto.ShowProductDetail.ShowProductDetail:output_type -> proto.ProductDetailResp 11, // 19: proto.ShowProductSku.ShowProductSku:output_type -> proto.ProductSkuResp @@ -1495,7 +1494,7 @@ func file_trade_proto_init() { } if !protoimpl.UnsafeEnabled { file_trade_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TraderOrder); i { + switch v := v.(*TradeOrder); i { case 0: return &v.state case 1: @@ -1507,7 +1506,7 @@ func file_trade_proto_init() { } } file_trade_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddTraderOrderReq); i { + switch v := v.(*AddTradeOrderReq); i { case 0: return &v.state case 1: @@ -1519,7 +1518,7 @@ func file_trade_proto_init() { } } file_trade_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddTraderOrderResp); i { + switch v := v.(*AddTradeOrderResp); i { case 0: return &v.state case 1: diff --git a/trade-order/proto/trade.pb.micro.go b/trade-order/proto/trade.pb.micro.go index a58c4bb..37cad26 100644 --- a/trade-order/proto/trade.pb.micro.go +++ b/trade-order/proto/trade.pb.micro.go @@ -27,34 +27,34 @@ var _ context.Context var _ client.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{} } -// Client API for AddTraderOrder service +// Client API for AddTradeOrder service -type AddTraderOrderService interface { +type AddTradeOrderService interface { // 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 name string } -func NewAddTraderOrderService(name string, c client.Client) AddTraderOrderService { - return &addTraderOrderService{ +func NewAddTradeOrderService(name string, c client.Client) AddTradeOrderService { + return &addTradeOrderService{ c: c, name: name, } } -func (c *addTraderOrderService) AddTraderOrder(ctx context.Context, in *AddTraderOrderReq, opts ...client.CallOption) (*AddTraderOrderResp, error) { - req := c.c.NewRequest(c.name, "AddTraderOrder.AddTraderOrder", in) - out := new(AddTraderOrderResp) +func (c *addTradeOrderService) AddTradeOrder(ctx context.Context, in *AddTradeOrderReq, opts ...client.CallOption) (*AddTradeOrderResp, error) { + req := c.c.NewRequest(c.name, "AddTradeOrder.AddTradeOrder", in) + out := new(AddTradeOrderResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err @@ -62,60 +62,60 @@ func (c *addTraderOrderService) AddTraderOrder(ctx context.Context, in *AddTrade return out, nil } -// Server API for AddTraderOrder service +// Server API for AddTradeOrder service -type AddTraderOrderHandler interface { +type AddTradeOrderHandler interface { // rpc 服务 - AddTraderOrder(context.Context, *AddTraderOrderReq, *AddTraderOrderResp) error + AddTradeOrder(context.Context, *AddTradeOrderReq, *AddTradeOrderResp) error } -func RegisterAddTraderOrderHandler(s server.Server, hdlr AddTraderOrderHandler, opts ...server.HandlerOption) error { - type addTraderOrder interface { - AddTraderOrder(ctx context.Context, in *AddTraderOrderReq, out *AddTraderOrderResp) error +func RegisterAddTradeOrderHandler(s server.Server, hdlr AddTradeOrderHandler, opts ...server.HandlerOption) error { + type addTradeOrder interface { + AddTradeOrder(ctx context.Context, in *AddTradeOrderReq, out *AddTradeOrderResp) error } - type AddTraderOrder struct { - addTraderOrder + type AddTradeOrder struct { + addTradeOrder } - h := &addTraderOrderHandler{hdlr} - return s.Handle(s.NewHandler(&AddTraderOrder{h}, opts...)) + h := &addTradeOrderHandler{hdlr} + return s.Handle(s.NewHandler(&AddTradeOrder{h}, opts...)) } -type addTraderOrderHandler struct { - AddTraderOrderHandler +type addTradeOrderHandler struct { + AddTradeOrderHandler } -func (h *addTraderOrderHandler) AddTraderOrder(ctx context.Context, in *AddTraderOrderReq, out *AddTraderOrderResp) error { - return h.AddTraderOrderHandler.AddTraderOrder(ctx, in, out) +func (h *addTradeOrderHandler) AddTradeOrder(ctx context.Context, in *AddTradeOrderReq, out *AddTradeOrderResp) error { + 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{} } -// Client API for UpdateTraderOrder service +// Client API for UpdateTradeOrder service -type UpdateTraderOrderService interface { +type UpdateTradeOrderService interface { // 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 name string } -func NewUpdateTraderOrderService(name string, c client.Client) UpdateTraderOrderService { - return &updateTraderOrderService{ +func NewUpdateTradeOrderService(name string, c client.Client) UpdateTradeOrderService { + return &updateTradeOrderService{ c: c, name: name, } } -func (c *updateTraderOrderService) UpdateTraderOrder(ctx context.Context, in *AddTraderOrderReq, opts ...client.CallOption) (*AddTraderOrderResp, error) { - req := c.c.NewRequest(c.name, "UpdateTraderOrder.UpdateTraderOrder", in) - out := new(AddTraderOrderResp) +func (c *updateTradeOrderService) UpdateTradeOrder(ctx context.Context, in *AddTradeOrderReq, opts ...client.CallOption) (*AddTradeOrderResp, error) { + req := c.c.NewRequest(c.name, "UpdateTradeOrder.UpdateTradeOrder", in) + out := new(AddTradeOrderResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err @@ -123,30 +123,30 @@ func (c *updateTraderOrderService) UpdateTraderOrder(ctx context.Context, in *Ad return out, nil } -// Server API for UpdateTraderOrder service +// Server API for UpdateTradeOrder service -type UpdateTraderOrderHandler interface { +type UpdateTradeOrderHandler interface { // rpc 服务 - UpdateTraderOrder(context.Context, *AddTraderOrderReq, *AddTraderOrderResp) error + UpdateTradeOrder(context.Context, *AddTradeOrderReq, *AddTradeOrderResp) error } -func RegisterUpdateTraderOrderHandler(s server.Server, hdlr UpdateTraderOrderHandler, opts ...server.HandlerOption) error { - type updateTraderOrder interface { - UpdateTraderOrder(ctx context.Context, in *AddTraderOrderReq, out *AddTraderOrderResp) error +func RegisterUpdateTradeOrderHandler(s server.Server, hdlr UpdateTradeOrderHandler, opts ...server.HandlerOption) error { + type updateTradeOrder interface { + UpdateTradeOrder(ctx context.Context, in *AddTradeOrderReq, out *AddTradeOrderResp) error } - type UpdateTraderOrder struct { - updateTraderOrder + type UpdateTradeOrder struct { + updateTradeOrder } - h := &updateTraderOrderHandler{hdlr} - return s.Handle(s.NewHandler(&UpdateTraderOrder{h}, opts...)) + h := &updateTradeOrderHandler{hdlr} + return s.Handle(s.NewHandler(&UpdateTradeOrder{h}, opts...)) } -type updateTraderOrderHandler struct { - UpdateTraderOrderHandler +type updateTradeOrderHandler struct { + UpdateTradeOrderHandler } -func (h *updateTraderOrderHandler) UpdateTraderOrder(ctx context.Context, in *AddTraderOrderReq, out *AddTraderOrderResp) error { - return h.UpdateTraderOrderHandler.UpdateTraderOrder(ctx, in, out) +func (h *updateTradeOrderHandler) UpdateTradeOrder(ctx context.Context, in *AddTradeOrderReq, out *AddTradeOrderResp) error { + return h.UpdateTradeOrderHandler.UpdateTradeOrder(ctx, in, out) } // Api Endpoints for Page service diff --git a/trade-order/proto/trade.proto b/trade-order/proto/trade.proto index 6ee60dc..cfdc4fb 100644 --- a/trade-order/proto/trade.proto +++ b/trade-order/proto/trade.proto @@ -22,7 +22,7 @@ package proto ; //默认在哪个包 UpdateTime time.Time `json:"updateTime"` IsDeleted bool `json:"isDeleted"` */ -message TraderOrder { +message TradeOrder { int32 id = 1; int32 userId = 2; int32 productId =3; @@ -40,7 +40,7 @@ message TraderOrder { } **/ //请求 request struct -message AddTraderOrderReq { +message AddTradeOrderReq { int32 number = 1; int32 productId = 2; int32 productSkuId =3; @@ -50,7 +50,7 @@ message AddTraderOrderReq { int32 id = 7; } -message AddTraderOrderResp{ +message AddTradeOrderResp{ ProductDetail productSimple = 1; ProductSku productSkuSimple =2; int64 shoppingCartNumber = 3; @@ -59,14 +59,14 @@ message AddTraderOrderResp{ int32 ID = 6; } //RPC 服务 接口 -service AddTraderOrder { +service AddTradeOrder { //rpc 服务 - rpc AddTraderOrder (AddTraderOrderReq) returns (AddTraderOrderResp){} + rpc AddTradeOrder (AddTradeOrderReq) returns (AddTradeOrderResp){} } -service UpdateTraderOrder { +service UpdateTradeOrder { //rpc 服务 - rpc UpdateTraderOrder (AddTraderOrderReq) returns (AddTraderOrderResp){} + rpc UpdateTradeOrder (AddTradeOrderReq) returns (AddTradeOrderResp){} }