2023-11-17 20:39:00 +03:00
|
|
|
syntax = "proto3";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
|
2023-11-18 12:36:17 +03:00
|
|
|
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;
|
2023-11-18 12:36:17 +03:00
|
|
|
EVENT_SHUTDOWN = 2;
|
2023-11-18 16:14:39 +03:00
|
|
|
EVENT_ERROR = 3;
|
|
|
|
EVENT_UNKNOWN = 4;
|
2023-11-17 20:39:00 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message Container {
|
2023-11-18 16:14:39 +03:00
|
|
|
string id = 1;
|
|
|
|
repeated string names = 2;
|
|
|
|
string ip = 3;
|
|
|
|
uint32 port = 4;
|
|
|
|
string server = 5;
|
|
|
|
string prefix = 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 {
|
2023-11-18 16:14:39 +03:00
|
|
|
EventType type = 1;
|
|
|
|
string id = 2;
|
|
|
|
string error = 3;
|
|
|
|
string domain = 4;
|
2023-11-17 20:39:00 +03:00
|
|
|
}
|