basiliq 0.1.2

REST API server exposing a Postgres database using JSON:API
name: basiliq
version: "0.0"
author: Francis (GrandChaman) Le Roy <francis.leroy@protonmail.ch>
about: Serve your tastiest data-centric APIs

settings:
  - ColorAuto
  - GlobalVersion
  - SubcommandRequiredElseHelp

args:
  - dbhost:
      short: h
      long: dbhost
      help: host of the database
      takes_value: true
  - dbport:
      short: p
      long: dbport
      help: port of the database
      takes_value: true
  - dbusername:
      short: u
      long: dbuser
      help: user of the database
      takes_value: true
  - dbpassword:
      short: P
      long: dbpass
      help: pass of the database
      takes_value: true
  - dbdatabase:
      short: n
      long: dbname
      help: name of the database
      takes_value: true
  - dbconnstring:
      short: d
      long: db
      help: postgres connection string
      takes_value: true
  - dbstatement_cache_capacity:
      long: dbcache_capacity
      help: database statement cache capacity
      takes_value: true
  - dbssl_root_cert:
      long: dbroot_cert
      help: database root certificate
      takes_value: true
  - dbconn_nb:
      long: dbconn_number
      short: N
      help: database connection number certificate
      takes_value: true
  - dbssl_mode:
      long: dbssl_mode
      help: database ssl mode
      takes_value: true
      possible_values:
        - disable
        - allow
        - prefer
        - require
        - verify-ca
        - verify-full
  - dbsocket:
      long: dbsocket
      help: socket connecting to the database
      takes_value: true
      conflicts_with:
          - dbhost
  - dbapp_name:
      long: dbapp_name
      help: application name to send to the database, preceded by `basiliq_` 
      takes_value: true
  - verbose:
      long: verbose
      short: v
      help: increase verbosity, can be repeated
      multiple: true
subcommands:
  - config:
      settings:
        - SubcommandRequiredElseHelp
      about: Handles configuration
      subcommands:
        - generate:
            about: Generate configuration from a database
            args:
              - output:
                  short: o
                  long: output
                  help: output file
                  takes_value: true
              - overwrite:
                  short: w
                  long: overwrite
                  help: overwrite file
                  takes_value: false
        - check:
            about: Check that the configuration is valid
            args:
              - input:
                  short: i
                  long: input
                  help: input file
                  takes_value: true
              - no_scan:
                  short: n
                  long: no-scan
                  help: don't scan the database to check against it's schema
                  takes_value: false
  - serve:
      about: Start basiliq's server
      args:
        - demo_mode:
            long: demo
            help: start in demo mode, rolling back every database query
            takes_value: false
        - config:
            help: config file
            required: false
            index: 1
        - dynamic_config:
            help: just in time config
            short: D
            long: dynamic-config
        - bind_port:
            short: P
            help: The port on which to start the server. Default to 8080
            takes_value: true
        - bind_host:
            short: H
            help: The host on which to bind the server. Default to 127.0.0.1
            takes_value: true