CMDCOrchestrator.Templates (cmdc_orchestrator v0.4.0)

Copy Markdown View Source

内置 WorkflowSpec 模板包。

模板返回 %CMDCOrchestrator.WorkflowSpec{},企业平台可以直接转 JSON/YAML 后作为 Workflow Designer 的初始化草稿。

Summary

Functions

返回全部内置模板。

按名称读取模板。

按名称读取模板;不存在时抛异常。

返回全部模板名称。

把模板输出为 JSON-ready map。

Functions

all()

@spec all() :: %{required(String.t()) => CMDCOrchestrator.WorkflowSpec.t()}

返回全部内置模板。

get(name)

@spec get(String.t() | atom()) ::
  {:ok, CMDCOrchestrator.WorkflowSpec.t()} | {:error, term()}

按名称读取模板。

get!(name)

按名称读取模板;不存在时抛异常。

names()

@spec names() :: [String.t()]

返回全部模板名称。

to_map(name)

@spec to_map(String.t() | atom()) :: map()

把模板输出为 JSON-ready map。