glyph/models/decoders

This contains all decoders needed to parse responses into models. Adapted from Gleam’s stdlib dynamic decoders.

Abandon all hope, ye who enter.

Functions

pub fn application_decoder() -> fn(Dynamic) ->
  Result(Application, List(DecodeError))
pub fn gateway_event_decoder() -> fn(Dynamic) ->
  Result(GatewayEvent, List(DecodeError))
pub fn gateway_hello_decoder(
  dyn: Dynamic,
) -> Result(HelloEvent, List(DecodeError))
pub fn gateway_partial_app_decoder() -> fn(Dynamic) ->
  Result(ReadyApplication, List(DecodeError))
pub fn gateway_ready_decoder(
  dyn: Dynamic,
) -> Result(ReadyEvent, List(DecodeError))
pub fn get_gateway_bot_decoder() -> fn(Dynamic) ->
  Result(GetGatewayBot, List(DecodeError))
pub fn install_params_decoder() -> fn(Dynamic) ->
  Result(InstallParams, List(DecodeError))
pub fn member_decoder() -> fn(Dynamic) ->
  Result(Member, List(DecodeError))
pub fn message_decoder(
  dyn: Dynamic,
) -> Result(Message, List(DecodeError))
pub fn session_start_limit_decoder() -> fn(Dynamic) ->
  Result(SessionStartLimit, List(DecodeError))
pub fn team_decoder() -> fn(Dynamic) ->
  Result(Team, List(DecodeError))
pub fn user_decoder() -> fn(Dynamic) ->
  Result(User, List(DecodeError))
Search Document