Frontier.Rules (Frontier v0.2.1)

Copy Markdown

Enforces boundary rules by checking whether a call from one module to another is allowed.

Summary

Functions

Check whether a call from caller to callee is allowed.

Check whether a call from caller_context to an external package app is allowed. Returns :ok or {:violation, :externals_restricted, details}.

Functions

check(caller, callee)

@spec check(module(), module()) :: :ok | {:violation, atom(), map()}

Check whether a call from caller to callee is allowed.

Returns :ok or {:violation, type, details}.

check_external(caller_context, app)

@spec check_external(module(), atom()) ::
  :ok | {:violation, :externals_restricted, map()}

Check whether a call from caller_context to an external package app is allowed. Returns :ok or {:violation, :externals_restricted, details}.