Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
receipt
command
Command receipt is Receiptd's CLI client: it talks to a running receiptd's REST API for most operations, and can also render a Receipt to a local PNG preview offline via render/layout and render/canvas without a running daemon.
|
Command receipt is Receiptd's CLI client: it talks to a running receiptd's REST API for most operations, and can also render a Receipt to a local PNG preview offline via render/layout and render/canvas without a running daemon. |
|
receiptd
command
Command receiptd is Receiptd's composition root.
|
Command receiptd is Receiptd's composition root. |
|
internal
|
|
|
api
Package api implements Receiptd's versioned REST handlers (/api/v1/...), translating HTTP requests into app.Service calls and apperr.Kind values into HTTP status codes (KindValidation→400, KindNotFound→404, KindUnauthorized→401, KindTransient→503, KindPermanent→500).
|
Package api implements Receiptd's versioned REST handlers (/api/v1/...), translating HTTP requests into app.Service calls and apperr.Kind values into HTTP status codes (KindValidation→400, KindNotFound→404, KindUnauthorized→401, KindTransient→503, KindPermanent→500). |
|
app
Package app is Receiptd's service/use-case layer.
|
Package app is Receiptd's service/use-case layer. |
|
apperr
Package apperr defines Receiptd's typed error taxonomy: a small, closed set of failure Kinds (validation, not found, transient, permanent, unauthorized) wrapped with the operation that produced them, so callers across the API, job queue, and logs can make decisions based on what kind of failure occurred rather than by matching error message text.
|
Package apperr defines Receiptd's typed error taxonomy: a small, closed set of failure Kinds (validation, not found, transient, permanent, unauthorized) wrapped with the operation that produced them, so callers across the API, job queue, and logs can make decisions based on what kind of failure occurred rather than by matching error message text. |
|
assets
Package assets provides named asset storage (Get/Put/Delete/List) used to resolve receipt.Asset elements — logos and other reusable images referenced by name rather than embedded inline as a receipt.Image.
|
Package assets provides named asset storage (Get/Put/Delete/List) used to resolve receipt.Asset elements — logos and other reusable images referenced by name rather than embedded inline as a receipt.Image. |
|
auth
Package auth provides Receiptd's bearer-token (API/CLI) and basic-auth (browser) middleware, sharing one underlying token check.
|
Package auth provides Receiptd's bearer-token (API/CLI) and basic-auth (browser) middleware, sharing one underlying token check. |
|
config
Package config loads and validates Receiptd's YAML configuration file.
|
Package config loads and validates Receiptd's YAML configuration file. |
|
printer
Package printer defines a printer's capabilities (Profile) and its connection details (Connection) as separate types, the Printer interface used to send already-encoded bytes to a physical printer, and the network (TCP) transport implementation.
|
Package printer defines a printer's capabilities (Profile) and its connection details (Connection) as separate types, the Printer interface used to send already-encoded bytes to a physical printer, and the network (TCP) transport implementation. |
|
queue
Package queue implements Receiptd's asynchronous, persistent print job queue: Job, JobState, the Store interface (with bbolt-backed and in-memory implementations), and Queue itself, which retries only apperr.KindTransient failures with bounded exponential backoff.
|
Package queue implements Receiptd's asynchronous, persistent print job queue: Job, JobState, the Store interface (with bbolt-backed and in-memory implementations), and Queue itself, which retries only apperr.KindTransient failures with bounded exponential backoff. |
|
receipt
Package receipt defines Receiptd's printer-agnostic document model: the Receipt type, its ordered Elements (text, headings, images, named assets, QR codes, barcodes, tables, and so on), and the registry-based JSON polymorphism used to serialize, deserialize, and validate them.
|
Package receipt defines Receiptd's printer-agnostic document model: the Receipt type, its ordered Elements (text, headings, images, named assets, QR codes, barcodes, tables, and so on), and the registry-based JSON polymorphism used to serialize, deserialize, and validate them. |
|
render/canvas
Package canvas paints a layout.Document onto a monochrome bitmap (Canvas) and encodes it as PNG for preview.
|
Package canvas paints a layout.Document onto a monochrome bitmap (Canvas) and encodes it as PNG for preview. |
|
render/escpos
Package escpos encodes a canvas.Canvas into ESC/POS bytes: raster print commands plus minimal real ESC/POS (init, feed, cut), tailored to a printer.Profile.
|
Package escpos encodes a canvas.Canvas into ESC/POS bytes: raster print commands plus minimal real ESC/POS (init, feed, cut), tailored to a printer.Profile. |
|
render/layout
Package layout turns a receipt.Receipt plus a printer.Profile into a Document: a fully resolved, positioned set of draw instructions (pure data — no pixels yet).
|
Package layout turns a receipt.Receipt plus a printer.Profile into a Document: a fully resolved, positioned set of draw instructions (pure data — no pixels yet). |
|
templates
Package templates defines the Template interface and a registration registry (Register/Get/List) used by server-side templates such as a daily weather receipt.
|
Package templates defines the Template interface and a registration registry (Register/Get/List) used by server-side templates such as a daily weather receipt. |
|
webui
Package webui implements Receiptd's browser-facing HTML handlers (html/template plus embedded static assets from web/), backed by the same app.Service used by api.
|
Package webui implements Receiptd's browser-facing HTML handlers (html/template plus embedded static assets from web/), backed by the same app.Service used by api. |
Click to show internal directories.
Click to hide internal directories.