Skip to main content

pipedash_plugin_api/
lib.rs

1pub mod defaults;
2pub mod error;
3pub mod health;
4pub mod http;
5pub mod logs;
6pub mod plugin;
7pub mod registry;
8pub mod schema;
9pub mod sign_in;
10pub mod types;
11pub mod utils;
12
13pub use error::{
14    PluginError,
15    PluginResult,
16};
17pub use health::{
18    collect_controller_health,
19    custom_status_source,
20    status_page_field,
21    ClientOptions,
22    ComponentFilter,
23    ComponentHealth,
24    FeedFormat,
25    HealthLevel,
26    StatusSource,
27    CONTROLLER_HEALTH_FEATURE,
28    STATUS_PAGE_URL_KEY,
29};
30pub use http::{
31    check_response,
32    from_status,
33    map_send_error,
34    redact_url,
35    retry_after,
36    truncate_chars,
37};
38pub use logs::{
39    LineMarker,
40    LogAvailability,
41    LogDialect,
42    LogNode,
43    LogNodeKind,
44    LogSink,
45    ParsedLine,
46    PlainDialect,
47    RunRef,
48    LOG_CHUNK_STALL_TIMEOUT,
49};
50pub use plugin::{
51    Plugin,
52    PluginCapabilities,
53    PluginMetadata,
54};
55pub use registry::PluginRegistry;
56pub use schema::{
57    ConfigField,
58    ConfigFieldType,
59    ConfigSchema,
60};
61pub use sign_in::{
62    SignInClient,
63    SignInToken,
64};
65pub use types::{
66    AvailablePipeline,
67    BuildAgent,
68    BuildArtifact,
69    BuildQueue,
70    Feature,
71    FeatureAvailability,
72    Organization,
73    PaginatedAvailablePipelines,
74    PaginatedResponse,
75    PaginationParams,
76    Permission,
77    PermissionCheck,
78    PermissionStatus,
79    Pipeline,
80    PipelineRun,
81    PipelineStatus,
82    RateLimit,
83    ReviewDecision,
84    TriggerParams,
85    WorkflowParameter,
86    WorkflowParameterType,
87};
88pub use utils::{
89    retain_with_ci,
90    RetryPolicy,
91};
92
93#[macro_export]
94macro_rules! register_plugin {
95    ($plugin_type:ty) => {
96        pub fn register(registry: &mut $crate::PluginRegistry) {
97            registry.register(Box::new(<$plugin_type>::default()));
98        }
99    };
100}