You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
984 B
40 lines
984 B
// Code generated by protoc-gen-bm v0.1, DO NOT EDIT.
|
|
// source: api.proto
|
|
|
|
package api
|
|
|
|
import (
|
|
"context"
|
|
|
|
bm "github.com/bilibili/kratos/pkg/net/http/blademaster"
|
|
"github.com/bilibili/kratos/pkg/net/http/blademaster/binding"
|
|
)
|
|
|
|
// to suppressed 'imported but not used warning'
|
|
var _ *bm.Context
|
|
var _ context.Context
|
|
var _ binding.StructValidator
|
|
|
|
var PathUserInfo = "/user.api.User/Info"
|
|
|
|
// UserBMServer is the server API for User service.
|
|
type UserBMServer interface {
|
|
Info(ctx context.Context, req *UserReq) (resp *InfoReply, err error)
|
|
}
|
|
|
|
var UserSvc UserBMServer
|
|
|
|
func userInfo(c *bm.Context) {
|
|
p := new(UserReq)
|
|
if err := c.BindWith(p, binding.Default(c.Request.Method, c.Request.Header.Get("Content-Type"))); err != nil {
|
|
return
|
|
}
|
|
resp, err := UserSvc.Info(c, p)
|
|
c.JSON(resp, err)
|
|
}
|
|
|
|
// RegisterUserBMServer Register the blademaster route
|
|
func RegisterUserBMServer(e *bm.Engine, server UserBMServer) {
|
|
UserSvc = server
|
|
e.GET("/user.api.User/Info", userInfo)
|
|
}
|
|
|