Contract for response codecs and shared boundary validation.
Summary
Functions
The protect-only limit keys with their package ceilings (the half of the limit vocabulary
that bounds the key/verification/cache paths, not the response codec). Single source shared
with Response.response_limit/1's typo-discrimination set.
Returns the response structural limits for contract, merging the contract's declared
limits over the package hard limits. Only the hard-limit keys are honored (max_response_*);
any other keys in contract.limits are ignored, so this is safe to call on an un-normalized
map. Values are taken as-is — callers building a %AshOnetime.Response.Contract{} must
validate values (the Response.contract/4 path does so via normalize_response_limits/1,
which selects + validates the response-relevant subset before delegating to normalize_limits/1).
Callbacks
Functions
@spec hard_limits() :: map()
@spec max_bytes(map()) :: pos_integer()
@spec protect_only_ceilings() :: keyword()
The protect-only limit keys with their package ceilings (the half of the limit vocabulary
that bounds the key/verification/cache paths, not the response codec). Single source shared
with Response.response_limit/1's typo-discrimination set.
Returns the response structural limits for contract, merging the contract's declared
limits over the package hard limits. Only the hard-limit keys are honored (max_response_*);
any other keys in contract.limits are ignored, so this is safe to call on an un-normalized
map. Values are taken as-is — callers building a %AshOnetime.Response.Contract{} must
validate values (the Response.contract/4 path does so via normalize_response_limits/1,
which selects + validates the response-relevant subset before delegating to normalize_limits/1).
@spec validate_tag(term()) :: :ok | {:error, AshOnetime.Error.t()}
@spec validate_value(term(), map(), atom()) :: :ok | {:error, AshOnetime.Error.t()}