Public Access
fix: format and lint
This commit is contained in:
@@ -6,8 +6,8 @@ use tracing::{info, warn};
|
||||
|
||||
// Plugin imports
|
||||
extern crate charybdis_defectdojo;
|
||||
extern crate charybdis_keycloak;
|
||||
extern crate charybdis_dependencytrack;
|
||||
extern crate charybdis_keycloak;
|
||||
|
||||
// Import MyEntityService and EntityServiceServer from the library crate
|
||||
use charybdis::{
|
||||
@@ -70,7 +70,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
// Load DefectDojo plugin if configured
|
||||
if let Some(dd_config) = &config.plugins.defectdojo {
|
||||
let enabled = dd_config.get("enabled")
|
||||
let enabled = dd_config
|
||||
.get("enabled")
|
||||
.and_then(|v| v.as_bool())
|
||||
.unwrap_or(false);
|
||||
if !enabled {
|
||||
@@ -101,7 +102,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
// Load Keycloak plugin if configured
|
||||
if let Some(kc_config) = &config.plugins.keycloak {
|
||||
let enabled = kc_config.get("enabled")
|
||||
let enabled = kc_config
|
||||
.get("enabled")
|
||||
.and_then(|v| v.as_bool())
|
||||
.unwrap_or(false);
|
||||
if !enabled {
|
||||
@@ -132,7 +134,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
// Load Dependency-Track plugin if configured
|
||||
if let Some(dt_config) = &config.plugins.dependencytrack {
|
||||
let enabled = dt_config.get("enabled")
|
||||
let enabled = dt_config
|
||||
.get("enabled")
|
||||
.and_then(|v| v.as_bool())
|
||||
.unwrap_or(false);
|
||||
if !enabled {
|
||||
@@ -213,8 +216,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
// Initialize parser registry and ingestion service
|
||||
let parser_registry = Arc::new(ParserRegistry::with_builtins());
|
||||
let my_ingestion_service =
|
||||
MyIngestionService::new(entity_repository.clone(), parser_registry);
|
||||
let my_ingestion_service = MyIngestionService::new(entity_repository.clone(), parser_registry);
|
||||
|
||||
// Configure and build the reflection service using the embedded descriptor set.
|
||||
// In tonic-reflection 0.14+, use build_v1() instead of build()
|
||||
|
||||
Reference in New Issue
Block a user