Sake.Context (Sake v0.1.0)

Copy Markdown View Source

What a component learns about the request it serves.

scope is the host's principal (the current user, organization, or anything the host puts there); token and scopes are set when the endpoint has authorization; inputs holds elicitation answers on a retry; progress reports progress to the client when it asked for it.

Summary

Types

t()

@type t() :: %Sake.Context{
  client_capabilities: term(),
  client_info: term(),
  conn_assigns: term(),
  era: term(),
  inputs: term(),
  log_level: term(),
  method: term(),
  progress: term(),
  protocol_version: term(),
  request_id: term(),
  reraise: term(),
  scope: term(),
  scopes: term(),
  secret: term(),
  server: term(),
  token: term(),
  trace: term(),
  transport: term()
}

Functions

new(opts \\ [])

@spec new(keyword()) :: t()