Create & Init Project...
This commit is contained in:
122
app/service/live/xrewardcenter/api/grpc/v1/AnchorReward.bm.go
Normal file
122
app/service/live/xrewardcenter/api/grpc/v1/AnchorReward.bm.go
Normal file
@ -0,0 +1,122 @@
|
||||
// Code generated by protoc-gen-bm v0.1, DO NOT EDIT.
|
||||
// source: api/grpc/v1/AnchorReward.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/grpc/v1/AnchorReward.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
|
||||
|
||||
// ======================
|
||||
// AnchorReward Interface
|
||||
// ======================
|
||||
|
||||
type AnchorReward interface {
|
||||
// (主播侧)-我的主播奖励(登录态)
|
||||
// `method:"POST" internal:"true"`
|
||||
MyReward(ctx context.Context, req *AnchorTaskMyRewardReq) (resp *AnchorTaskMyRewardResp, err error)
|
||||
|
||||
// * (主播侧)-奖励使用记录(登录态)
|
||||
//
|
||||
UseRecord(ctx context.Context, req *AnchorTaskUseRecordReq) (resp *AnchorTaskUseRecordResp, err error)
|
||||
|
||||
// * (主播侧)-使用奖励(登录态)
|
||||
//
|
||||
UseReward(ctx context.Context, req *AnchorTaskUseRewardReq) (resp *AnchorTaskUseRewardResp, err error)
|
||||
|
||||
// * (主播侧)-奖励和任务红点(登录态)
|
||||
//
|
||||
IsViewed(ctx context.Context, req *AnchorTaskIsViewedReq) (resp *AnchorTaskIsViewedResp, err error)
|
||||
|
||||
// (主播侧)-添加主播奖励(内部接口)
|
||||
// `method:"POST" internal:"true"`
|
||||
AddReward(ctx context.Context, req *AnchorTaskAddRewardReq) (resp *AnchorTaskAddRewardResp, err error)
|
||||
}
|
||||
|
||||
var v1AnchorRewardSvc AnchorReward
|
||||
|
||||
// @params AnchorTaskMyRewardReq
|
||||
// @router POST /xlive/internal/xrewardcenter/v1/anchorReward/myReward
|
||||
// @response AnchorTaskMyRewardResp
|
||||
func anchorRewardMyReward(c *bm.Context) {
|
||||
p := new(AnchorTaskMyRewardReq)
|
||||
if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
|
||||
return
|
||||
}
|
||||
resp, err := v1AnchorRewardSvc.MyReward(c, p)
|
||||
c.JSON(resp, err)
|
||||
}
|
||||
|
||||
// @params AnchorTaskUseRecordReq
|
||||
// @router GET /xlive/xrewardcenter/v1/anchorReward/useRecord
|
||||
// @response AnchorTaskUseRecordResp
|
||||
func anchorRewardUseRecord(c *bm.Context) {
|
||||
p := new(AnchorTaskUseRecordReq)
|
||||
if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
|
||||
return
|
||||
}
|
||||
resp, err := v1AnchorRewardSvc.UseRecord(c, p)
|
||||
c.JSON(resp, err)
|
||||
}
|
||||
|
||||
// @params AnchorTaskUseRewardReq
|
||||
// @router GET /xlive/xrewardcenter/v1/anchorReward/useReward
|
||||
// @response AnchorTaskUseRewardResp
|
||||
func anchorRewardUseReward(c *bm.Context) {
|
||||
p := new(AnchorTaskUseRewardReq)
|
||||
if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
|
||||
return
|
||||
}
|
||||
resp, err := v1AnchorRewardSvc.UseReward(c, p)
|
||||
c.JSON(resp, err)
|
||||
}
|
||||
|
||||
// @params AnchorTaskIsViewedReq
|
||||
// @router GET /xlive/xrewardcenter/v1/anchorReward/isViewed
|
||||
// @response AnchorTaskIsViewedResp
|
||||
func anchorRewardIsViewed(c *bm.Context) {
|
||||
p := new(AnchorTaskIsViewedReq)
|
||||
if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
|
||||
return
|
||||
}
|
||||
resp, err := v1AnchorRewardSvc.IsViewed(c, p)
|
||||
c.JSON(resp, err)
|
||||
}
|
||||
|
||||
// @params AnchorTaskAddRewardReq
|
||||
// @router POST /xlive/internal/xrewardcenter/v1/anchorReward/addReward
|
||||
// @response AnchorTaskAddRewardResp
|
||||
func anchorRewardAddReward(c *bm.Context) {
|
||||
p := new(AnchorTaskAddRewardReq)
|
||||
if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
|
||||
return
|
||||
}
|
||||
resp, err := v1AnchorRewardSvc.AddReward(c, p)
|
||||
c.JSON(resp, err)
|
||||
}
|
||||
|
||||
// RegisterV1AnchorRewardService Register the blademaster route with middleware map
|
||||
// midMap is the middleware map, the key is defined in proto
|
||||
func RegisterV1AnchorRewardService(e *bm.Engine, svc AnchorReward, midMap map[string]bm.HandlerFunc) {
|
||||
v1AnchorRewardSvc = svc
|
||||
e.POST("/xlive/internal/xrewardcenter/v1/anchorReward/myReward", anchorRewardMyReward)
|
||||
e.GET("/xlive/xrewardcenter/v1/anchorReward/useRecord", anchorRewardUseRecord)
|
||||
e.GET("/xlive/xrewardcenter/v1/anchorReward/useReward", anchorRewardUseReward)
|
||||
e.GET("/xlive/xrewardcenter/v1/anchorReward/isViewed", anchorRewardIsViewed)
|
||||
e.POST("/xlive/internal/xrewardcenter/v1/anchorReward/addReward", anchorRewardAddReward)
|
||||
}
|
Reference in New Issue
Block a user