feat: rebind mobile

This commit is contained in:
zzw
2026-10-21 13:29:03 +08:00
parent 113756fd46
commit 6107ac8d9d
47 changed files with 2210 additions and 289 deletions
+159 -3
View File
@@ -23,6 +23,7 @@ const (
Analysis_InternalSetRegistered_FullMethodName = "/analysis.Analysis/InternalSetRegistered"
Analysis_AgreementInfo_FullMethodName = "/analysis.Analysis/AgreementInfo"
Analysis_Switch_FullMethodName = "/analysis.Analysis/Switch"
Analysis_QrcodeInfo_FullMethodName = "/analysis.Analysis/QrcodeInfo"
)
// AnalysisClient is the client API for Analysis service.
@@ -33,6 +34,7 @@ type AnalysisClient interface {
InternalSetRegistered(ctx context.Context, in *InternalSetRegisteredReq, opts ...grpc.CallOption) (*InternalSetRegisteredData, error)
AgreementInfo(ctx context.Context, in *AgreementInfoReq, opts ...grpc.CallOption) (*Response, error)
Switch(ctx context.Context, in *SwitchReq, opts ...grpc.CallOption) (*Response, error)
QrcodeInfo(ctx context.Context, in *QrcodeInfoReq, opts ...grpc.CallOption) (*Response, error)
}
type analysisClient struct {
@@ -83,6 +85,16 @@ func (c *analysisClient) Switch(ctx context.Context, in *SwitchReq, opts ...grpc
return out, nil
}
func (c *analysisClient) QrcodeInfo(ctx context.Context, in *QrcodeInfoReq, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, Analysis_QrcodeInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// AnalysisServer is the server API for Analysis service.
// All implementations must embed UnimplementedAnalysisServer
// for forward compatibility.
@@ -91,6 +103,7 @@ type AnalysisServer interface {
InternalSetRegistered(context.Context, *InternalSetRegisteredReq) (*InternalSetRegisteredData, error)
AgreementInfo(context.Context, *AgreementInfoReq) (*Response, error)
Switch(context.Context, *SwitchReq) (*Response, error)
QrcodeInfo(context.Context, *QrcodeInfoReq) (*Response, error)
mustEmbedUnimplementedAnalysisServer()
}
@@ -113,6 +126,9 @@ func (UnimplementedAnalysisServer) AgreementInfo(context.Context, *AgreementInfo
func (UnimplementedAnalysisServer) Switch(context.Context, *SwitchReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method Switch not implemented")
}
func (UnimplementedAnalysisServer) QrcodeInfo(context.Context, *QrcodeInfoReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method QrcodeInfo not implemented")
}
func (UnimplementedAnalysisServer) mustEmbedUnimplementedAnalysisServer() {}
func (UnimplementedAnalysisServer) testEmbeddedByValue() {}
@@ -206,6 +222,24 @@ func _Analysis_Switch_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler)
}
func _Analysis_QrcodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QrcodeInfoReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AnalysisServer).QrcodeInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Analysis_QrcodeInfo_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AnalysisServer).QrcodeInfo(ctx, req.(*QrcodeInfoReq))
}
return interceptor(ctx, in, info, handler)
}
// Analysis_ServiceDesc is the grpc.ServiceDesc for Analysis service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -229,6 +263,10 @@ var Analysis_ServiceDesc = grpc.ServiceDesc{
MethodName: "Switch",
Handler: _Analysis_Switch_Handler,
},
{
MethodName: "QrcodeInfo",
Handler: _Analysis_QrcodeInfo_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "analysis/analysis.proto",
@@ -932,10 +970,19 @@ var AnalysisStore_ServiceDesc = grpc.ServiceDesc{
Metadata: "analysis/analysis.proto",
}
const (
AnalysisDevice_Policy_FullMethodName = "/analysis.AnalysisDevice/Policy"
AnalysisDevice_Display_FullMethodName = "/analysis.AnalysisDevice/Display"
AnalysisDevice_OssCallback_FullMethodName = "/analysis.AnalysisDevice/OssCallback"
)
// AnalysisDeviceClient is the client API for AnalysisDevice service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type AnalysisDeviceClient interface {
Policy(ctx context.Context, in *DevicePolicyReq, opts ...grpc.CallOption) (*Response, error)
Display(ctx context.Context, in *DeviceDisplayReq, opts ...grpc.CallOption) (*Response, error)
OssCallback(ctx context.Context, in *OssCallbackReq, opts ...grpc.CallOption) (*OssCallbackResp, error)
}
type analysisDeviceClient struct {
@@ -946,10 +993,43 @@ func NewAnalysisDeviceClient(cc grpc.ClientConnInterface) AnalysisDeviceClient {
return &analysisDeviceClient{cc}
}
func (c *analysisDeviceClient) Policy(ctx context.Context, in *DevicePolicyReq, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, AnalysisDevice_Policy_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *analysisDeviceClient) Display(ctx context.Context, in *DeviceDisplayReq, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, AnalysisDevice_Display_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *analysisDeviceClient) OssCallback(ctx context.Context, in *OssCallbackReq, opts ...grpc.CallOption) (*OssCallbackResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(OssCallbackResp)
err := c.cc.Invoke(ctx, AnalysisDevice_OssCallback_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// AnalysisDeviceServer is the server API for AnalysisDevice service.
// All implementations must embed UnimplementedAnalysisDeviceServer
// for forward compatibility.
type AnalysisDeviceServer interface {
Policy(context.Context, *DevicePolicyReq) (*Response, error)
Display(context.Context, *DeviceDisplayReq) (*Response, error)
OssCallback(context.Context, *OssCallbackReq) (*OssCallbackResp, error)
mustEmbedUnimplementedAnalysisDeviceServer()
}
@@ -960,6 +1040,15 @@ type AnalysisDeviceServer interface {
// pointer dereference when methods are called.
type UnimplementedAnalysisDeviceServer struct{}
func (UnimplementedAnalysisDeviceServer) Policy(context.Context, *DevicePolicyReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method Policy not implemented")
}
func (UnimplementedAnalysisDeviceServer) Display(context.Context, *DeviceDisplayReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method Display not implemented")
}
func (UnimplementedAnalysisDeviceServer) OssCallback(context.Context, *OssCallbackReq) (*OssCallbackResp, error) {
return nil, status.Error(codes.Unimplemented, "method OssCallback not implemented")
}
func (UnimplementedAnalysisDeviceServer) mustEmbedUnimplementedAnalysisDeviceServer() {}
func (UnimplementedAnalysisDeviceServer) testEmbeddedByValue() {}
@@ -981,13 +1070,80 @@ func RegisterAnalysisDeviceServer(s grpc.ServiceRegistrar, srv AnalysisDeviceSer
s.RegisterService(&AnalysisDevice_ServiceDesc, srv)
}
func _AnalysisDevice_Policy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DevicePolicyReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AnalysisDeviceServer).Policy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AnalysisDevice_Policy_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AnalysisDeviceServer).Policy(ctx, req.(*DevicePolicyReq))
}
return interceptor(ctx, in, info, handler)
}
func _AnalysisDevice_Display_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeviceDisplayReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AnalysisDeviceServer).Display(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AnalysisDevice_Display_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AnalysisDeviceServer).Display(ctx, req.(*DeviceDisplayReq))
}
return interceptor(ctx, in, info, handler)
}
func _AnalysisDevice_OssCallback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OssCallbackReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AnalysisDeviceServer).OssCallback(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AnalysisDevice_OssCallback_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AnalysisDeviceServer).OssCallback(ctx, req.(*OssCallbackReq))
}
return interceptor(ctx, in, info, handler)
}
// AnalysisDevice_ServiceDesc is the grpc.ServiceDesc for AnalysisDevice service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AnalysisDevice_ServiceDesc = grpc.ServiceDesc{
ServiceName: "analysis.AnalysisDevice",
HandlerType: (*AnalysisDeviceServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{},
Metadata: "analysis/analysis.proto",
Methods: []grpc.MethodDesc{
{
MethodName: "Policy",
Handler: _AnalysisDevice_Policy_Handler,
},
{
MethodName: "Display",
Handler: _AnalysisDevice_Display_Handler,
},
{
MethodName: "OssCallback",
Handler: _AnalysisDevice_OssCallback_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "analysis/analysis.proto",
}