gleamcms/events/webhook

Types

pub type PostPublishedEvent {
  PostPublishedEvent(
    id: String,
    slug: String,
    title: String,
    timestamp: Int,
  )
}

Constructors

  • PostPublishedEvent(
      id: String,
      slug: String,
      title: String,
      timestamp: Int,
    )
pub type WebhookSubscription {
  WebhookSubscription(
    id: String,
    url: String,
    secret: String,
    active: Bool,
  )
}

Constructors

  • WebhookSubscription(
      id: String,
      url: String,
      secret: String,
      active: Bool,
    )

Values

pub fn dispatch_event(
  url: String,
  secret: String,
  payload: String,
) -> Result(String, String)
pub fn dispatch_to_all(
  subscriptions: List(WebhookSubscription),
  payload: String,
) -> List(Result(String, String))
pub fn encode_post_published_event(
  event: PostPublishedEvent,
) -> String
pub fn sign_payload(payload: String, secret: String) -> String
Search Document