Sap.Context

A data type to hold both the connection data and the status of a decision path.

Summary

Functions

Updates a Sap.Context to set the status to :error. In a decision path, this is used to halt the processing in the rest of the path

Creates a Sap.Context from a Plug.Conn. The created context has a status of :ok

Types

t :: %Sap.Context{status: :ok | :error, conn: Plug.Conn.t}

Functions

error(context)

Specs

error(t) :: t

Updates a Sap.Context to set the status to :error. In a decision path, this is used to halt the processing in the rest of the path.

new(conn)

Specs

new(Plug.Conn.t) :: t

Creates a Sap.Context from a Plug.Conn. The created context has a status of :ok.