Liking cljdoc? Tell your friends :D

wagoe.reports.core.csv

RFC 4180 CSV text from a report's first :table section.

RFC 4180 CSV text from a report's first :table section.
raw docstring

wagoe.reports.core.report

Pure report logic: cell/row formatting, section rendering, and report preparation.

The definition registry and the defreport macro live in the shell (wagoe.reports.shell.registry) — this namespace holds no mutable state.

FC/IS rule: no I/O here. All side effects (file writing, HTTP responses, calling :data-source) live in the shell layer.

Pure report logic: cell/row formatting, section rendering, and report
preparation.

The definition registry and the `defreport` macro live in the shell
(wagoe.reports.shell.registry) — this namespace holds no mutable state.

FC/IS rule: no I/O here. All side effects (file writing, HTTP responses,
calling :data-source) live in the shell layer.
raw docstring

wagoe.reports.ports

Protocol definitions (interfaces) for the reports module.

Applications call ReportServiceProtocol. Adapters (PDF, Excel, Word, CSV) implement ReportGeneratorProtocol.

Protocol definitions (interfaces) for the reports module.

Applications call ReportServiceProtocol. Adapters (PDF, Excel, Word, CSV)
implement ReportGeneratorProtocol.
raw docstring

wagoe.reports.schema

Malli validation schemas for the reports module.

Malli validation schemas for the reports module.
raw docstring

wagoe.reports.shell.adapters.csv

CSV adapter: the first :table section of a report as UTF-8 RFC 4180 text.

:bom? true in opts prefixes a UTF-8 byte order mark, without which Excel misreads non-ASCII characters.

CSV adapter: the first :table section of a report as UTF-8 RFC 4180 text.

`:bom? true` in opts prefixes a UTF-8 byte order mark, without which Excel
misreads non-ASCII characters.
raw docstring

wagoe.reports.shell.adapters.excel

Excel generation adapter using docjure (Apache POI wrapper).

Builds one worksheet per entry in :sheets, or derives a single sheet from :sections when :sheets is not provided.

Usage: (def xl-gen (create-excel-generator)) (generate! xl-gen my-report-def data {}) ;; => {:bytes #bytes[...] :type :excel :filename "my-report.xlsx"}

Excel generation adapter using docjure (Apache POI wrapper).

Builds one worksheet per entry in :sheets, or derives a single sheet
from :sections when :sheets is not provided.

Usage:
  (def xl-gen (create-excel-generator))
  (generate! xl-gen my-report-def data {})
  ;; => {:bytes #bytes[...] :type :excel :filename "my-report.xlsx"}
raw docstring

wagoe.reports.shell.adapters.pdf

PDF generation adapter using OpenHTMLtoPDF.

Three-step pipeline:

  1. Render Hiccup → HTML string (via hiccup2.core/html, which escapes strings; embed trusted markup with hiccup2.core/raw)
  2. Inject default CSS from resources/wagoe/reports/default.css
  3. Pass HTML to PdfRendererBuilder → ByteArrayOutputStream → bytes

Usage: (def pdf-gen (create-pdf-generator)) (generate! pdf-gen my-report-def data {}) ;; => {:bytes #bytes[...] :type :pdf :filename "my-report.pdf"}

PDF generation adapter using OpenHTMLtoPDF.

Three-step pipeline:
  1. Render Hiccup → HTML string (via hiccup2.core/html, which escapes
     strings; embed trusted markup with hiccup2.core/raw)
  2. Inject default CSS from resources/wagoe/reports/default.css
  3. Pass HTML to PdfRendererBuilder → ByteArrayOutputStream → bytes

Usage:
  (def pdf-gen (create-pdf-generator))
  (generate! pdf-gen my-report-def data {})
  ;; => {:bytes #bytes[...] :type :pdf :filename "my-report.pdf"}
raw docstring

wagoe.reports.shell.adapters.word

Word (DOCX) generation adapter using Apache POI XWPF.

Apache POI is already on the classpath as a transitive dependency via docjure → poi-ooxml. No new Maven dependencies are needed.

Supports the same declarative :sections API as the Excel adapter. The :template key is PDF-only and is ignored here.

Usage: (def wd-gen (create-word-generator)) (generate! wd-gen my-report-def data {}) ;; => {:bytes #bytes[...] :type :word :filename "my-report.docx"}

Word (DOCX) generation adapter using Apache POI XWPF.

Apache POI is already on the classpath as a transitive dependency
via docjure → poi-ooxml. No new Maven dependencies are needed.

Supports the same declarative :sections API as the Excel adapter.
The :template key is PDF-only and is ignored here.

Usage:
  (def wd-gen (create-word-generator))
  (generate! wd-gen my-report-def data {})
  ;; => {:bytes #bytes[...] :type :word :filename "my-report.docx"}
raw docstring

wagoe.reports.shell.jobs-integration

Async report generation on wagoe-jobs, with optional storage and email.

jobs, storage and email are optional companions, so their functions are resolved at call time rather than required: reports works without them, and a request that needs one that is not enabled fails with :missing-dependency.

Async report generation on wagoe-jobs, with optional storage and email.

jobs, storage and email are optional companions, so their functions are
resolved at call time rather than required: reports works without them, and
a request that needs one that is not enabled fails with :missing-dependency.
raw docstring

wagoe.reports.shell.module-wiring

Integrant wiring for the reports module.

:wagoe/reports is a ReportServiceProtocol. Take (ig/ref :wagoe/reports) and call wagoe.reports.ports/generate on it.

:wagoe/reports {:enabled? true :from "reports@example.com" ; sender of :notify-email mail :queue :default} ; queue generate-async enqueues on

The job queue, storage and email refs are added only for the modules that are enabled, so none of them is required.

Integrant wiring for the reports module.

`:wagoe/reports` is a ReportServiceProtocol. Take `(ig/ref :wagoe/reports)`
and call `wagoe.reports.ports/generate` on it.

  :wagoe/reports
  {:enabled? true
   :from     "reports@example.com"   ; sender of :notify-email mail
   :queue    :default}                ; queue generate-async enqueues on

The job queue, storage and email refs are added only for the modules that
are enabled, so none of them is required.
raw docstring

wagoe.reports.shell.registry

Load-time registry of report definitions.

The registry is mutable process state, so it lives in the shell — the core (wagoe.reports.core.report) stays pure (report logic only). Definitions are registered at namespace load via the defreport macro and read at runtime by the report service/adapters.

Load-time registry of report definitions.

The registry is mutable process state, so it lives in the shell — the core
(wagoe.reports.core.report) stays pure (report logic only). Definitions
are registered at namespace load via the `defreport` macro and read at
runtime by the report service/adapters.
raw docstring

wagoe.reports.shell.service

The report service behind :wagoe/reports.

Applications take (ig/ref :wagoe/reports) and call it through wagoe.reports.ports/ReportServiceProtocol, so they require no shell namespace of this module.

The report service behind `:wagoe/reports`.

Applications take `(ig/ref :wagoe/reports)` and call it through
`wagoe.reports.ports/ReportServiceProtocol`, so they require no shell
namespace of this module.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close