feat: rebind mobile
This commit is contained in:
@@ -19,6 +19,7 @@ type (
|
||||
InternalCreateUserReq = analysis.InternalCreateUserReq
|
||||
InternalSetRegisteredData = analysis.InternalSetRegisteredData
|
||||
InternalSetRegisteredReq = analysis.InternalSetRegisteredReq
|
||||
QrcodeInfoReq = analysis.QrcodeInfoReq
|
||||
Response = analysis.Response
|
||||
SwitchReq = analysis.SwitchReq
|
||||
|
||||
@@ -27,6 +28,7 @@ type (
|
||||
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)
|
||||
}
|
||||
|
||||
defaultAnalysis struct {
|
||||
@@ -59,3 +61,8 @@ func (m *defaultAnalysis) Switch(ctx context.Context, in *SwitchReq, opts ...grp
|
||||
client := analysis.NewAnalysisClient(m.cli.Conn())
|
||||
return client.Switch(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultAnalysis) QrcodeInfo(ctx context.Context, in *QrcodeInfoReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
client := analysis.NewAnalysisClient(m.cli.Conn())
|
||||
return client.QrcodeInfo(ctx, in, opts...)
|
||||
}
|
||||
|
||||
@@ -5,11 +5,25 @@
|
||||
package analysisdevice
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"lone-services/rpc/analysis/pb"
|
||||
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type (
|
||||
DeviceDisplayReq = analysis.DeviceDisplayReq
|
||||
DevicePolicyReq = analysis.DevicePolicyReq
|
||||
OssCallbackReq = analysis.OssCallbackReq
|
||||
OssCallbackResp = analysis.OssCallbackResp
|
||||
Response = analysis.Response
|
||||
|
||||
AnalysisDevice 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)
|
||||
}
|
||||
|
||||
defaultAnalysisDevice struct {
|
||||
@@ -22,3 +36,18 @@ func NewAnalysisDevice(cli zrpc.Client) AnalysisDevice {
|
||||
cli: cli,
|
||||
}
|
||||
}
|
||||
|
||||
func (m *defaultAnalysisDevice) Policy(ctx context.Context, in *DevicePolicyReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
client := analysis.NewAnalysisDeviceClient(m.cli.Conn())
|
||||
return client.Policy(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultAnalysisDevice) Display(ctx context.Context, in *DeviceDisplayReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
client := analysis.NewAnalysisDeviceClient(m.cli.Conn())
|
||||
return client.Display(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultAnalysisDevice) OssCallback(ctx context.Context, in *OssCallbackReq, opts ...grpc.CallOption) (*OssCallbackResp, error) {
|
||||
client := analysis.NewAnalysisDeviceClient(m.cli.Conn())
|
||||
return client.OssCallback(ctx, in, opts...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user