OpenrelikWorkerCommon. Reporting. MarkdownDocument
(openrelik_worker_common v0.1.0)
Copy Markdown
View Source
Represents a Markdown document (openrelik_worker_common.reporting.MarkdownDocument).
Summary
Functions
Adds a section to the document.
Initializes a MarkdownDocument struct.
Generates a dictionary (string-keyed map) representation of the document.
Generates a JSON representation of the document.
Generates a Markdown representation of the document.
Types
@type t() :: %OpenrelikWorkerCommon.Reporting.MarkdownDocument{ fmt: OpenrelikWorkerCommon.Reporting.MarkdownFormatter.t(), priority: OpenrelikWorkerCommon.Reporting.Priority.t(), sections: [OpenrelikWorkerCommon.Reporting.MarkdownDocumentSection.t()], summary: String.t(), title: String.t() | nil }
Functions
@spec add_section(t()) :: {t(), OpenrelikWorkerCommon.Reporting.MarkdownDocumentSection.t()}
Adds a section to the document.
When called with just document, appends an empty %MarkdownDocumentSection{} and returns
{updated_document, new_section} or, if passed a %MarkdownDocumentSection{} or builder
function (section -> section), appends the populated section and returns updated_document.
@spec add_section( t(), OpenrelikWorkerCommon.Reporting.MarkdownDocumentSection.t() | (OpenrelikWorkerCommon.Reporting.MarkdownDocumentSection.t() -> OpenrelikWorkerCommon.Reporting.MarkdownDocumentSection.t()) ) :: t()
Initializes a MarkdownDocument struct.
Generates a dictionary (string-keyed map) representation of the document.
Generates a JSON representation of the document.
Generates a Markdown representation of the document.