implement jvm platform
This commit is contained in:
parent
f5d6d6f27b
commit
a8cbdf108b
3 changed files with 14 additions and 2 deletions
|
@ -9,7 +9,6 @@
|
|||
:source-paths ["src/main/cljc"
|
||||
"src/main/clj"]
|
||||
:resource-paths ["src/main/resources"]
|
||||
|
||||
:repositories [["snapshots" :clojars]
|
||||
["releases" :clojars]]
|
||||
:deploy-repositories [["snapshots" :clojars]
|
||||
|
|
13
src/main/clj/yaml.clj
Normal file
13
src/main/clj/yaml.clj
Normal file
|
@ -0,0 +1,13 @@
|
|||
(ns dda.k8s-mastodon-bot.yaml
|
||||
(:require
|
||||
[clojure.java.io :as io]
|
||||
[clj-yaml.core :as yaml]))
|
||||
|
||||
(defn load-resource [resource-name]
|
||||
(slurp (io/resource resource-name)))
|
||||
|
||||
(defn from-string [input]
|
||||
(yaml/parse-string input))
|
||||
|
||||
(defn to-string [edn]
|
||||
(yaml/generate-string edn :dumper-options {:flow-style :block}))
|
|
@ -18,4 +18,4 @@
|
|||
:labels {:app.kubernetes.io/name "k8s-mastodon-bot"}},
|
||||
:data {:config.edn "some-config-value\n",
|
||||
:credentials.edn "some-credentials-value\n"}}
|
||||
(cut/from-string (cut/load-resource "config.yml")))))
|
||||
(cut/from-string (cut/load-resource "config.yaml")))))
|
||||
|
|
Loading…
Reference in a new issue