Liking cljdoc? Tell your friends :D

parenthesin/components

Common components used on the Parenthesin's service templates.

Components

config/aero

Reads aero config file on resources/config.edn.
Gets the current profile on enviroment var SYSTEM_ENV

Libraries

db/jdbc-hikari

Depends on config component to read connection info data

Libraries

http/clj-http

Has some mock implementations for tests

Libraries

router/reitit-malli

Has some presets, handlers and configs to use malli as input/output validations for routes

Libraries

router/reitit-schema

Has some presets, handlers and configs to use schema as input/output validations for routes

Libraries

server/reitit-pedestal-jetty

Depends on one of each type of the components [config, db, http, router] and starts a webserver with all components injected in the http context.
Gets the web port from the config file config file or the enviroment var PORT

Libraries

Helpers

helpers/state-flow/server/pedestal

Extract io.pedestat.http/service-fn frow state-flow context and calls io.pedestat.test/response-for to simulate and http request on the system server.

helpers/state-flow/db

Exposes function to direclty execute sql commands on the state-flow context db.

helpers/state-flow/http

Exposes functions to set/get http mock state.

helpers/logs

Setup function with preset appender and nice macro to log over timbre/log!

helpers/malli

Function to start / stop instrumentation as clojure.test/use-fixtures

helpers/migrations

Wrapper over migratus to create an CLI based API.
Depends on aero and jdbc to read and connect to the database.

Contributing

Tests

To run unit tests inside ./test/unit

clj -M:test :unit

To run integration tests inside ./test/integration

clj -M:test :integration

To run all tests inside ./test

clj -M:test

To generate a coverage report

clj -M:test --plugin kaocha.plugin/cloverage

Lint and format

clj -M:clojure-lsp format
clj -M:clojure-lsp clean-ns
clj -M:clojure-lsp diagnostics

Build / Deploy

  # Build
  clj -X:build :lib com.github.parenthesin/components :version '"0.1.0"'
  # Deploy
  env CLOJARS_USERNAME=username CLOJARS_PASSWORD=clojars-token clj -X:deploy :lib com.github.parenthesin/components :version '"0.1.0"'

Features

System

Tests & Checks

License

Copyright © 2023 Parenthesin

This is free and unencumbered software released into the public domain. For more information, please refer to http://unlicense.org

Can you improve this documentation?Edit on GitHub

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

× close