From dd7db0534902ee84d0ba05e61598275aff7ab0d3 Mon Sep 17 00:00:00 2001 From: VG Date: Mon, 9 Oct 2023 04:18:15 +0800 Subject: [PATCH] chore: include get_all_schemas --- dozer-cli/src/live/mod.rs | 2 +- dozer-cli/src/live/state.rs | 4 ++-- dozer-types/protos/cloud.proto | 10 ++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/dozer-cli/src/live/mod.rs b/dozer-cli/src/live/mod.rs index 9fe3b27873..43daff6ad4 100644 --- a/dozer-cli/src/live/mod.rs +++ b/dozer-cli/src/live/mod.rs @@ -1,7 +1,7 @@ mod downloader; mod errors; mod server; -mod state; +pub mod state; mod watcher; use self::state::LiveState; use crate::{cli::types::Live, live::server::LIVE_PORT}; diff --git a/dozer-cli/src/live/state.rs b/dozer-cli/src/live/state.rs index 3f9e710284..5545b30de7 100644 --- a/dozer-cli/src/live/state.rs +++ b/dozer-cli/src/live/state.rs @@ -311,7 +311,7 @@ fn get_contract(dozer_and_contract: &Option) -> Result<&Contra .ok_or(LiveError::NotInitialized) } -async fn create_contract(dozer: SimpleOrchestrator) -> Result { +pub async fn create_contract(dozer: SimpleOrchestrator) -> Result { let dag = create_dag(&dozer).await?; let version = dozer.config.version; let schemas = DagSchemas::new(dag)?; @@ -327,7 +327,7 @@ async fn create_contract(dozer: SimpleOrchestrator) -> Result Result { +pub async fn create_dag(dozer: &SimpleOrchestrator) -> Result { let endpoint_and_logs = dozer .config .endpoints diff --git a/dozer-types/protos/cloud.proto b/dozer-types/protos/cloud.proto index ffe00ae8a0..cd46eefef5 100644 --- a/dozer-types/protos/cloud.proto +++ b/dozer-types/protos/cloud.proto @@ -31,6 +31,7 @@ service DozerCloud { rpc delete_version(DeleteVersionRequest) returns (DeleteVersionResponse); rpc list_files(ListFilesRequest) returns (ListFilesResponse); rpc get_configuration(GetConfigurationRequest) returns (GetConfigurationResponse); + rpc get_all_schemas(GetAllSchemasRequest) returns (GetAllSchemasResponse); // returns a list of all the steps for a deployment rpc get_deployment_status(GetDeploymentStatusRequest) returns (GetDeploymentStatusResponse); @@ -121,6 +122,15 @@ message ListAppResponse { Pagination pagination = 2; } +message GetAllSchemasRequest { + string yaml = 1; +} + +message GetAllSchemasResponse { + map connections = 1; + dozer.types.SchemasResponse endpoints = 2; +} + message UpdateAppRequest { string app_id = 1; repeated File files = 2;