chore: 并入 iotlcm-upstream-proxy 历史到 upstream-proxy/(原提交 44209ec)

This commit is contained in:
MiFaZhan
2026-11-02 13:28:02 +08:00
117 changed files with 8690 additions and 0 deletions
@@ -0,0 +1,35 @@
package infopb
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-upstream-proxy/internal/pb"
"git.5iot.com/iotlcm-public/iotlcm-upstream-proxy/internal/pub/xjpubservice"
"github.com/gogf/gf/contrib/rpc/grpcx/v2"
"github.com/gogf/gf/v2/frame/g"
)
type Controller struct {
pb.UnimplementedInfoServer
}
func Register(s *grpcx.GrpcServer) {
pb.RegisterInfoServer(s.Server, &Controller{})
}
func (*Controller) Info(ctx context.Context, req *pb.InfoReq) (*pb.InfoRes, error) {
g.Log().Info(ctx, req)
info := xjpubservice.InfoRpc().GetInfo()
return &pb.InfoRes{
Head: &pb.HeadRes{
Code: 0,
Message: "success",
},
Type: info.Type,
Name: info.Name,
Title: info.Title,
Description: info.Description,
Version: info.Version,
}, nil
}