sshpoke/pkg/plugin/pb/pb.proto

42 lines
865 B
Protocol Buffer
Raw Normal View History

2023-11-17 20:39:00 +03:00
syntax = "proto3";
import "google/protobuf/empty.proto";
option go_package = "github.com/Neur0toxine/sshpoke/pkg/plugin/pb";
2023-11-17 20:39:00 +03:00
option java_multiple_files = true;
service PluginService {
2023-11-17 20:53:52 +03:00
rpc Event (google.protobuf.Empty) returns (stream EventMessage);
2023-11-17 20:39:00 +03:00
rpc EventStatus (EventStatusMessage) returns (google.protobuf.Empty);
}
enum EventType {
EVENT_START = 0;
EVENT_STOP = 1;
EVENT_SHUTDOWN = 2;
EVENT_ERROR = 3;
EVENT_UNKNOWN = 4;
2023-11-17 20:39:00 +03:00
}
message Container {
string id = 1;
repeated string names = 2;
string ip = 3;
uint32 port = 4;
string server = 5;
2023-11-18 21:23:29 +03:00
string remote_host = 6;
string domain = 7;
2023-11-17 20:39:00 +03:00
}
message EventMessage {
EventType type = 1;
string id = 2;
Container container = 3;
}
message EventStatusMessage {
EventType type = 1;
string id = 2;
string error = 3;
string domain = 4;
2023-11-17 20:39:00 +03:00
}