Skip to content

Commit

Permalink
refactor: split models into separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Sommerfeld committed Oct 14, 2024
1 parent fe75b22 commit b6a7ee0
Show file tree
Hide file tree
Showing 20 changed files with 384 additions and 369 deletions.
2 changes: 1 addition & 1 deletion src/auth.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::client::CloudManagerClient;
use crate::config::{AuthStrategy, Scope};
use crate::models::{BearerResponse, JwtClaims};
use crate::models::auth::{BearerResponse, JwtClaims};
use crate::IMS_ENDPOINT;
use chrono::{Duration, Utc};
use jsonwebtoken::{encode, Algorithm, EncodingKey, Header};
Expand Down
3 changes: 2 additions & 1 deletion src/clap_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ use crate::client::CloudManagerClient;
use crate::config::CloudManagerConfig;
use crate::encryption::{decrypt, encrypt};
use crate::logs::{download_log, tail_log};
use crate::models::{Domain, LogType, ServiceType};
use crate::models::domains::Domain;
use crate::models::logs::{LogType, ServiceType};
use crate::variables::{
get_env_vars, get_pipeline_vars, set_env_vars_from_file, set_pipeline_vars_from_file,
};
Expand Down
5 changes: 3 additions & 2 deletions src/domains.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::client::{AdobeConnector, CloudManagerClient};
use crate::errors::throw_adobe_api_error;
use crate::models::{CreateDomainResponse, DomainList, DomainResponse, MinimumDomain, YamlConfig};
use crate::models::config::{ProgramsConfig, YamlConfig};
use crate::models::domains::{CreateDomainResponse, DomainList, DomainResponse, MinimumDomain};
use crate::HOST_NAME;
extern crate uuid;
use colored::Colorize;
Expand Down Expand Up @@ -57,7 +58,7 @@ pub async fn create_domains(
process::exit(1);
});
let mut ret_value = 0;
let programs: Vec<crate::models::ProgramsConfig> = input.programs;
let programs: Vec<ProgramsConfig> = input.programs;
for d in &programs {
println!("☁ Program: {}", d.id,);
if let Some(environments_vec) = &d.environments {
Expand Down
2 changes: 1 addition & 1 deletion src/environments.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::client::{AdobeConnector, CloudManagerClient};
use crate::errors::throw_adobe_api_error;
use crate::models::{Environment, EnvironmentsList, EnvironmentsResponse};
use crate::models::environments::{Environment, EnvironmentsList, EnvironmentsResponse};
use crate::HOST_NAME;
use reqwest::{Error, Method};
use std::process;
Expand Down
2 changes: 1 addition & 1 deletion src/execution.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::client::{AdobeConnector, CloudManagerClient};
use crate::errors::throw_adobe_api_error;
use crate::models::{ExecutionList, ExecutionResponse};
use crate::models::executions::{ExecutionList, ExecutionResponse};
use crate::HOST_NAME;
use reqwest::{Error, Method};
use std::process;
Expand Down
2 changes: 1 addition & 1 deletion src/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use reqwest::{Error, Method, StatusCode};

use crate::client::{AdobeConnector, CloudManagerClient};
use crate::errors::throw_adobe_api_error;
use crate::models::{LogTailResponse, LogType, ServiceType};
use crate::models::logs::{LogTailResponse, LogType, ServiceType};
use crate::HOST_NAME;

/// Downloads the specified log.
Expand Down
Loading

0 comments on commit b6a7ee0

Please sign in to comment.