37 lines
803 B
Protocol Buffer
37 lines
803 B
Protocol Buffer
|
syntax = "proto3";
|
||
|
import "google/protobuf/empty.proto";
|
||
|
|
||
|
option go_package = "github.com/Neur0toxine/sshpoke/pkg/plugin";
|
||
|
option java_multiple_files = true;
|
||
|
|
||
|
service PluginService {
|
||
|
rpc Event (stream google.protobuf.Empty) returns (stream EventMessage);
|
||
|
rpc EventStatus (EventStatusMessage) returns (google.protobuf.Empty);
|
||
|
rpc Shutdown (stream google.protobuf.Empty) returns (google.protobuf.Empty);
|
||
|
}
|
||
|
|
||
|
enum EventType {
|
||
|
EVENT_START = 0;
|
||
|
EVENT_STOP = 1;
|
||
|
EVENT_UNKNOWN = 2;
|
||
|
}
|
||
|
|
||
|
message Container {
|
||
|
string ip = 1;
|
||
|
uint32 port = 2;
|
||
|
string server = 3;
|
||
|
string prefix = 4;
|
||
|
string domain = 5;
|
||
|
}
|
||
|
|
||
|
message EventMessage {
|
||
|
EventType type = 1;
|
||
|
string id = 2;
|
||
|
Container container = 3;
|
||
|
}
|
||
|
|
||
|
message EventStatusMessage {
|
||
|
string id = 1;
|
||
|
string error = 2;
|
||
|
}
|