Skip to content

Commit

Permalink
feat(attest): add analysis backend
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKaravaev committed Jan 13, 2025
1 parent be7c42a commit c35e68f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions attest/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ impl Config {
let (auth, ping) = match backend {
Backend::Prod => ("auth.orb", "management.orb"),
Backend::Staging => ("auth.stage.orb", "management.stage.orb"),
Backend::Analysis => ("auth.analysis.orb", "management.analysis.orb"),
};
Config {
auth_url: url::Url::parse(&format!("https://{auth}.worldcoin.org/api/v1/"))
Expand All @@ -35,6 +36,7 @@ impl Config {
pub enum Backend {
Prod,
Staging,
Analysis,
}

const DEFAULT_BACKEND: Backend = Backend::Prod;
Expand All @@ -58,6 +60,7 @@ impl Backend {
match v.trim().to_lowercase().as_str() {
"prod" => Ok(Backend::Prod),
"stage" | "dev" => Ok(Backend::Staging),
"analysis" | "analysis.ml" | "analysis-ml" => Ok(Self::Analysis),
_ => {
bail!("unknown value for backend");
}
Expand Down

0 comments on commit c35e68f

Please sign in to comment.