go17/skills/protobuf/hello.proto
2025-02-16 16:14:23 +08:00

49 lines
686 B
Protocol Buffer

syntax = "proto3";
package hello;
option go_package="gitlab.com/go-course-project/go17/skills/protobuf";
import "google/protobuf/any.proto";
message HelloRequest {
string my_name = 1;
int64 age = 2;
repeated int64 magic_number = 3;
map<string,string> extras = 4;
}
message HelloResponse {
string message = 1;
}
enum DESCRIBE_BY {
ID = 0;
NAME = 1;
}
enum EVENT_TYPE {
ECS = 0;
RDS = 1;
}
message EVENT_ECS {
string message = 1;
}
message EVENT_RDS {
string message = 1;
}
message Event {
// 事件类型(ECS/RDS/...)
// ECS
EVENT_TYPE type = 1;
string message = 2;
repeated google.protobuf.Any detail = 3;
}