relay_knowledge/domain/operations/software/
projection.rs1use serde::{Deserialize, Serialize};
2
3use super::super::GraphVersion;
4use super::{
5 SoftwareBuildTarget, SoftwareComponent, SoftwareDependencyUsage, SoftwareDesignElement,
6 SoftwareFile, SoftwareIacResource, SoftwareRelationship, SoftwareSdkUsage, SoftwareTopic,
7};
8
9#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
11pub struct SoftwareGlobalStatus {
12 pub repository_id: String,
13 pub source_scope: String,
14 pub projected_graph_version: GraphVersion,
15 pub stale: bool,
16 pub component_count: usize,
17 pub sdk_usage_count: usize,
18 pub file_count: usize,
19 pub topic_count: usize,
20 pub relationship_count: usize,
21 pub build_target_count: usize,
22 pub iac_resource_count: usize,
23 pub design_element_count: usize,
24 #[serde(skip_serializing_if = "Option::is_none")]
25 pub last_error: Option<String>,
26}
27
28#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
30pub struct SoftwareGlobalProjection {
31 pub status: SoftwareGlobalStatus,
32 pub components: Vec<SoftwareComponent>,
33 pub dependency_usages: Vec<SoftwareDependencyUsage>,
34 pub sdk_usages: Vec<SoftwareSdkUsage>,
35 pub files: Vec<SoftwareFile>,
36 pub topics: Vec<SoftwareTopic>,
37 pub relationships: Vec<SoftwareRelationship>,
38 pub build_targets: Vec<SoftwareBuildTarget>,
39 pub iac_resources: Vec<SoftwareIacResource>,
40 pub design_elements: Vec<SoftwareDesignElement>,
41}
42
43#[cfg(test)]
44#[path = "projection_tests.rs"]
45mod tests;