(cloud-storage-client {:keys [client project-id host]})Create a GCS client. Supports :host for emulator endpoint (e.g., 'http://localhost:4443').
Create a GCS client. Supports :host for emulator endpoint (e.g., 'http://localhost:4443').
(copy-blob client bucket store-path from-blob-key to-blob-key)Copy blob from one key to another. Returns nil if source doesn't exist.
Copy blob from one key to another. Returns nil if source doesn't exist.
(delete-blob client bucket store-path blob-key)Delete blob. Returns true if deleted, false if not found.
Delete blob. Returns true if deleted, false if not found.
(read-blob-with-generation client blob-id)Read blob and return {:data :generation}, ::not-found if the blob is genuinely
absent (.get returns nil), or nil if it was deleted DURING the read (404 —
stale generation, i.e. a concurrent-modification conflict). The two absent
cases are distinguished so PReadMissSafe can turn a genuine miss into
store-key-not-found while optimistic locking still sees the conflict.
Read blob and return {:data :generation}, ::not-found if the blob is genuinely
absent (`.get` returns nil), or nil if it was deleted DURING the read (404 —
stale generation, i.e. a concurrent-modification conflict). The two absent
cases are distinguished so PReadMissSafe can turn a genuine miss into
store-key-not-found while optimistic locking still sees the conflict.(store-exists? spec & {:keys [opts]})Check if a konserve store exists at the given spec.
Check if a konserve store exists at the given spec.
(write-blob-conditional client blob-id bytes expected-generation)Write blob with generation match precondition. Returns true on success, false on conflict. GCS returns HTTP 412 (Precondition Failed) when generation doesn't match.
Write blob with generation match precondition. Returns true on success, false on conflict. GCS returns HTTP 412 (Precondition Failed) when generation doesn't match.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |