Minga.Extension.Entry (Minga v0.1.0)

Copy Markdown View Source

Data structure representing a declared extension in the registry.

Each entry tracks the extension's source (path, git, or hex), its runtime status, the loaded module, and the config passed to init/1.

Summary

Types

Git-specific source options.

Hex-specific source options.

How the extension source code is obtained.

t()

Functions

Creates a git-sourced entry.

Creates a hex-sourced entry.

Creates a path-sourced entry.

Types

git_opts()

@type git_opts() :: %{
  url: String.t(),
  branch: String.t() | nil,
  ref: String.t() | nil
}

Git-specific source options.

hex_opts()

@type hex_opts() :: %{package: String.t(), version: String.t() | nil}

Hex-specific source options.

source_type()

@type source_type() :: :path | :git | :hex

How the extension source code is obtained.

t()

@type t() :: %Minga.Extension.Entry{
  config: keyword(),
  git: git_opts() | nil,
  hex: hex_opts() | nil,
  module: module() | nil,
  path: String.t() | nil,
  pid: pid() | nil,
  source_type: source_type(),
  status: Minga.Extension.extension_status()
}

Functions

from_git(url, opts)

@spec from_git(
  String.t(),
  keyword()
) :: t()

Creates a git-sourced entry.

from_hex(package, opts)

@spec from_hex(
  String.t(),
  keyword()
) :: t()

Creates a hex-sourced entry.

from_path(path, config)

@spec from_path(
  String.t(),
  keyword()
) :: t()

Creates a path-sourced entry.