Incant.Session protocol (Incant v0.1.1)

Copy Markdown View Source

Unified Incant admin session interface.

LiveView and other admin UI code should depend on this protocol rather than knowing whether an admin surface is backed by local BEAM metadata or a SafeRPC-discovered service entry.

Summary

Functions

Returns the loaded transport-safe admin contract.

Fetches one contract surface by id.

Lists contract surfaces. Options may include :kind.

Types

t()

@type t() :: term()

Functions

contract(session)

Returns the loaded transport-safe admin contract.

fetch_surface(session, surface_id, opts)

Fetches one contract surface by id.

index(session, surface_id, params, context, opts)

Indexes a resource surface.

list_surfaces(session, opts)

Lists contract surfaces. Options may include :kind.

read(session, surface_id, id, context, opts)

Reads one resource item.

run_action(session, surface_id, action_id, payload, context, opts)

Runs a resource action.

run_widget(session, surface_id, widget_id, variables, context, opts)

Runs a dashboard widget query.