refactor: move protoapi.proto to examples/grpcentity and update paths
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
학습의 일관성을 위해, 이 실습의 상세 분석 및 개념 명세는 통합 교재의 gRPC 심화 가이드인 **[docs/GRPC.md](../../docs/GRPC.md)**로 모듈화되어 있습니다. 전체 학습 로드맵은 [docs/MANUSCRIPT.md](../../docs/MANUSCRIPT.md)를 참고하십시오.
|
||||
|
||||
[docs/GRPC.md](../../docs/GRPC.md) 문서에서 다음 내용을 참고하실 수 있습니다:
|
||||
* **IDL (`protoapi.proto`) 명세 및 필드 분석**
|
||||
* **IDL ([protoapi.proto](./protoapi.proto)) 명세 및 필드 분석**
|
||||
* **Go에서의 `protoc` 설치 및 Stub 파일 컴파일 방법**
|
||||
* **gRPC 서버 코드 ([server.go](./server.go)) 구현 상세 분석**
|
||||
* **gRPC 클라이언트 코드 ([client.go](./client.go)) 커넥션 및 호출 흐름 분석**
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "./protoapi/;protoapi";
|
||||
|
||||
service IoTService {
|
||||
rpc GetDate (RequestDateTime) returns (DateTime);
|
||||
rpc UpdateSensingData (SensingData) returns (SensingResponse);
|
||||
rpc GetRandomPass (RequestPass) returns (RandomPass);
|
||||
}
|
||||
|
||||
message SensingData {
|
||||
string DeviceId = 1;
|
||||
double Temperature = 2;
|
||||
double Humidity = 3;
|
||||
}
|
||||
|
||||
message SensingResponse {
|
||||
bool Success = 1;
|
||||
string Message = 2;
|
||||
}
|
||||
|
||||
message DateTime {
|
||||
string Value = 1;
|
||||
}
|
||||
|
||||
message RequestDateTime {
|
||||
string Value = 2;
|
||||
}
|
||||
|
||||
message RequestPass {
|
||||
int64 Seed = 1;
|
||||
int64 Length = 8;
|
||||
}
|
||||
|
||||
message RandomPass {
|
||||
string Password = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user