#![forbid(unsafe_code)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ContractsSchemaQuery {
pub schema_ids: Vec<String>,
pub schema_version: String,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct VersionCompatibilityLaneQuery {
pub schema_version: String,
pub surfaces: Vec<VersionCompatibilitySurface>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct VersionCompatibilitySurface {
pub surface: String,
pub current_versions: Vec<String>,
pub accepted_previous_versions: Vec<String>,
pub refused_versions: Vec<String>,
}
#[must_use]
pub fn contracts_schema_query() -> ContractsSchemaQuery {
ContractsSchemaQuery {
schema_ids: vec![
"command-envelope-v1".to_string(),
"output-envelope-v1".to_string(),
"error-envelope-v1".to_string(),
"config-schema-registry-v1".to_string(),
"plugin-manifest-v2".to_string(),
"product-mount-descriptor-v1".to_string(),
],
schema_version: "v4".to_string(),
}
}
#[must_use]
pub fn version_compatibility_lanes_query() -> VersionCompatibilityLaneQuery {
VersionCompatibilityLaneQuery {
schema_version: "v1".to_string(),
surfaces: vec![
VersionCompatibilitySurface {
surface: "cli-command-envelope".to_string(),
current_versions: vec!["command-envelope-v1".to_string()],
accepted_previous_versions: Vec::new(),
refused_versions: vec![
"command-envelope-v0".to_string(),
"command-envelope-v2".to_string(),
],
},
VersionCompatibilitySurface {
surface: "cli-output-envelope".to_string(),
current_versions: vec!["output-envelope-v1".to_string()],
accepted_previous_versions: Vec::new(),
refused_versions: vec![
"output-envelope-v0".to_string(),
"output-envelope-v2".to_string(),
],
},
VersionCompatibilitySurface {
surface: "cli-error-envelope".to_string(),
current_versions: vec!["error-envelope-v1".to_string()],
accepted_previous_versions: Vec::new(),
refused_versions: vec![
"error-envelope-v0".to_string(),
"error-envelope-v2".to_string(),
],
},
VersionCompatibilitySurface {
surface: "config-schema-registry".to_string(),
current_versions: vec!["config-schema-registry-v1".to_string()],
accepted_previous_versions: Vec::new(),
refused_versions: vec![
"config-schema-registry-v0".to_string(),
"config-schema-registry-v2".to_string(),
],
},
VersionCompatibilitySurface {
surface: "mount-descriptor".to_string(),
current_versions: vec!["product-mount-descriptor-v1".to_string()],
accepted_previous_versions: Vec::new(),
refused_versions: vec![
"product-mount-descriptor-v0".to_string(),
"product-mount-descriptor-v2".to_string(),
],
},
VersionCompatibilitySurface {
surface: "graph-spec".to_string(),
current_versions: vec!["bijux-dag/v0.1".to_string()],
accepted_previous_versions: vec![
"v1".to_string(),
"v0.1".to_string(),
"0.1".to_string(),
],
refused_versions: vec!["v9".to_string(), "bijux-dag/v9".to_string()],
},
VersionCompatibilitySurface {
surface: "run-manifest".to_string(),
current_versions: vec!["run-manifest/v0.1".to_string()],
accepted_previous_versions: Vec::new(),
refused_versions: vec![
"run-manifest/v0".to_string(),
"run-manifest/v2".to_string(),
],
},
VersionCompatibilitySurface {
surface: "artifact-index".to_string(),
current_versions: vec!["run-dir-schema/v0.1".to_string()],
accepted_previous_versions: Vec::new(),
refused_versions: vec![
"run-dir-schema/v0".to_string(),
"run-dir-schema/v2".to_string(),
],
},
VersionCompatibilitySurface {
surface: "replay-bundle".to_string(),
current_versions: vec![
"export-bundle/v0.1".to_string(),
"proof-bundle/v0.1".to_string(),
],
accepted_previous_versions: Vec::new(),
refused_versions: vec![
"export-bundle/v0".to_string(),
"proof-bundle/v0".to_string(),
"export-bundle/v2".to_string(),
"proof-bundle/v2".to_string(),
],
},
],
}
}