sshpoke/pkg/plugin/pb/pb.proto

42 lines
860 B
Protocol Buffer

syntax = "proto3";
import "google/protobuf/empty.proto";
option go_package = "github.com/Neur0toxine/sshpoke/pkg/plugin/pb";
option java_multiple_files = true;
service PluginService {
rpc Event (google.protobuf.Empty) returns (stream EventMessage);
rpc EventStatus (EventStatusMessage) returns (google.protobuf.Empty);
}
enum EventType {
EVENT_START = 0;
EVENT_STOP = 1;
EVENT_SHUTDOWN = 2;
EVENT_ERROR = 3;
EVENT_UNKNOWN = 4;
}
message Container {
string id = 1;
repeated string names = 2;
string ip = 3;
uint32 port = 4;
string server = 5;
string prefix = 6;
string domain = 7;
}
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;
}