pub struct EventRule {Show 14 fields
pub id: RuleId,
pub name: String,
pub description: Option<String>,
pub webhook_id: Option<WebhookId>,
pub event_type_pattern: String,
pub condition_expr: Option<String>,
pub workflow_name: String,
pub repo_url: String,
pub workflow_path: String,
pub git_ref: String,
pub input_mappings: Value,
pub is_active: bool,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Defines a rule for triggering workflows based on incoming events.
Fields§
§id: RuleIdUnique identifier for the event rule.
name: StringName of the event rule.
description: Option<String>Optional description of the rule’s behavior.
webhook_id: Option<WebhookId>Optional ID of the webhook this rule applies to.
event_type_pattern: StringPattern matching the type of event to handle.
condition_expr: Option<String>CEL expression used to filter matching events.
workflow_name: StringName of the workflow to trigger when the rule matches.
repo_url: StringGit repository URL containing the workflow.
workflow_path: StringPath to the workflow file within the repository.
git_ref: StringGit reference (branch, tag, or commit) to execute.
input_mappings: ValueJSON mapping of workflow inputs to CEL expressions evaluated against the event.
is_active: boolWhether this rule is actively being evaluated.
created_at: DateTime<Utc>Timestamp when the rule was created.
updated_at: DateTime<Utc>Timestamp when the rule was last updated.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventRule
impl<'de> Deserialize<'de> for EventRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a, R: Row> FromRow<'a, R> for EventRulewhere
&'a str: ColumnIndex<R>,
RuleId: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
Option<WebhookId>: Decode<'a, R::Database> + Type<R::Database>,
Value: Decode<'a, R::Database> + Type<R::Database>,
bool: Decode<'a, R::Database> + Type<R::Database>,
DateTime<Utc>: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for EventRulewhere
&'a str: ColumnIndex<R>,
RuleId: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
Option<WebhookId>: Decode<'a, R::Database> + Type<R::Database>,
Value: Decode<'a, R::Database> + Type<R::Database>,
bool: Decode<'a, R::Database> + Type<R::Database>,
DateTime<Utc>: Decode<'a, R::Database> + Type<R::Database>,
Auto Trait Implementations§
impl Freeze for EventRule
impl RefUnwindSafe for EventRule
impl Send for EventRule
impl Sync for EventRule
impl Unpin for EventRule
impl UnsafeUnpin for EventRule
impl UnwindSafe for EventRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more