Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: split models into separate files #40

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
7 changes: 4 additions & 3 deletions src/clap_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ use crate::client::CloudManagerClient;
use crate::config::CloudManagerConfig;
use crate::encryption::{decrypt, encrypt};
use crate::logs::{download_log, tail_log};
use crate::models::{
Domain, EnvironmentVariableServiceType, LogType, PipelineVariableServiceType, ServiceType,
};
use crate::models::domain::Domain;
use crate::models::log::{LogType, ServiceType};
use crate::models::variables::{EnvironmentVariableServiceType, PipelineVariableServiceType};

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::YamlConfig;
use crate::models::domain::{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<crate::models::config::ProgramsConfig> = input.programs;
for d in &programs {
println!("☁ Program: {}", d.id,);
if let Some(environments_vec) = &d.environments {
Expand Down
3 changes: 2 additions & 1 deletion src/environments.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::{Environment, EnvironmentsList, EnvironmentsResponse};
use crate::models::environment::{Environment, EnvironmentsList};
use crate::models::variables::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::execution::{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::log::{LogTailResponse, LogType, ServiceType};
use crate::HOST_NAME;

/// Downloads the specified log.
Expand Down
Loading
Loading