add ws 链接确认
CI / changes (push) Successful in 1m43s
CI / ad (push) Successful in 1s
CI / admin (push) Successful in 0s
CI / bff (push) Successful in 37s
CI / chore (push) Successful in 1s
CI / equipment (push) Successful in 27s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 1s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 36s
CI / product (push) Successful in 0s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 0s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 1s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 1s
CI / changes (push) Successful in 1m43s
CI / ad (push) Successful in 1s
CI / admin (push) Successful in 0s
CI / bff (push) Successful in 37s
CI / chore (push) Successful in 1s
CI / equipment (push) Successful in 27s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 1s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 36s
CI / product (push) Successful in 0s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 0s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 1s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 1s
This commit is contained in:
@@ -569,6 +569,7 @@ func (x *SetPositionRequest) GetSessionId() string {
|
||||
type GetWsCodeRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
|
||||
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -610,6 +611,13 @@ func (x *GetWsCodeRequest) GetType() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetWsCodeRequest) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type EmptyRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -729,12 +737,13 @@ const file_percutaneous_percutaneous_proto_rawDesc = "" +
|
||||
"\x12setPositionRequest\x12\x1a\n" +
|
||||
"\bposition\x18\x02 \x01(\x05R\bposition\x12\x1d\n" +
|
||||
"\n" +
|
||||
"session_id\x18\x04 \x01(\tR\tsessionId\"&\n" +
|
||||
"session_id\x18\x04 \x01(\tR\tsessionId\"?\n" +
|
||||
"\x10getWsCodeRequest\x12\x12\n" +
|
||||
"\x04type\x18\x01 \x01(\x05R\x04type\"\x0e\n" +
|
||||
"\x04type\x18\x01 \x01(\x05R\x04type\x12\x17\n" +
|
||||
"\auser_id\x18\x02 \x01(\x03R\x06userId\"\x0e\n" +
|
||||
"\fEmptyRequest\",\n" +
|
||||
"\x0fWsStreamRequest\x12\x19\n" +
|
||||
"\braw_body\x18\x01 \x01(\fR\arawBody2\xca\a\n" +
|
||||
"\braw_body\x18\x01 \x01(\fR\arawBody2\xbf\b\n" +
|
||||
"\fPercutaneous\x12o\n" +
|
||||
"\tWifiCheck\x12\x1e.percutaneous.WifiCheckRequest\x1a\x16.percutaneous.Response\"*\x82\xd3\xe4\x93\x02$:\x01*\x12\x1f/api/v3/percutaneous/wifi/check\x12i\n" +
|
||||
"\aWifiSet\x12\x1c.percutaneous.WifiSetRequest\x1a\x16.percutaneous.Response\"(\x82\xd3\xe4\x93\x02\":\x01*\"\x1d/api/v3/percutaneous/wifi/set\x12\\\n" +
|
||||
@@ -742,8 +751,9 @@ const file_percutaneous_percutaneous_proto_rawDesc = "" +
|
||||
"\aUsedLog\x12\x1c.percutaneous.UsedLogRequest\x1a\x16.percutaneous.Response\"(\x82\xd3\xe4\x93\x02\":\x01*\x12\x1d/api/v3/percutaneous/used/log\x12i\n" +
|
||||
"\aAddUser\x12\x1c.percutaneous.AddUserRequest\x1a\x16.percutaneous.Response\"(\x82\xd3\xe4\x93\x02\":\x01*\x12\x1d/api/v3/percutaneous/add/user\x12o\n" +
|
||||
"\tUserItems\x12\x1e.percutaneous.UserItemsRequest\x1a\x16.percutaneous.Response\"*\x82\xd3\xe4\x93\x02$:\x01*\x12\x1f/api/v3/percutaneous/user/items\x12u\n" +
|
||||
"\vsetPosition\x12 .percutaneous.setPositionRequest\x1a\x16.percutaneous.Response\",\x82\xd3\xe4\x93\x02&:\x01*\x12!/api/v3/percutaneous/use/position\x12m\n" +
|
||||
"\tgetWsCode\x12\x1e.percutaneous.getWsCodeRequest\x1a\x16.percutaneous.Response\"(\x82\xd3\xe4\x93\x02\":\x01*\x12\x1d/api/v3/percutaneous/get/code\x12S\n" +
|
||||
"\vsetPosition\x12 .percutaneous.setPositionRequest\x1a\x16.percutaneous.Response\",\x82\xd3\xe4\x93\x02&:\x01*\"!/api/v3/percutaneous/use/position\x12m\n" +
|
||||
"\tgetWsCode\x12\x1e.percutaneous.getWsCodeRequest\x1a\x16.percutaneous.Response\"(\x82\xd3\xe4\x93\x02\":\x01*\x12\x1d/api/v3/percutaneous/get/code\x12s\n" +
|
||||
"\x0eWsClientStatus\x12\x1e.percutaneous.getWsCodeRequest\x1a\x16.percutaneous.Response\")\x82\xd3\xe4\x93\x02#:\x01*\x12\x1e/api/v3/percutaneous/ws/status\x12S\n" +
|
||||
"\x0fWsAddUserStream\x12\x1d.percutaneous.WsStreamRequest\x1a\x1d.percutaneous.WsStreamRequest(\x010\x01B\x10Z\x0e./percutaneousb\x06proto3"
|
||||
|
||||
var (
|
||||
@@ -783,18 +793,20 @@ var file_percutaneous_percutaneous_proto_depIdxs = []int32{
|
||||
6, // 5: percutaneous.Percutaneous.UserItems:input_type -> percutaneous.UserItemsRequest
|
||||
9, // 6: percutaneous.Percutaneous.setPosition:input_type -> percutaneous.setPositionRequest
|
||||
10, // 7: percutaneous.Percutaneous.getWsCode:input_type -> percutaneous.getWsCodeRequest
|
||||
12, // 8: percutaneous.Percutaneous.WsAddUserStream:input_type -> percutaneous.WsStreamRequest
|
||||
4, // 9: percutaneous.Percutaneous.WifiCheck:output_type -> percutaneous.Response
|
||||
4, // 10: percutaneous.Percutaneous.WifiSet:output_type -> percutaneous.Response
|
||||
4, // 11: percutaneous.Percutaneous.Use:output_type -> percutaneous.Response
|
||||
4, // 12: percutaneous.Percutaneous.UsedLog:output_type -> percutaneous.Response
|
||||
4, // 13: percutaneous.Percutaneous.AddUser:output_type -> percutaneous.Response
|
||||
4, // 14: percutaneous.Percutaneous.UserItems:output_type -> percutaneous.Response
|
||||
4, // 15: percutaneous.Percutaneous.setPosition:output_type -> percutaneous.Response
|
||||
4, // 16: percutaneous.Percutaneous.getWsCode:output_type -> percutaneous.Response
|
||||
12, // 17: percutaneous.Percutaneous.WsAddUserStream:output_type -> percutaneous.WsStreamRequest
|
||||
9, // [9:18] is the sub-list for method output_type
|
||||
0, // [0:9] is the sub-list for method input_type
|
||||
10, // 8: percutaneous.Percutaneous.WsClientStatus:input_type -> percutaneous.getWsCodeRequest
|
||||
12, // 9: percutaneous.Percutaneous.WsAddUserStream:input_type -> percutaneous.WsStreamRequest
|
||||
4, // 10: percutaneous.Percutaneous.WifiCheck:output_type -> percutaneous.Response
|
||||
4, // 11: percutaneous.Percutaneous.WifiSet:output_type -> percutaneous.Response
|
||||
4, // 12: percutaneous.Percutaneous.Use:output_type -> percutaneous.Response
|
||||
4, // 13: percutaneous.Percutaneous.UsedLog:output_type -> percutaneous.Response
|
||||
4, // 14: percutaneous.Percutaneous.AddUser:output_type -> percutaneous.Response
|
||||
4, // 15: percutaneous.Percutaneous.UserItems:output_type -> percutaneous.Response
|
||||
4, // 16: percutaneous.Percutaneous.setPosition:output_type -> percutaneous.Response
|
||||
4, // 17: percutaneous.Percutaneous.getWsCode:output_type -> percutaneous.Response
|
||||
4, // 18: percutaneous.Percutaneous.WsClientStatus:output_type -> percutaneous.Response
|
||||
12, // 19: percutaneous.Percutaneous.WsAddUserStream:output_type -> percutaneous.WsStreamRequest
|
||||
10, // [10:20] is the sub-list for method output_type
|
||||
0, // [0:10] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
|
||||
@@ -27,6 +27,7 @@ const (
|
||||
Percutaneous_UserItems_FullMethodName = "/percutaneous.Percutaneous/UserItems"
|
||||
Percutaneous_SetPosition_FullMethodName = "/percutaneous.Percutaneous/setPosition"
|
||||
Percutaneous_GetWsCode_FullMethodName = "/percutaneous.Percutaneous/getWsCode"
|
||||
Percutaneous_WsClientStatus_FullMethodName = "/percutaneous.Percutaneous/WsClientStatus"
|
||||
Percutaneous_WsAddUserStream_FullMethodName = "/percutaneous.Percutaneous/WsAddUserStream"
|
||||
)
|
||||
|
||||
@@ -43,6 +44,7 @@ type PercutaneousClient interface {
|
||||
// 使用指南
|
||||
SetPosition(ctx context.Context, in *SetPositionRequest, opts ...grpc.CallOption) (*Response, error)
|
||||
GetWsCode(ctx context.Context, in *GetWsCodeRequest, opts ...grpc.CallOption) (*Response, error)
|
||||
WsClientStatus(ctx context.Context, in *GetWsCodeRequest, opts ...grpc.CallOption) (*Response, error)
|
||||
// 添加用户
|
||||
WsAddUserStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[WsStreamRequest, WsStreamRequest], error)
|
||||
}
|
||||
@@ -135,6 +137,16 @@ func (c *percutaneousClient) GetWsCode(ctx context.Context, in *GetWsCodeRequest
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *percutaneousClient) WsClientStatus(ctx context.Context, in *GetWsCodeRequest, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Percutaneous_WsClientStatus_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *percutaneousClient) WsAddUserStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[WsStreamRequest, WsStreamRequest], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &Percutaneous_ServiceDesc.Streams[0], Percutaneous_WsAddUserStream_FullMethodName, cOpts...)
|
||||
@@ -161,6 +173,7 @@ type PercutaneousServer interface {
|
||||
// 使用指南
|
||||
SetPosition(context.Context, *SetPositionRequest) (*Response, error)
|
||||
GetWsCode(context.Context, *GetWsCodeRequest) (*Response, error)
|
||||
WsClientStatus(context.Context, *GetWsCodeRequest) (*Response, error)
|
||||
// 添加用户
|
||||
WsAddUserStream(grpc.BidiStreamingServer[WsStreamRequest, WsStreamRequest]) error
|
||||
mustEmbedUnimplementedPercutaneousServer()
|
||||
@@ -197,6 +210,9 @@ func (UnimplementedPercutaneousServer) SetPosition(context.Context, *SetPosition
|
||||
func (UnimplementedPercutaneousServer) GetWsCode(context.Context, *GetWsCodeRequest) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetWsCode not implemented")
|
||||
}
|
||||
func (UnimplementedPercutaneousServer) WsClientStatus(context.Context, *GetWsCodeRequest) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method WsClientStatus not implemented")
|
||||
}
|
||||
func (UnimplementedPercutaneousServer) WsAddUserStream(grpc.BidiStreamingServer[WsStreamRequest, WsStreamRequest]) error {
|
||||
return status.Error(codes.Unimplemented, "method WsAddUserStream not implemented")
|
||||
}
|
||||
@@ -365,6 +381,24 @@ func _Percutaneous_GetWsCode_Handler(srv interface{}, ctx context.Context, dec f
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Percutaneous_WsClientStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetWsCodeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PercutaneousServer).WsClientStatus(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Percutaneous_WsClientStatus_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PercutaneousServer).WsClientStatus(ctx, req.(*GetWsCodeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Percutaneous_WsAddUserStream_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(PercutaneousServer).WsAddUserStream(&grpc.GenericServerStream[WsStreamRequest, WsStreamRequest]{ServerStream: stream})
|
||||
}
|
||||
@@ -411,6 +445,10 @@ var Percutaneous_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "getWsCode",
|
||||
Handler: _Percutaneous_GetWsCode_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WsClientStatus",
|
||||
Handler: _Percutaneous_WsClientStatus_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
|
||||
Binary file not shown.
@@ -60,6 +60,7 @@ message setPositionRequest {
|
||||
|
||||
message getWsCodeRequest {
|
||||
int32 type =1;
|
||||
int64 user_id = 2;
|
||||
}
|
||||
|
||||
message EmptyRequest {
|
||||
@@ -124,6 +125,13 @@ service Percutaneous {
|
||||
};
|
||||
}
|
||||
|
||||
rpc WsClientStatus(getWsCodeRequest) returns (Response) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v3/percutaneous/ws/status"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// 添加用户
|
||||
rpc WsAddUserStream(stream WsStreamRequest) returns (stream WsStreamRequest);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user