go-common/app/service/live/resource/api/grpc/v1/livecheck.bm.go
2019-04-22 18:49:16 +08:00

84 lines
2.3 KiB
Go

// Code generated by protoc-gen-bm v0.1, DO NOT EDIT.
// source: api/grpc/v1/livecheck.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/livecheck.proto
*/
package v1
import (
"context"
bm "go-common/library/net/http/blademaster"
)
// to suppressed 'imported but not used warning'
var _ *bm.Context
var _ context.Context
// ===================
// LiveCheck Interface
// ===================
type LiveCheck interface {
// 客户端获取能否直播接口
LiveCheck(ctx context.Context, req *LiveCheckReq) (resp *LiveCheckResp, err error)
// 后台查询所有配置设备黑名单
GetLiveCheckList(ctx context.Context, req *GetLiveCheckListReq) (resp *GetLiveCheckListResp, err error)
// 后台添加能否直播设备黑名单
AddLiveCheck(ctx context.Context, req *AddLiveCheckReq) (resp *AddLiveCheckResp, err error)
}
var v1LiveCheckSvc LiveCheck
// @params LiveCheckReq
// @router GET /xlive/resource/v1/liveCheck/LiveCheck
// @response LiveCheckResp
func liveCheckLiveCheck(c *bm.Context) {
p := new(LiveCheckReq)
if err := c.Bind(p); err != nil {
return
}
resp, err := v1LiveCheckSvc.LiveCheck(c, p)
c.JSON(resp, err)
}
// @params GetLiveCheckListReq
// @router GET /xlive/resource/v1/liveCheck/GetLiveCheckList
// @response GetLiveCheckListResp
func liveCheckGetLiveCheckList(c *bm.Context) {
p := new(GetLiveCheckListReq)
if err := c.Bind(p); err != nil {
return
}
resp, err := v1LiveCheckSvc.GetLiveCheckList(c, p)
c.JSON(resp, err)
}
// @params AddLiveCheckReq
// @router GET /xlive/resource/v1/liveCheck/AddLiveCheck
// @response AddLiveCheckResp
func liveCheckAddLiveCheck(c *bm.Context) {
p := new(AddLiveCheckReq)
if err := c.Bind(p); err != nil {
return
}
resp, err := v1LiveCheckSvc.AddLiveCheck(c, p)
c.JSON(resp, err)
}
// RegisterV1LiveCheckService Register the blademaster route with middleware map
// midMap is the middleware map, the key is defined in proto
func RegisterV1LiveCheckService(e *bm.Engine, svc LiveCheck, midMap map[string]bm.HandlerFunc) {
v1LiveCheckSvc = svc
e.GET("/xlive/resource/v1/liveCheck/LiveCheck", liveCheckLiveCheck)
e.GET("/xlive/resource/v1/liveCheck/GetLiveCheckList", liveCheckGetLiveCheckList)
e.GET("/xlive/resource/v1/liveCheck/AddLiveCheck", liveCheckAddLiveCheck)
}