Incant.Surface (incant v0.1.0)

Copy Markdown

Common envelope for top-level Incant admin surfaces.

Resources, dashboards, datasets, tools, and future admin concepts are wrapped in a surface envelope. The envelope owns cross-cutting identity used by routes, navigation, public contracts, and remote transports. The spec field contains the kind-specific metadata.

Summary

Functions

Builds a stable surface id from explicit opts or module naming convention.

Builds a human title from explicit opts, metadata title, or module name.

Types

kind()

@type kind() :: :resource | :dashboard | :dataset | atom()

t()

@type t() :: %Incant.Surface{
  id: String.t(),
  kind: kind(),
  module: module(),
  opts: keyword(),
  spec: struct(),
  title: String.t()
}

Functions

id(module, opts \\ [])

@spec id(
  module(),
  keyword()
) :: String.t()

Builds a stable surface id from explicit opts or module naming convention.

title(module, opts \\ [], title \\ nil)

@spec title(module(), keyword(), String.t() | nil) :: String.t()

Builds a human title from explicit opts, metadata title, or module name.