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    body_preview,
32    check_response,
33    from_status,
34    map_send_error,
35    read_prefix,
36    redact_url,
37    retry_after,
38    truncate_chars,
39};
40pub use logs::{
41    content_hash,
42    extend_content_hash,
43    next_log_chunk,
44    ContentRange,
45    LineMarker,
46    LogAvailability,
47    LogCursor,
48    LogDialect,
49    LogNode,
50    LogNodeKind,
51    LogRead,
52    LogReadMode,
53    LogSink,
54    ParsedLine,
55    PlainDialect,
56    RangedRead,
57    RunRef,
58    CONTENT_HASH_SEED,
59    LOG_CHUNK_STALL_TIMEOUT,
60};
61pub use plugin::{
62    Plugin,
63    PluginCapabilities,
64    PluginMetadata,
65};
66pub use registry::PluginRegistry;
67pub use schema::{
68    is_no_auth,
69    AuthMode,
70    ConfigField,
71    ConfigFieldType,
72    ConfigSchema,
73    ConfigSection,
74    AUTH_MODE_KEY,
75};
76pub use sign_in::{
77    SignInClient,
78    SignInRefreshRejection,
79    SignInToken,
80};
81pub use types::{
82    AvailablePipeline,
83    BuildAgent,
84    BuildArtifact,
85    BuildQueue,
86    Feature,
87    FeatureAvailability,
88    Organization,
89    PaginatedAvailablePipelines,
90    PaginatedResponse,
91    PaginationParams,
92    Permission,
93    PermissionCheck,
94    PermissionStatus,
95    Pipeline,
96    PipelineCatalog,
97    PipelineRun,
98    PipelineStatus,
99    RateLimit,
100    ResourceState,
101    ReviewDecision,
102    TriggerParams,
103    WorkflowParameter,
104    WorkflowParameterType,
105    READ_ONLY_METADATA_KEY,
106};
107pub use utils::{
108    retain_with_ci,
109    RetryPolicy,
110};
111
112#[macro_export]
113macro_rules! register_plugin {
114    ($plugin_type:ty) => {
115        pub fn register(registry: &mut $crate::PluginRegistry) {
116            registry.register(Box::new(<$plugin_type>::default()));
117        }
118    };
119}