Legatus.Aussenwelt (legatus v0.2.0)

Copy Markdown View Source

Aussenwelt est mundus externus ad quem Legatus respondet.

In this layer, the system meets what is not itself: raw ingress and egress. Aussenwelt is where outer phenomena are admitted and where responses are returned without claiming interpretation.

Philosophically, this is the boundary of contact, not the place of judgment. It keeps conversion at the edge so inner layers can remain conceptually pure.

Summary

Functions

Constructs canonical invalid-request object for structurally unsupported ingress.

Constructs canonical parse-error object for malformed ingress.

Returns boundary egress form for outward emission.

Admits ingress phenomenon into the boundary.

Functions

format_invalid_request(id, data)

@spec format_invalid_request(term(), binary()) :: map()

Constructs canonical invalid-request object for structurally unsupported ingress.

format_parse_error(reason)

@spec format_parse_error(term()) :: map()

Constructs canonical parse-error object for malformed ingress.

profanatio(arg)

@spec profanatio({:gloria, map()} | {:fiasco, map()} | {:silentium, map()}) ::
  {:gloria, binary()} | {:fiasco, binary()} | {:silentium, binary()}

Returns boundary egress form for outward emission.

This function is the last conversion step before local output. It preserves response semantics while materializing outward form.

receptio(line, label)

@spec receptio(String.t(), binary()) :: {:phaenomenon, map()} | {:fiasco, map()}

Admits ingress phenomenon into the boundary.

If decode fails, this function emits boundary failure semantics immediately; valid phenomena are forwarded inward unchanged.