// Code generated by protoc-gen-bm v0.1, DO NOT EDIT. // source: guard.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: guard.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 PathGuardBuy = "/live.xuser.v1.Guard/Buy" var PathGuardGetByUIDTargetID = "/live.xuser.v1.Guard/GetByUIDTargetID" var PathGuardGetByTargetIdsBatch = "/live.xuser.v1.Guard/GetByTargetIdsBatch" var PathGuardGetByUIDTargetIds = "/live.xuser.v1.Guard/GetByUIDTargetIds" var PathGuardGetByUIDForGift = "/live.xuser.v1.Guard/GetByUIDForGift" var PathGuardGetByUIDBatch = "/live.xuser.v1.Guard/GetByUIDBatch" var PathGuardGetAnchorRecentTopGuard = "/live.xuser.v1.Guard/GetAnchorRecentTopGuard" var PathGuardGetTopListGuard = "/live.xuser.v1.Guard/GetTopListGuard" var PathGuardGetTopListGuardNum = "/live.xuser.v1.Guard/GetTopListGuardNum" var PathGuardClearUIDCache = "/live.xuser.v1.Guard/ClearUIDCache" // =============== // Guard Interface // =============== type GuardBMServer interface { // Buy 购买大航海 Buy(ctx context.Context, req *GuardBuyReq) (resp *GuardBuyReply, err error) // GetByUIDTargetID 获取我与目标用户守护关系,不支持批量(P0级) GetByUIDTargetID(ctx context.Context, req *GetByUidTargetIdReq) (resp *GetByUidTargetIdResp, err error) // GetByTargetIdsBatch 获取我与目标用户守护关系,支持批量(P2级,必要时刻降级) GetByTargetIdsBatch(ctx context.Context, req *GetByTargetIdsReq) (resp *GetByTargetIdsResp, err error) // GetByUIDTargetIds 根据uids批量获取所有守护关系,粉丝勋章使用 GetByUIDTargetIds(ctx context.Context, req *GetByUidTargetIdsReq) (resp *GetByUidTargetIdsResp, err error) // GetByUID 获取我所有的守护,不支持批量(P0级) GetByUIDForGift(ctx context.Context, req *GetByUidReq) (resp *GetByUidResp, err error) // GetByUIDBatch 根据uids获取所有的守护,支持批量(P2级) GetByUIDBatch(ctx context.Context, req *GetByUidBatchReq) (resp *GetByUidBatchResp, err error) // GetAnchorRecentTopGuard 获取最近的提督弹窗提醒 GetAnchorRecentTopGuard(ctx context.Context, req *GetAnchorRecentTopGuardReq) (resp *GetAnchorRecentTopGuardResp, err error) // GetTopListGuard 获取某个up主的守护排行榜 GetTopListGuard(ctx context.Context, req *GetTopListGuardReq) (resp *GetTopListGuardResp, err error) // GetTopListGuardNum 获取某个up主所有的守护数量,和GetTopListGuard接口的区别是此接口用于房间页首屏,逻辑比较简单,因此拆分开来 GetTopListGuardNum(ctx context.Context, req *GetTopListGuardNumReq) (resp *GetTopListGuardNumResp, err error) // ClearUIDCache 清除cache ClearUIDCache(ctx context.Context, req *ClearUIDCacheReq) (resp *ClearUIDCacheResp, err error) } var v1GuardSvc GuardBMServer func guardBuy(c *bm.Context) { p := new(GuardBuyReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1GuardSvc.Buy(c, p) c.JSON(resp, err) } func guardGetByUIDTargetID(c *bm.Context) { p := new(GetByUidTargetIdReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1GuardSvc.GetByUIDTargetID(c, p) c.JSON(resp, err) } func guardGetByTargetIdsBatch(c *bm.Context) { p := new(GetByTargetIdsReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1GuardSvc.GetByTargetIdsBatch(c, p) c.JSON(resp, err) } func guardGetByUIDTargetIds(c *bm.Context) { p := new(GetByUidTargetIdsReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1GuardSvc.GetByUIDTargetIds(c, p) c.JSON(resp, err) } func guardGetByUIDForGift(c *bm.Context) { p := new(GetByUidReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1GuardSvc.GetByUIDForGift(c, p) c.JSON(resp, err) } func guardGetByUIDBatch(c *bm.Context) { p := new(GetByUidBatchReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1GuardSvc.GetByUIDBatch(c, p) c.JSON(resp, err) } func guardGetAnchorRecentTopGuard(c *bm.Context) { p := new(GetAnchorRecentTopGuardReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1GuardSvc.GetAnchorRecentTopGuard(c, p) c.JSON(resp, err) } func guardGetTopListGuard(c *bm.Context) { p := new(GetTopListGuardReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1GuardSvc.GetTopListGuard(c, p) c.JSON(resp, err) } func guardGetTopListGuardNum(c *bm.Context) { p := new(GetTopListGuardNumReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1GuardSvc.GetTopListGuardNum(c, p) c.JSON(resp, err) } func guardClearUIDCache(c *bm.Context) { p := new(ClearUIDCacheReq) if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil { return } resp, err := v1GuardSvc.ClearUIDCache(c, p) c.JSON(resp, err) } // RegisterGuardBMServer Register the blademaster route func RegisterGuardBMServer(e *bm.Engine, server GuardBMServer) { v1GuardSvc = server e.GET("/live.xuser.v1.Guard/Buy", guardBuy) e.GET("/live.xuser.v1.Guard/GetByUIDTargetID", guardGetByUIDTargetID) e.GET("/live.xuser.v1.Guard/GetByTargetIdsBatch", guardGetByTargetIdsBatch) e.GET("/live.xuser.v1.Guard/GetByUIDTargetIds", guardGetByUIDTargetIds) e.GET("/live.xuser.v1.Guard/GetByUIDForGift", guardGetByUIDForGift) e.GET("/live.xuser.v1.Guard/GetByUIDBatch", guardGetByUIDBatch) e.GET("/live.xuser.v1.Guard/GetAnchorRecentTopGuard", guardGetAnchorRecentTopGuard) e.GET("/live.xuser.v1.Guard/GetTopListGuard", guardGetTopListGuard) e.GET("/live.xuser.v1.Guard/GetTopListGuardNum", guardGetTopListGuardNum) e.GET("/live.xuser.v1.Guard/ClearUIDCache", guardClearUIDCache) }