1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//! # Backstage Client Library
//!
//! A Rust client library for interacting with the Backstage Catalog API.
//! This library provides type-safe access to Backstage entities and supports
//! filtering, querying, and retrieving various entity types.
//!
//! ## Features
//!
//! - **Type-safe entities**: Strongly typed representations of all Backstage entity kinds
//! - **Async support**: Built on tokio and reqwest for modern async operations
//! - **Filtering**: Support for complex entity filtering using query parameters
//! - **Error handling**: Comprehensive error types with detailed error information
//! - **Authentication**: Bearer token authentication support
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use backstage_client::{BackstageClient, entities::Entity};
//! use std::collections::HashMap;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let client = BackstageClient::new("https://backstage.example.com", "your-token")?;
//!
//! // Fetch all entities
//! let entities = client.fetch_entities::<Entity>(None).await?;
//! println!("Found {} entities", entities.len());
//!
//! // Fetch only components
//! let mut filters = HashMap::new();
//! filters.insert("kind".to_string(), "Component".to_string());
//! let components = client.fetch_entities::<Entity>(Some(filters)).await?;
//! println!("Found {} components", components.len());
//!
//! Ok(())
//! }
//! ```
//!
//! ## Supported Entity Types
//!
//! - [`Component`](entities::Component) - Software components
//! - [`ApiEntity`](entities::ApiEntity) - API definitions
//! - [`ResourceEntity`](entities::ResourceEntity) - Infrastructure resources
//! - [`SystemEntity`](entities::SystemEntity) - System definitions
//! - [`GroupEntity`](entities::GroupEntity) - User groups
//! - [`UserEntity`](entities::UserEntity) - Individual users
//! - [`LocationEntity`](entities::LocationEntity) - Entity locations
//! - [`DomainEntity`](entities::DomainEntity) - Business domains
//! - [`TemplateEntity`](entities::TemplateEntity) - Software templates
// Re-export the main client and commonly used types
pub use BackstageClient;
pub use ;
// Re-export all entity types for convenience
pub use ;
// Re-export common types
pub use ;