Simplificator3000Phoenix.Channel.ChannelHelpers (Simplificator3000 Phoenix v1.8.0)

Summary

Functions

error(opts \\ [])

error_push(socket, event, opts)

error_reply(socket, opts \\ [])

@spec error_reply(Phoenix.Socket.t() | Phoenix.Channel.socket_ref(), Keyword.t()) ::
  {:noreply, Phoenix.Socket.t()}
  | {:noreply, Phoenix.Socket.t(), timeout() | :hibernate}
  | {:reply, Phoenix.Channel.reply(), Phoenix.Socket.t()}
  | {:stop, reason :: term(), Phoenix.Socket.t()}
  | {:stop, reason :: term(), Phoenix.Channel.reply(), Phoenix.Socket.t()}
  | :ok

get_identity(socket)

get_user_ctx(socket)

get_user_key(socket, key)

is_ctx_related(ctx, socket)

(macro)

put_request_id(socket)

request_id(map)

success(data \\ nil, opts \\ [])

@spec success(
  any(),
  keyword()
) :: map()

success_push(socket, event, data \\ nil, opts \\ [])

success_reply(socket, data \\ nil, opts \\ [])

@spec success_reply(
  Phoenix.Socket.t() | Phoenix.Channel.socket_ref(),
  any(),
  Keyword.t()
) ::
  {:noreply, Phoenix.Socket.t()}
  | {:noreply, Phoenix.Socket.t(), timeout() | :hibernate}
  | {:reply, Phoenix.Channel.reply(), Phoenix.Socket.t()}
  | {:stop, reason :: term(), Phoenix.Socket.t()}
  | {:stop, reason :: term(), Phoenix.Channel.reply(), Phoenix.Socket.t()}
  | :ok

user(map)

user_ctx(map)

@spec user_ctx(Phoenix.Socket.t()) :: UserContext.t()

user_id(socket)

username(socket)