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    SignInToken,
79};
80pub use types::{
81    AvailablePipeline,
82    BuildAgent,
83    BuildArtifact,
84    BuildQueue,
85    Feature,
86    FeatureAvailability,
87    Organization,
88    PaginatedAvailablePipelines,
89    PaginatedResponse,
90    PaginationParams,
91    Permission,
92    PermissionCheck,
93    PermissionStatus,
94    Pipeline,
95    PipelineCatalog,
96    PipelineRun,
97    PipelineStatus,
98    RateLimit,
99    ResourceState,
100    ReviewDecision,
101    TriggerParams,
102    WorkflowParameter,
103    WorkflowParameterType,
104    READ_ONLY_METADATA_KEY,
105};
106pub use utils::{
107    retain_with_ci,
108    RetryPolicy,
109};
110
111#[macro_export]
112macro_rules! register_plugin {
113    ($plugin_type:ty) => {
114        pub fn register(registry: &mut $crate::PluginRegistry) {
115            registry.register(Box::new(<$plugin_type>::default()));
116        }
117    };
118}