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 updated: Option<DateTime<Local>>,
/* 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
updated: Option<DateTime<Local>>The webhook updated date
Implementations§
Source§impl WebHook
impl WebHook
pub fn new( name: String, description: Option<String>, url: String, trigger: WebHookTrigger, secret: Option<HttpSecret>, ) -> Self
pub async fn new_encrypted( name: String, description: Option<String>, url: String, trigger: WebHookTrigger, secret: Option<HttpSecret>, config: AccountLifeCycle, ) -> Result<Self, MappedErrors>
pub fn redact_secret_token(&mut self)
pub fn get_secret(&self) -> Option<HttpSecret>
pub fn set_secret(&mut self, secret: HttpSecret)
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