1
0
Fork 0

Remove error_message, add log_file in terminate request

This commit is contained in:
Florian RICHER 2023-01-31 17:38:08 +01:00
parent f8a03bc18a
commit 2f5a28beb9
No known key found for this signature in database
GPG key ID: 6BF27BF8A1E71623
2 changed files with 5 additions and 7 deletions

View file

@ -25,12 +25,12 @@ enum AuthorizationStatus {
message AuthorizeResponse { message AuthorizeResponse {
AuthorizationStatus status = 1; AuthorizationStatus status = 1;
string error_message = 2; string session_uuid = 2;
string session_uuid = 3;
} }
message TerminateRequest { message TerminateRequest {
string session_uuid = 1; string session_uuid = 1;
string log_file = 2;
} }
enum TerminateStatus { enum TerminateStatus {
@ -40,5 +40,4 @@ enum TerminateStatus {
message TerminateResponse { message TerminateResponse {
TerminateStatus status = 1; TerminateStatus status = 1;
string error_message = 2;
} }

View file

@ -6,7 +6,8 @@ use tonic::{Request, Response, Status};
use libcommand::internal::{ use libcommand::internal::{
unix_server::Unix, unix_server::Unix,
AuthorizeRequest, AuthorizeResponse, AuthorizationStatus, TerminateRequest, TerminateResponse, TerminateStatus AuthorizeRequest, AuthorizeResponse, AuthorizationStatus,
TerminateRequest, TerminateResponse, TerminateStatus
}; };
#[derive(Default)] #[derive(Default)]
@ -26,7 +27,6 @@ impl Unix for DaemonServer {
let reply = AuthorizeResponse { let reply = AuthorizeResponse {
status: AuthorizationStatus::Authorized.into(), status: AuthorizationStatus::Authorized.into(),
error_message: "".into(),
session_uuid: "".into() session_uuid: "".into()
}; };
Ok(Response::new(reply)) Ok(Response::new(reply))
@ -43,8 +43,7 @@ impl Unix for DaemonServer {
} }
let reply = TerminateResponse { let reply = TerminateResponse {
status: TerminateStatus::Ok.into(), status: TerminateStatus::Ok.into()
error_message: "".into(),
}; };
Ok(Response::new(reply)) Ok(Response::new(reply))
} }