Presubmit.Adapters.PhoenixHandler (presubmit v0.2.2)

Copy Markdown View Source

Models the modules a Phoenix router can route to: controllers, LiveViews, and LiveComponents, plus channels.

Recognised by use Phoenix.Controller, use Phoenix.LiveView, use Phoenix.LiveComponent, use Phoenix.Channel, or the conventional use MyAppWeb, :controller / :live_view / :live_component / :channel. An action_fallback declaration is recorded as fallback.

Summary

Functions

Kinds that are targets of routes (as opposed to channels and components).

Types

kind()

@type kind() :: :controller | :live_view | :live_component | :channel

t()

@type t() :: %Presubmit.Adapters.PhoenixHandler{
  fallback: module() | nil,
  kind: kind(),
  module: module()
}

Functions

routable?(phoenix_handler)

@spec routable?(t()) :: boolean()

Kinds that are targets of routes (as opposed to channels and components).