|
@@ -0,0 +1,31 @@
|
|
|
+syntax = "proto3";
|
|
|
+
|
|
|
+import "google/api/annotations.proto";
|
|
|
+import "google/protobuf/descriptor.proto";
|
|
|
+import "protoc-gen-openapiv2/options/annotations.proto";
|
|
|
+
|
|
|
+option go_package = "your/v1";
|
|
|
+option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
|
|
+ info : {title : "换电柜", version : "1.0", description : "换电柜模块"}
|
|
|
+ host : ""
|
|
|
+};
|
|
|
+
|
|
|
+// 大屏监控数据统计
|
|
|
+service CabinetService {
|
|
|
+ // 变更启用禁用状态
|
|
|
+ rpc ChangeEnable(ChangeEnableReq) returns (ChangeEnableRes) {
|
|
|
+ option (google.api.http) = {
|
|
|
+ post : "/cabinet/change-enable",
|
|
|
+ body : "*",
|
|
|
+ };
|
|
|
+ };
|
|
|
+}
|
|
|
+
|
|
|
+message ChangeEnableReq {
|
|
|
+ // 机柜id
|
|
|
+ string dev_id = 1;
|
|
|
+ // 状态 1启用 2禁用
|
|
|
+ int32 enable = 2;
|
|
|
+}
|
|
|
+message ChangeEnableRes {
|
|
|
+}
|