Liking cljdoc? Tell your friends :D
Clojure only.

wagoe.storage.shell.module-wiring

Integrant lifecycle for the storage module.

Config key:

:wagoe/storage {:provider :local :root "uploads"} ; local filesystem {:provider :s3 :bucket "b" :region "eu-west-1"} ; AWS S3 / compatible {:provider :gcs :bucket "b" :project-id "p"} ; Google Cloud Storage

Returns {:provider <kw> :storage <IFileStorage> :service <IStorageService>}. Consumers (e.g. :wagoe/storage-routes) use :service.

The :local provider accepts the catalogue's :root as an alias for the local adapter's :base-path.

Integrant lifecycle for the storage module.

Config key:

:wagoe/storage
  {:provider :local :root "uploads"}                ; local filesystem
  {:provider :s3  :bucket "b" :region "eu-west-1"}  ; AWS S3 / compatible
  {:provider :gcs :bucket "b" :project-id "p"}      ; Google Cloud Storage

  Returns {:provider <kw> :storage <IFileStorage> :service <IStorageService>}.
  Consumers (e.g. :wagoe/storage-routes) use :service.

The `:local` provider accepts the catalogue's `:root` as an alias for the
local adapter's `:base-path`.
raw docstring

ig-configclj

(ig-config settings _ctx)

This module's Integrant entries, for wagoe.platform.shell.system.config.

The routes component is assembled with the module (BOU-421 — it used to be defined and never built by anyone), but mounting it is opt-in: :expose-http? true.

Opt-in because these endpoints carry no authorization of their own: upload, download, delete and signed-URL all act on any key the caller names, and the adapter cannot tell a private object from a public one. Mounting them on every application that stores a file would publish anonymous delete. Enable it when the routes sit behind your own auth.

Two settings have to agree when :signing-secret is set, and nothing can check it from here: :http-base-path places the routes (default /storage, mounted under /api/v1), and :url-base is the public URL a signed link points at. The adapter emits <url-base>/<key>, so :url-base must resolve to this module's download route — the only thing that verifies the signature. Aimed at a CDN instead, the link works and is never checked (BOU-421).

This module's Integrant entries, for `wagoe.platform.shell.system.config`.

The routes component is assembled with the module (BOU-421 — it used to be
defined and never built by anyone), but mounting it is opt-in:
`:expose-http? true`.

Opt-in because these endpoints carry no authorization of their own: upload,
download, delete and signed-URL all act on any key the caller names, and
the adapter cannot tell a private object from a public one. Mounting them
on every application that stores a file would publish anonymous delete.
Enable it when the routes sit behind your own auth.

Two settings have to agree when `:signing-secret` is set, and nothing can
check it from here: `:http-base-path` places the routes (default
`/storage`, mounted under `/api/v1`), and `:url-base` is the public URL a
signed link points at. The adapter emits `<url-base>/<key>`, so `:url-base`
must resolve to this module's download route — the only thing that verifies
the signature. Aimed at a CDN instead, the link works and is never checked
(BOU-421).
sourceraw 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