diff options
author | Eduardo Julian | 2022-12-02 19:33:00 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-12-02 19:33:00 -0400 |
commit | 94e5802f594a73245fce0fbd885103b8bf210d57 (patch) | |
tree | 65e5799c0be40f5f015b39bfa6c87c9c27fd9424 /stdlib/source/program/aedifex/repository | |
parent | b491dfff00219d5206075ea65468e00ab657075d (diff) |
Added some simple time-series handling machinery.
Diffstat (limited to 'stdlib/source/program/aedifex/repository')
-rw-r--r-- | stdlib/source/program/aedifex/repository/identity.lux | 2 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/repository/local.lux | 12 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/repository/remote.lux | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/program/aedifex/repository/identity.lux b/stdlib/source/program/aedifex/repository/identity.lux index eaca93cdb..30814ecee 100644 --- a/stdlib/source/program/aedifex/repository/identity.lux +++ b/stdlib/source/program/aedifex/repository/identity.lux @@ -39,7 +39,7 @@ (def .public (basic_auth user password) (-> User Password Text) - (let [credentials (at utf8.codec encoded (format user ":" password))] + (let [credentials (of utf8.codec encoded (format user ":" password))] (|> (java/util/Base64::getEncoder) (java/util/Base64$Encoder::encodeToString credentials) ffi.of_string diff --git a/stdlib/source/program/aedifex/repository/local.lux b/stdlib/source/program/aedifex/repository/local.lux index dcc604306..4223ddf39 100644 --- a/stdlib/source/program/aedifex/repository/local.lux +++ b/stdlib/source/program/aedifex/repository/local.lux @@ -22,10 +22,10 @@ (def .public (root environment fs) (-> (Environment Async) (file.System Async) file.Path) - (let [/ (at fs separator)] + (let [/ (of fs separator)] (|> ///local.repository (text.replaced uri.separator /) - (format (at environment home) /)))) + (format (of environment home) /)))) (def (path /) (-> Text (-> URI file.Path)) @@ -33,7 +33,7 @@ (def (absolute_path environment fs) (-> (Environment Async) (file.System Async) (-> URI file.Path)) - (let [/ (at fs separator)] + (let [/ (of fs separator)] (|>> ///metadata.local_uri (..path /) (format (..root environment fs) /)))) @@ -46,12 +46,12 @@ (def download (|>> (..absolute_path environment fs) - (at fs read))) + (of fs read))) (def (upload uri content) (do [! async.monad] [.let [absolute_path (..absolute_path environment fs uri)] - ? (at fs file? absolute_path) + ? (of fs file? absolute_path) _ (is (Async (Try Any)) (if ? (in {try.#Success []}) @@ -61,4 +61,4 @@ _ (in {try.#Success []}))))] - (at fs write absolute_path content))))) + (of fs write absolute_path content))))) diff --git a/stdlib/source/program/aedifex/repository/remote.lux b/stdlib/source/program/aedifex/repository/remote.lux index 34488b544..9386c214f 100644 --- a/stdlib/source/program/aedifex/repository/remote.lux +++ b/stdlib/source/program/aedifex/repository/remote.lux @@ -69,12 +69,12 @@ http))] (when status http/status.ok - (at ! each product.right ((the @http.#body message) {.#None})) + (of ! each product.right ((the @http.#body message) {.#None})) _ (do ! [_ ((the @http.#body message) {.#Some 0})] - (at io.monad in (exception.except ..download_failure [(format address uri) status])))))) + (of io.monad in (exception.except ..download_failure [(format address uri) status])))))) (def (upload uri content) (do (try.with io.monad) @@ -95,5 +95,5 @@ (in []) _ - (at io.monad in (exception.except ..upload_failure [(format address uri) status]))))) + (of io.monad in (exception.except ..upload_failure [(format address uri) status]))))) )) |