// Code generated by protoc-gen-bm v0.1, DO NOT EDIT. // source: api.proto /* Package v1 is a generated blademaster stub package. This code was generated with go-common/app/tool/bmgen/protoc-gen-bm v0.1. It is generated from these files: api.proto */ package v1 import ( "context" bm "go-common/library/net/http/blademaster" "go-common/library/net/http/blademaster/binding" ) // to suppressed 'imported but not used warning' var _ *bm.Context var _ context.Context var _ binding.StructValidator var PathCapsuleGetDetail = "/live.xlottery.v1.Capsule/get_detail" var PathCapsuleOpenCapsule = "/live.xlottery.v1.Capsule/open_capsule" var PathCapsuleGetCoinList = "/live.xlottery.v1.Capsule/get_coin_list" var PathCapsuleUpdateCoinConfig = "/live.xlottery.v1.Capsule/update_coin_config" var PathCapsuleUpdateCoinStatus = "/live.xlottery.v1.Capsule/update_coin_status" var PathCapsuleDeleteCoin = "/live.xlottery.v1.Capsule/delete_coin" var PathCapsuleGetPoolList = "/live.xlottery.v1.Capsule/get_pool_list" var PathCapsuleUpdatePool = "/live.xlottery.v1.Capsule/update_pool" var PathCapsuleDeletePool = "/live.xlottery.v1.Capsule/delete_pool" var PathCapsuleUpdatePoolStatus = "/live.xlottery.v1.Capsule/update_pool_status" var PathCapsuleGetPoolPrize = "/live.xlottery.v1.Capsule/get_pool_prize" var PathCapsuleGetPrizeType = "/live.xlottery.v1.Capsule/get_prize_type" var PathCapsuleGetPrizeExpire = "/live.xlottery.v1.Capsule/get_prize_expire" var PathCapsuleUpdatePoolPrize = "/live.xlottery.v1.Capsule/update_pool_prize" var PathCapsuleDeletePoolPrize = "/live.xlottery.v1.Capsule/delete_pool_prize" var PathCapsuleGetCapsuleInfo = "/live.xlottery.v1.Capsule/get_capsule_info" var PathCapsuleOpenCapsuleByType = "/live.xlottery.v1.Capsule/open_capsule_by_type" var PathCapsuleGetCouponList = "/live.xlottery.v1.Capsule/get_coupon_list" var PathStormStart = "/live.xlottery.v1.Storm/Start" var PathStormCanStart = "/live.xlottery.v1.Storm/CanStart" var PathStormJoin = "/live.xlottery.v1.Storm/Join" var PathStormCheck = "/live.xlottery.v1.Storm/Check" // ================= // Capsule Interface // ================= type CapsuleBMServer interface { GetDetail(ctx context.Context, req *CapsuleGetDetailReq) (resp *CapsuleGetDetailResp, err error) OpenCapsule(ctx context.Context, req *CapsuleOpenCapsuleReq) (resp *CapsuleOpenCapsuleResp, err error) GetCoinList(ctx context.Context, req *GetCoinListReq) (resp *GetCoinListResp, err error) UpdateCoinConfig(ctx context.Context, req *UpdateCoinConfigReq) (resp *UpdateCoinConfigResp, err error) UpdateCoinStatus(ctx context.Context, req *UpdateCoinStatusReq) (resp *UpdateCoinStatusResp, err error) DeleteCoin(ctx context.Context, req *DeleteCoinReq) (resp *DeleteCoinResp, err error) GetPoolList(ctx context.Context, req *GetPoolListReq) (resp *GetPoolListResp, err error) UpdatePool(ctx context.Context, req *UpdatePoolReq) (resp *UpdatePoolResp, err error) DeletePool(ctx context.Context, req *DeletePoolReq) (resp *DeletePoolResp, err error) UpdatePoolStatus(ctx context.Context, req *UpdatePoolStatusReq) (resp *UpdatePoolStatusResp, err error) GetPoolPrize(ctx context.Context, req *GetPoolPrizeReq) (resp *GetPoolPrizeResp, err error) GetPrizeType(ctx context.Context, req *GetPrizeTypeReq) (resp *GetPrizeTypeResp, err error) GetPrizeExpire(ctx context.Context, req *GetPrizeExpireReq) (resp *GetPrizeExpireResp, err error) UpdatePoolPrize(ctx context.Context, req *UpdatePoolPrizeReq) (resp *UpdatePoolPrizeResp, err error) DeletePoolPrize(ctx context.Context, req *DeletePoolPrizeReq) (resp *DeletePoolPrizeResp, err error) GetCapsuleInfo(ctx context.Context, req *CapsuleGetCapsuleInfoReq) (resp *CapsuleGetCapsuleInfoResp, err error) OpenCapsuleByType(ctx context.Context, req *CapsuleOpenCapsuleByTypeReq) (resp *CapsuleOpenCapsuleByTypeResp, err error) GetCouponList(ctx context.Context, req *CapsuleGetCouponListReq) (resp *CapsuleGetCouponListResp, err error) } var v1CapsuleSvc CapsuleBMServer func capsuleGetDetail(c *bm.Context) { p := new(CapsuleGetDetailReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.GetDetail(c, p) c.JSON(resp, err) } func capsuleOpenCapsule(c *bm.Context) { p := new(CapsuleOpenCapsuleReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.OpenCapsule(c, p) c.JSON(resp, err) } func capsuleGetCoinList(c *bm.Context) { p := new(GetCoinListReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.GetCoinList(c, p) c.JSON(resp, err) } func capsuleUpdateCoinConfig(c *bm.Context) { p := new(UpdateCoinConfigReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.UpdateCoinConfig(c, p) c.JSON(resp, err) } func capsuleUpdateCoinStatus(c *bm.Context) { p := new(UpdateCoinStatusReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.UpdateCoinStatus(c, p) c.JSON(resp, err) } func capsuleDeleteCoin(c *bm.Context) { p := new(DeleteCoinReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.DeleteCoin(c, p) c.JSON(resp, err) } func capsuleGetPoolList(c *bm.Context) { p := new(GetPoolListReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.GetPoolList(c, p) c.JSON(resp, err) } func capsuleUpdatePool(c *bm.Context) { p := new(UpdatePoolReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.UpdatePool(c, p) c.JSON(resp, err) } func capsuleDeletePool(c *bm.Context) { p := new(DeletePoolReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.DeletePool(c, p) c.JSON(resp, err) } func capsuleUpdatePoolStatus(c *bm.Context) { p := new(UpdatePoolStatusReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.UpdatePoolStatus(c, p) c.JSON(resp, err) } func capsuleGetPoolPrize(c *bm.Context) { p := new(GetPoolPrizeReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.GetPoolPrize(c, p) c.JSON(resp, err) } func capsuleGetPrizeType(c *bm.Context) { p := new(GetPrizeTypeReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.GetPrizeType(c, p) c.JSON(resp, err) } func capsuleGetPrizeExpire(c *bm.Context) { p := new(GetPrizeExpireReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.GetPrizeExpire(c, p) c.JSON(resp, err) } func capsuleUpdatePoolPrize(c *bm.Context) { p := new(UpdatePoolPrizeReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.UpdatePoolPrize(c, p) c.JSON(resp, err) } func capsuleDeletePoolPrize(c *bm.Context) { p := new(DeletePoolPrizeReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.DeletePoolPrize(c, p) c.JSON(resp, err) } func capsuleGetCapsuleInfo(c *bm.Context) { p := new(CapsuleGetCapsuleInfoReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.GetCapsuleInfo(c, p) c.JSON(resp, err) } func capsuleOpenCapsuleByType(c *bm.Context) { p := new(CapsuleOpenCapsuleByTypeReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.OpenCapsuleByType(c, p) c.JSON(resp, err) } func capsuleGetCouponList(c *bm.Context) { p := new(CapsuleGetCouponListReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1CapsuleSvc.GetCouponList(c, p) c.JSON(resp, err) } // RegisterCapsuleBMServer Register the blademaster route func RegisterCapsuleBMServer(e *bm.Engine, server CapsuleBMServer) { v1CapsuleSvc = server e.GET("/live.xlottery.v1.Capsule/get_detail", capsuleGetDetail) e.GET("/live.xlottery.v1.Capsule/open_capsule", capsuleOpenCapsule) e.GET("/live.xlottery.v1.Capsule/get_coin_list", capsuleGetCoinList) e.GET("/live.xlottery.v1.Capsule/update_coin_config", capsuleUpdateCoinConfig) e.GET("/live.xlottery.v1.Capsule/update_coin_status", capsuleUpdateCoinStatus) e.GET("/live.xlottery.v1.Capsule/delete_coin", capsuleDeleteCoin) e.GET("/live.xlottery.v1.Capsule/get_pool_list", capsuleGetPoolList) e.GET("/live.xlottery.v1.Capsule/update_pool", capsuleUpdatePool) e.GET("/live.xlottery.v1.Capsule/delete_pool", capsuleDeletePool) e.GET("/live.xlottery.v1.Capsule/update_pool_status", capsuleUpdatePoolStatus) e.GET("/live.xlottery.v1.Capsule/get_pool_prize", capsuleGetPoolPrize) e.GET("/live.xlottery.v1.Capsule/get_prize_type", capsuleGetPrizeType) e.GET("/live.xlottery.v1.Capsule/get_prize_expire", capsuleGetPrizeExpire) e.GET("/live.xlottery.v1.Capsule/update_pool_prize", capsuleUpdatePoolPrize) e.GET("/live.xlottery.v1.Capsule/delete_pool_prize", capsuleDeletePoolPrize) e.GET("/live.xlottery.v1.Capsule/get_capsule_info", capsuleGetCapsuleInfo) e.GET("/live.xlottery.v1.Capsule/open_capsule_by_type", capsuleOpenCapsuleByType) e.GET("/live.xlottery.v1.Capsule/get_coupon_list", capsuleGetCouponList) } // =============== // Storm Interface // =============== // 节奏风暴 服务 type StormBMServer interface { // 开启节奏风暴 Start(ctx context.Context, req *StartStormReq) (resp *StartStormResp, err error) // 节奏风暴是否能开启 CanStart(ctx context.Context, req *StartStormReq) (resp *CanStartStormResp, err error) // 加入节奏风暴 Join(ctx context.Context, req *JoinStormReq) (resp *JoinStormResp, err error) // 检查是否加入节奏风暴 Check(ctx context.Context, req *CheckStormReq) (resp *CheckStormResp, err error) } var v1StormSvc StormBMServer func stormStart(c *bm.Context) { p := new(StartStormReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1StormSvc.Start(c, p) c.JSON(resp, err) } func stormCanStart(c *bm.Context) { p := new(StartStormReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1StormSvc.CanStart(c, p) c.JSON(resp, err) } func stormJoin(c *bm.Context) { p := new(JoinStormReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1StormSvc.Join(c, p) c.JSON(resp, err) } func stormCheck(c *bm.Context) { p := new(CheckStormReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1StormSvc.Check(c, p) c.JSON(resp, err) } // RegisterStormBMServer Register the blademaster route func RegisterStormBMServer(e *bm.Engine, server StormBMServer) { v1StormSvc = server e.GET("/live.xlottery.v1.Storm/Start", stormStart) e.GET("/live.xlottery.v1.Storm/CanStart", stormCanStart) e.GET("/live.xlottery.v1.Storm/Join", stormJoin) e.GET("/live.xlottery.v1.Storm/Check", stormCheck) }