Skip to content

Instantly share code, notes, and snippets.

+ ;; (postfix :other_provider_identifier_type_code i)
+ ;; (postfix :other_provider_identifier_state i)
+ ;; (postfix :other_provider_identifier_issuer i)
+
+ ;; :identifier
+ ;; [{:use 1
+ ;; :type {:coding [{:system 1
+ ;; :code 2}]}
+ ;; :system 1
+ ;; :value (postfix :other_provider_identifier i)}]
(ns ___.kafka
"Common Kafka module."
(:require [cheshire.core :as json]
[clojure.tools.logging :as log])
(:import [org.apache.kafka.clients.consumer KafkaConsumer ConsumerRecord]
[org.apache.kafka.clients.producer KafkaProducer ProducerRecord]
[org.apache.kafka.common.errors InterruptException]
[org.apache.kafka.common.serialization ByteArrayDeserializer ByteArraySerializer]))
;;
(ns ___.db
(:require [clojure.java.jdbc :as jdbc]
[clj-time.jdbc] ;; extends JDBC protocols
[honeysql.core :as sql]
[cheshire.core :as json]
[clojure.tools.logging :as log]
[migratus.core :as migratus]
[___.env :refer [env]])
(:import org.postgresql.util.PGobject))
(ns qrfd.hash)
(def charset "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
(def num->char
(into {} (map-indexed vector charset)))
(def char->num
(into {} (map-indexed (comp vec reverse vector) charset)))
(ns ____.track
"Path tracking tools. Provides a function to flatten a nested map/vector
(or their combo) into a sequence of path tracker nodes. Each such a node
carries the current child value and its path from the root.
Usage:
(track-resource {:foo {:bar [[nil {:baz 42}]]}})
({:path [], :val {:foo {:bar [[nil {:baz 42}]]}}}
{:path [:foo], :val {:bar [[nil {:baz 42}]]}}
(defprotocol IField
(set-value [this value])
(to-clojure [this])
(clean [this])
)
(ns project.queue
(:require [project.error :as e]
[project.env :refer [env]]
[taoensso.carmine :as car :refer (wcar)]
[taoensso.carmine.message-queue :as car-mq]
[clojure.tools.logging :as log])
(:refer-clojure :exclude [send]))
(ns project.sqs
(:require [cheshire.core :as json])
(:import [com.amazonaws.services.sqs
AmazonSQS
AmazonSQSClientBuilder]
[com.amazonaws.auth
BasicAWSCredentials
@igrishaev
igrishaev / api.clj
Created October 2, 2018 13:18
Single API endpoint
(ns project.api
(:require [project.spec :as spec]
[project.error :as e]
[project.handlers :as h]
[project.resp :as r]
[clojure.tools.logging :as log]))
(declare actions)