flow_execution/
connections.rs1use thiserror::Error;
9
10#[derive(Debug, Error)]
11pub enum ConnectionError {
12 #[error("connection '{0}' not found")]
13 NotFound(String),
14 #[error("credential lookup failed: {0}")]
15 Credential(String),
16}
17
18#[derive(Debug, Clone)]
19pub struct ResolvedZoweConnection {
20 pub host: String,
21 pub port: u16,
22 pub user: String,
23 pub password: String,
24 pub protocol: String,
25 pub reject_unauthorized: bool,
26}
27
28pub trait ConnectionLookup: Send + Sync {
29 fn resolve_zowe(&self, connection_id: &str) -> Result<ResolvedZoweConnection, ConnectionError>;
30}