Pax.Interface behaviour (Pax v0.0.1-dev)

View Source

Pax.Interface enables the creation of CRUD interfaces based on Phoenix.LiveView.

Summary

Callbacks

pax_adapter(socket)

@callback pax_adapter(socket :: Phoenix.LiveView.Socket.t()) ::
  module() | {module(), keyword()} | {module(), module(), keyword()}

pax_config(socket)

@callback pax_config(socket :: Phoenix.LiveView.Socket.t()) :: keyword() | map()

pax_init(params, session, socket)

@callback pax_init(
  params :: Phoenix.LiveView.unsigned_params() | :not_mounted_at_router,
  session :: map(),
  socket :: Phoenix.LiveView.Socket.t()
) :: {:cont, Phoenix.LiveView.Socket.t()} | {:halt, Phoenix.LiveView.Socket.t()}

pax_plugins(socket)

@callback pax_plugins(socket :: Phoenix.LiveView.Socket.t()) :: [Pax.Plugin.pluginspec()]

Functions

action_after_render(socket)

action_handle_async(name, async_fun_result, socket)

action_handle_event(event, params, socket)

action_handle_info(msg, socket)

on_mount(module, params, session, socket)