Liking cljdoc? Tell your friends :D

confetti.s3-deploy


->opclj

(->op diff s3-key)

Given a diff and a key return the required operation to sync

Given a diff and a key return the required operation to sync
sourceraw docstring

calculate-opsclj

(calculate-ops bucket-objects file-maps)

Generate set of operations to get in sync from a given diff

Generate set of operations to get in sync from a given diff
sourceraw docstring

cloudfront-invalidate!clj

(cloudfront-invalidate! cred distribution-id paths)

Create an invalidation for paths in dist.

Create an invalidation for `paths` in `dist`.
sourceraw docstring

dedupe-diffclj

(dedupe-diff {:keys [changed removed] :as diff})

Remove all keys that are in the changed map from the removed map.

Remove all keys that are in the changed map from the removed map.
sourceraw docstring

diff*clj

(diff* bucket-objects file-maps)

Get the difference between objects in a S3 bucket and files on disk. If a file is changed the old version {key,md5} will be part of the removed key.

  • bucket-objects is expected to be a list bucket object summaries as they are returned by amazonica.aws.s3/list-objects.

  • file-maps is a seq of maps containing the following keys: s3-key, file.

Get the difference between objects in a S3 bucket and files on disk.
If a file is changed the old version {key,md5} will be part of the
`removed` key.

- `bucket-objects` is expected to be a list bucket object
  summaries as they are returned by `amazonica.aws.s3/list-objects`.

- `file-maps` is a seq of maps containing the following keys: s3-key, file.
sourceraw docstring

dir->file-mapsclj

(dir->file-maps dir)

Create a file-map as it's expected by diff* from a local directory.

Create a file-map as it's expected by `diff*` from a local directory.
sourceraw docstring

FileMapclj

Schema for file-maps

Schema for file-maps
sourceraw docstring

get-bucket-objectsclj

(get-bucket-objects cred bucket-name)
source

sync!clj

(sync! cred bucket-name file-maps)
(sync! cred bucket-name file-maps {:keys [report-fn prune? dry-run?]})

Sync files described by file-maps to S3 bucket-name. The file-maps collection may be ordered in which case S3 operations will be executed in the same order.

file-mapsneed to have the following keys :s3-key & :file. Optionally a :metadata key can be supplied to add custom metadata to the uploaded S3 object.

Changes to an objects metadata will only get updated if also the object itself changed, i.e. changes only to an objects metadata will not cause the remote object to get updated.

Recognized options:

  • report-fn takes 2 arguments (type, data) will be called for each added and changed file being uploaded to S3.
  • dry-run? if truthy no side effects will be executed.
  • if prune? is a truthy value sync! will delete files from the S3 bucket that are not in file-map.
Sync files described by `file-maps` to S3 `bucket-name`.
The file-maps collection may be ordered in which case S3
operations will be executed in the same order.

`file-maps`need to have the following keys `:s3-key` & `:file`.
Optionally a `:metadata` key can be supplied to add custom
metadata to the uploaded S3 object.

Changes to an objects metadata will only get updated if also
the object itself changed, i.e. changes only to an objects
metadata will not cause the remote object to get updated.

Recognized options:
- `report-fn` takes 2 arguments (type, data) will be called
  for each added and changed file being uploaded to S3.
- `dry-run?` if truthy no side effects will be executed.
- if `prune?` is a truthy value `sync!` will delete files
  from the S3 bucket that are not in `file-map`.
sourceraw docstring

uploadclj

(upload creds bucket key file metadata)
source

validate-creds!clj

(validate-creds! cred)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close