Liking cljdoc? Tell your friends :D

boundary.storage.shell.service

Storage service orchestrating file operations.

This service coordinates file validation, storage, and image processing. Follows the Functional Core / Imperative Shell pattern where this service represents the imperative shell that coordinates pure validation logic with side-effectful storage operations.

Storage service orchestrating file operations.

This service coordinates file validation, storage, and image processing.
Follows the Functional Core / Imperative Shell pattern where this service
represents the imperative shell that coordinates pure validation logic
with side-effectful storage operations.
raw docstring

create-storage-serviceclj

(create-storage-service {:keys [storage image-processor logger]})

Create a storage service.

Parameters:

  • storage: Implementation of IFileStorage
  • image-processor: Implementation of IImageProcessor (optional)
  • logger: Logger instance (optional)
Create a storage service.

Parameters:
- storage: Implementation of IFileStorage
- image-processor: Implementation of IImageProcessor (optional)
- logger: Logger instance (optional)
sourceraw docstring

IStorageServicecljprotocol

Service for managing file storage operations.

Service for managing file storage operations.

download-fileclj

(download-file _ file-key)

Download a file by its storage key.

Returns: File data map or nil if not found

Download a file by its storage key.

Returns:
File data map or nil if not found

get-file-urlclj

(get-file-url _ file-key expiration-seconds)

Get a URL for accessing a file.

For public files, returns direct URL. For private files, returns signed URL with expiration.

Returns: URL string or nil

Get a URL for accessing a file.

For public files, returns direct URL.
For private files, returns signed URL with expiration.

Returns:
URL string or nil

remove-fileclj

(remove-file _ file-key)

Remove a file from storage.

Returns: Boolean indicating success

Remove a file from storage.

Returns:
Boolean indicating success

upload-fileclj

(upload-file _ file-data metadata options)

Upload a file with validation.

Parameters:

  • file-data: Map with :bytes and :content-type
  • metadata: Map with :filename and optional :path, :visibility
  • options: Map with optional :max-size, :allowed-types, :allowed-extensions

Returns: Storage result map or validation errors

Upload a file with validation.

Parameters:
- file-data: Map with :bytes and :content-type
- metadata: Map with :filename and optional :path, :visibility
- options: Map with optional :max-size, :allowed-types, :allowed-extensions

Returns:
Storage result map or validation errors

upload-imageclj

(upload-image _ image-bytes metadata options)

Upload an image with optional processing.

Parameters:

  • image-bytes: Byte array of the image
  • metadata: Map with :filename and optional :path, :visibility
  • options: Map with optional :resize, :create-thumbnail, :thumbnail-size

Returns: Map with :original (storage result) and optional :thumbnail

Upload an image with optional processing.

Parameters:
- image-bytes: Byte array of the image
- metadata: Map with :filename and optional :path, :visibility
- options: Map with optional :resize, :create-thumbnail, :thumbnail-size

Returns:
Map with :original (storage result) and optional :thumbnail
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