refactor: replace GetRandom with IoT sensing data update scenario

This commit is contained in:
2026-07-17 15:51:10 +09:00
parent 50edea0225
commit 902af18555
10 changed files with 446 additions and 346 deletions
+9 -10
View File
@@ -2,23 +2,23 @@ syntax = "proto3";
option go_package = "./protoapi/;protoapi";
service Random {
service IoTService {
rpc GetDate (RequestDateTime) returns (DateTime);
rpc GetRandom (RandomParams) returns (RandomInt);
rpc UpdateSensingData (SensingData) returns (SensingResponse);
rpc GetRandomPass (RequestPass) returns (RandomPass);
}
// For random number
message RandomParams {
int64 Seed = 1;
int64 Place = 2;
message SensingData {
string DeviceId = 1;
double Temperature = 2;
double Humidity = 3;
}
message RandomInt {
int64 Value = 1;
message SensingResponse {
bool Success = 1;
string Message = 2;
}
// For date time
message DateTime {
string Value = 1;
}
@@ -27,7 +27,6 @@ message RequestDateTime {
string Value = 2;
}
// For random password
message RequestPass {
int64 Seed = 1;
int64 Length = 8;