pub struct WebHook {
pub id: Option<Uuid>,
pub name: String,
pub description: Option<String>,
pub url: String,
pub trigger: WebHookTrigger,
pub is_active: bool,
pub created: DateTime<Local>,
pub created_by: Option<WrittenBy>,
pub updated: Option<DateTime<Local>>,
pub updated_by: Option<WrittenBy>,
/* private fields */
}Fields§
§id: Option<Uuid>The webhook id
name: StringThe webhook name
description: Option<String>The webhook description
url: StringThe webhook url
trigger: WebHookTriggerThe webhook trigger
is_active: boolThe webhook is active
created: DateTime<Local>The webhook created date
created_by: Option<WrittenBy>The webhook created by
The ID of the account that created the webhook. This is used for auditing purposes.
updated: Option<DateTime<Local>>The webhook updated date
updated_by: Option<WrittenBy>The webhook updated by
The ID of the account that updated the webhook. This is used for auditing purposes.
Implementations§
Source§impl WebHook
impl WebHook
pub fn new( name: String, description: Option<String>, url: String, trigger: WebHookTrigger, secret: Option<HttpSecret>, created_by: Option<WrittenBy>, ) -> Self
pub async fn new_encrypted( name: String, description: Option<String>, url: String, trigger: WebHookTrigger, secret: Option<HttpSecret>, config: AccountLifeCycle, created_by: Option<WrittenBy>, ) -> Result<Self, MappedErrors>
pub fn redact_secret_token(&mut self)
pub fn get_secret(&self) -> Option<HttpSecret>
pub async fn set_secret( &mut self, secret: HttpSecret, config: AccountLifeCycle, updated_by: Option<WrittenBy>, ) -> Result<(), MappedErrors>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WebHook
impl<'de> Deserialize<'de> for WebHook
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
Auto Trait Implementations§
impl Freeze for WebHook
impl RefUnwindSafe for WebHook
impl Send for WebHook
impl Sync for WebHook
impl Unpin for WebHook
impl UnwindSafe for WebHook
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