slackline/status

This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.

Slack’s own status, from the unauthenticated Status API at slack-status.com. Use current() and history().

Types

Slack’s current status.

pub type CurrentStatus {
  CurrentStatus(
    status: IncidentStatus,
    active_incidents: option.Option(List(Incident)),
    date_created: option.Option(String),
    date_updated: option.Option(String),
  )
}

Constructors

An incident, outage, notice or planned maintenance.

pub type Incident {
  Incident(
    id: Int,
    title: option.Option(String),
    incident_type: option.Option(IncidentType),
    status: option.Option(IncidentStatus),
    url: option.Option(String),
    date_created: option.Option(String),
    date_updated: option.Option(String),
    services: option.Option(List(String)),
    notes: option.Option(List(IncidentNote)),
  )
}

Constructors

An update on an issue.

pub type IncidentNote {
  IncidentNote(
    date_created: option.Option(String),
    body: option.Option(String),
  )
}

Constructors

  • IncidentNote(
      date_created: option.Option(String),
      body: option.Option(String),
    )

    Arguments

    date_created

    When the note was posted, as an ISO 8601 timestamp.

    body

    The note, as HTML.

Where an issue stands. ok only appears on the overall status.

pub type IncidentStatus {
  AllOk
  ActiveIssue
  ResolvedIssue
  ScheduledMaintenance
  CompletedMaintenance
  CancelledMaintenance
  UnknownIncidentStatus(String)
}

Constructors

  • AllOk

    ok

  • ActiveIssue

    active

  • ResolvedIssue

    resolved

  • ScheduledMaintenance

    scheduled

  • CompletedMaintenance

    completed

  • CancelledMaintenance

    cancelled

  • UnknownIncidentStatus(String)

    A value that this version of slackline does not know.

The kind of issue.

pub type IncidentType {
  IncidentKind
  NoticeKind
  OutageKind
  UnknownIncidentType(String)
}

Constructors

  • IncidentKind

    incident

  • NoticeKind

    notice

  • OutageKind

    outage

  • UnknownIncidentType(String)

    A value that this version of slackline does not know.

The type of calls to the Status API.

pub type StatusApi

Values

pub fn current() -> slackline.Call(StatusApi, CurrentStatus)

Slack’s current status and every active incident.

pub fn current_status_decoder() -> decode.Decoder(CurrentStatus)

Decodes CurrentStatus from json.

pub fn current_status_to_json(it: CurrentStatus) -> json.Json

Encodes CurrentStatus as json.

pub fn history() -> slackline.Call(StatusApi, List(Incident))

Every past incident, newest first.

pub fn incident_decoder() -> decode.Decoder(Incident)

Decodes Incident from json.

pub fn incident_note_decoder() -> decode.Decoder(IncidentNote)

Decodes IncidentNote from json.

pub fn incident_note_to_json(it: IncidentNote) -> json.Json

Encodes IncidentNote as json.

pub fn incident_status_decoder() -> decode.Decoder(IncidentStatus)

Decodes IncidentStatus from a json string.

pub fn incident_status_from_string(
  string: String,
) -> IncidentStatus

Parses IncidentStatus from its json string.

pub fn incident_status_to_json(it: IncidentStatus) -> json.Json

Encodes IncidentStatus as a json string.

pub fn incident_status_to_string(it: IncidentStatus) -> String

The json string of IncidentStatus.

pub fn incident_to_json(it: Incident) -> json.Json

Encodes Incident as json.

pub fn incident_type_decoder() -> decode.Decoder(IncidentType)

Decodes IncidentType from a json string.

pub fn incident_type_from_string(string: String) -> IncidentType

Parses IncidentType from its json string.

pub fn incident_type_to_json(it: IncidentType) -> json.Json

Encodes IncidentType as a json string.

pub fn incident_type_to_string(it: IncidentType) -> String

The json string of IncidentType.

✨ Search Document