103 lines
1.9 KiB
Protocol Buffer
103 lines
1.9 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 EmptyRequest {
|
|
|
|
}
|
|
|
|
//message WsStreamFrame {
|
|
// bytes data = 1;
|
|
//}
|
|
|
|
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 Weather(EmptyRequest) returns (Response) {
|
|
option (google.api.http) = {
|
|
get: "/api/v3/percutaneous/weather"
|
|
body: "*"
|
|
};
|
|
}
|
|
// rpc WsTunnelStream(stream WsStreamFrame) returns (stream Response);
|
|
}
|