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