Files
gjs 309d5278cb
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / aiserver (push) Successful in 0s
CI / analysis (push) Successful in 1s
CI / bff (push) Successful in 26s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 1s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 0s
CI / product (push) Successful in 0s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 1s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 0s
CI / water (push) Failing after 8s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
add apis
2026-10-31 10:31:43 +08:00

193 lines
3.7 KiB
Protocol Buffer

syntax = "proto3";
package water;
option go_package="./water";
import "google/api/annotations.proto";
message WifiCheckRequest {
string host_code = 1;
}
message WifiSetRequest {
string host_code = 1;
}
message HostCodeRequest {
string host_code = 1;
}
message LogItemsRequest {
int32 page = 1;
int32 size = 2;
repeated string time = 3;
string host_code = 4;
}
message AddLogRequest {
string host_code = 1;
string time = 2;
int64 salt = 3;
int64 water = 4;
}
message Response {
int32 code = 1;
string msg = 2;
string data = 3;
}
message EmptyRequest {
}
message AddWarningRequest {
string host_code = 1;
string time = 2;
int32 type = 3;
string content = 4;
}
message GetWarningItemsRequest {
int32 page = 1;
int32 size = 2;
string host_code = 3;
int32 type = 4;
}
message WarningStatusRequest {
int64 id = 1;
int32 status = 2;
}
message changeAdminRequest {
string host_code = 1;
int64 user_id = 2;
}
message UsersRequest {
string host_code = 1;
}
message ApplyUserRequest {
string host_code = 1;
int64 user_id = 2;
}
message ApplyStatusRequest {
int64 id = 1;
int32 status = 2;
}
message SettingRequest {
string host_code = 1;
int32 salt_percent =2;
int32 hardness = 3;
string refresh_time = 4;
int32 use_number = 5;
int32 soften = 6;
string no_disturbing = 7;
}
service Water {
rpc WifiCheck(WifiCheckRequest) returns (Response) {
option (google.api.http) = {
get: "/api/v3/water/wifi/check"
body: "*"
};
}
rpc WifiSet(WifiSetRequest) returns (Response) {
option (google.api.http) = {
post: "/api/v3/water/wifi/set"
body: "*"
};
}
rpc AddLog(AddLogRequest) returns (Response) {
option (google.api.http) = {
get: "/api/v3/water/add/log"
body: "*"
};
}
rpc LogItems(LogItemsRequest) returns (Response) {
option (google.api.http) = {
get: "/api/v3/water/log/items"
body: "*"
};
}
rpc Setting(SettingRequest) returns (Response) {
option (google.api.http) = {
get: "/api/v3/water/setting"
body: "*"
};
}
rpc GetSetting(HostCodeRequest) returns (Response) {
option (google.api.http) = {
get: "/api/v3/water/get/setting"
body: "*"
};
}
// 获取月,日量
rpc GetWaterInfo(EmptyRequest) returns (Response) {
option (google.api.http) = {
get: "/api/v3/water/info"
body: "*"
};
}
// 获取 流量计 液位计 侵水计 超声 四种设备异常警告
rpc GetWarning(GetWarningItemsRequest) returns (Response) {
option (google.api.http) = {
get: "/api/v3/water/warning"
body: "*"
};
}
// 添加 流量计 液位计 侵水计 超声 四种设备异常警
rpc AddWarning(AddWarningRequest) returns (Response) {
option (google.api.http) = {
post: "/api/v3/water/warning/add"
body: "*"
};
}
// 状态
rpc WarningStatus(WarningStatusRequest) returns (Response) {
option (google.api.http) = {
post: "/api/v3/water/warning/status"
body: "*"
};
}
// 申请
rpc ApplyUser(ApplyUserRequest) returns (Response) {
option (google.api.http) = {
post: "/api/v3/water/apply"
body: "*"
};
}
// 同意
rpc ApplyStatus(ApplyStatusRequest) returns (Response) {
option (google.api.http) = {
post: "/api/v3/water/apply/status"
body: "*"
};
}
// 转移管理人
rpc changeAdmin(changeAdminRequest) returns (Response) {
option (google.api.http) = {
post: "/api/v3/water/change/admin"
body: "*"
};
}
// 管理人列表
rpc Users(UsersRequest) returns (Response) {
option (google.api.http) = {
post: "/api/v3/water/users"
body: "*"
};
}
}