View Source MishkaInstaller.Reference.OnUserBeforeLogin behaviour (Mishka Installer v0.0.4-beta.1)

Link to this section Summary

Callbacks

This Callback can be used when you want to call a plugin

This Callback can be used when you want to delete a plugin

This Callback can be used when you want to register a plugin

This Callback can be used when you want to restart a plugin

This Callback can be used when you want to start a plugin

This Callback can be used when you want to stop a plugin

This Callback can be used when you want to unregister a plugin

Link to this section Types

@type assigns() :: Phoenix.LiveView.Socket.assigns()
@type input() :: map()
@type ip() :: String.t() | tuple()
@type optional_callbacks() ::
  {:ok, ref(), registerd_info()} | {:error, ref(), reason()}
@type output() :: Phoenix.LiveView.Rendered.t() | nil
@type reason() :: map() | String.t()
@type ref() :: :on_user_before_login
@type registerd_info() :: MishkaInstaller.PluginState.t()
@type state() :: %MishkaInstaller.Reference.OnUserBeforeLogin{
  assigns: assigns(),
  input: input(),
  ip: ip(),
  output: output()
}
@type t() :: state()

Link to this section Callbacks

@callback call(state()) :: {:reply, state()} | {:reply, :halt, state()}

This Callback can be used when you want to call a plugin

Link to this callback

delete(registerd_info)

View Source (optional)
@callback delete(registerd_info()) :: optional_callbacks()

This Callback can be used when you want to delete a plugin

@callback initial(list()) :: {:ok, ref(), list()} | {:error, ref(), reason()}

This Callback can be used when you want to register a plugin

Link to this callback

restart(registerd_info)

View Source (optional)
@callback restart(registerd_info()) :: optional_callbacks()

This Callback can be used when you want to restart a plugin

Link to this callback

start(registerd_info)

View Source (optional)
@callback start(registerd_info()) :: optional_callbacks()

This Callback can be used when you want to start a plugin

Link to this callback

stop(registerd_info)

View Source (optional)
@callback stop(registerd_info()) :: optional_callbacks()

This Callback can be used when you want to stop a plugin

Link to this callback

unregister(registerd_info)

View Source (optional)
@callback unregister(registerd_info()) :: optional_callbacks()

This Callback can be used when you want to unregister a plugin