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