Nexus/pkg/proto/command.proto

44 lines
885 B
Protocol Buffer
Raw Permalink Normal View History

syntax = "proto3";
option go_package = ".;proto";
package proto;
2024-10-21 14:07:36 +00:00
service CommandProvider {
rpc AddCommand(CommandInfo) returns (AddCommandResponse) {}
rpc RemoveCommand(CommandLookupRequest) returns (RemoveCommandResponse) {}
rpc SendCommand(CommandArgument) returns (CommandReturn) {}
rpc SendStreamCommand(stream CommandArgument) returns (stream CommandReturn) {}
}
message CommandInfo {
string id = 1;
string method = 2;
repeated string tags = 3;
}
message CommandLookupRequest {
string id = 1;
string method = 2;
}
message AddCommandResponse {
bool is_success = 1;
}
message RemoveCommandResponse {
bool is_success = 1;
}
message CommandArgument {
string command = 1;
string method = 2;
optional bytes payload = 3;
}
message CommandReturn {
2024-10-20 09:23:53 +00:00
bool is_delivered = 1;
int32 status = 2;
2024-10-20 10:13:07 +00:00
string content_type = 3;
optional bytes payload = 4;
}