38cffc2f2a
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
138 lines
2.6 KiB
Protocol Buffer
138 lines
2.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package percutaneous;
|
|
option go_package="./percutaneous";
|
|
import "google/api/annotations.proto";
|
|
|
|
|
|
message WifiCheckRequest {
|
|
string host_code = 1;
|
|
}
|
|
|
|
message WifiSetRequest {
|
|
string host_code = 1;
|
|
}
|
|
|
|
message UseRequest {
|
|
string host_code = 1;
|
|
int64 user_id = 2;
|
|
string data = 3;
|
|
string stamp = 4;
|
|
int32 position = 5;
|
|
}
|
|
|
|
message UsedLogRequest {
|
|
int32 page = 1;
|
|
int32 size = 2;
|
|
string stamp = 3;
|
|
}
|
|
|
|
message Response {
|
|
int32 code = 1;
|
|
string msg = 2;
|
|
string data = 3;
|
|
}
|
|
|
|
message AddUserRequest {
|
|
string host_code = 1;
|
|
int64 user_id = 2;
|
|
}
|
|
|
|
message UserItemsRequest {
|
|
string host_code = 1;
|
|
int32 page = 2;
|
|
int32 size = 3;
|
|
}
|
|
|
|
message LoginQRRequest {
|
|
string host_code = 1;
|
|
string bluetooth = 2;
|
|
}
|
|
|
|
message AddUserQRRequest {
|
|
string host_code = 1;
|
|
}
|
|
|
|
message setPositionRequest {
|
|
int32 position =2;
|
|
string session_id =4;
|
|
}
|
|
|
|
message getWsCodeRequest {
|
|
int32 type =1;
|
|
int64 user_id = 2;
|
|
}
|
|
|
|
message EmptyRequest {
|
|
|
|
}
|
|
|
|
message WsStreamRequest {
|
|
bytes raw_body = 1; // websocket原始业务报文,不做解析
|
|
}
|
|
|
|
service Percutaneous {
|
|
rpc WifiCheck(WifiCheckRequest) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/api/v3/percutaneous/wifi/check"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc WifiSet(WifiSetRequest) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/percutaneous/wifi/set"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Use(UseRequest) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/percutaneous/use"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc UsedLog(UsedLogRequest) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/api/v3/percutaneous/used/log"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc AddUser(AddUserRequest) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/api/v3/percutaneous/add/user"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc UserItems(UserItemsRequest) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/api/v3/percutaneous/user/items"
|
|
body: "*"
|
|
};
|
|
}
|
|
// 使用指南
|
|
rpc setPosition(setPositionRequest) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v3/percutaneous/use/position"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc getWsCode(getWsCodeRequest) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/api/v3/percutaneous/get/code"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc WsClientStatus(getWsCodeRequest) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/api/v3/percutaneous/ws/status"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
// 添加用户
|
|
rpc WsAddUserStream(stream WsStreamRequest) returns (stream WsStreamRequest);
|
|
}
|