cc23c30c9e
CI / changes (push) Successful in 1m34s
CI / ad (push) Successful in 27s
CI / admin (push) Successful in 17s
CI / aiserver (push) Successful in 26s
CI / analysis (push) Successful in 22s
CI / bff (push) Successful in 21s
CI / chore (push) Successful in 20s
CI / equipment (push) Successful in 19s
CI / express (push) Successful in 19s
CI / factory (push) Successful in 19s
CI / message (push) Successful in 18s
CI / order (push) Successful in 19s
CI / payment (push) Successful in 17s
CI / percutaneous (push) Successful in 17s
CI / product (push) Successful in 19s
CI / record (push) Successful in 19s
CI / sale (push) Successful in 19s
CI / store (push) Successful in 20s
CI / support (push) Successful in 19s
CI / task (push) Successful in 21s
CI / user (push) Successful in 22s
CI / water (push) Successful in 25s
CI / wecom (push) Successful in 21s
CI / ws (push) Successful in 9s
93 lines
1.7 KiB
Protocol Buffer
93 lines
1.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 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: "*"
|
|
};
|
|
}
|
|
}
|