Skip to content

Commit

Permalink
feat(dgw): expose gateway ID in configuration endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
CBenoit committed Aug 5, 2022
1 parent f4a105b commit f15d33a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions devolutions-gateway/src/http/controllers/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ use crate::http::HttpErrorStatus;
use crate::token::JetAccessScope;
use saphir::prelude::*;
use std::sync::Arc;
use uuid::Uuid;

#[cfg_attr(feature = "openapi", derive(utoipa::Component))]
#[derive(Serialize)]
pub struct GatewayConfiguration {
id: Option<Uuid>,
hostname: String,
version: &'static str,
listeners: Vec<ListenerConfig>,
Expand All @@ -16,6 +18,7 @@ pub struct GatewayConfiguration {
impl From<Arc<Config>> for GatewayConfiguration {
fn from(config: Arc<Config>) -> Self {
GatewayConfiguration {
id: config.id,
listeners: config.listeners.clone(),
version: env!("CARGO_PKG_VERSION"),
hostname: config.hostname.clone(),
Expand Down

0 comments on commit f15d33a

Please sign in to comment.