Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.
/ chaki Public archive

Simple, configuration based, query/task runner

License

Notifications You must be signed in to change notification settings

paultyng/chaki

Repository files navigation

Chaki

Task Format

dbConnections:
  sqlite:
    driver: sqlite3
    dataSource: ':memory:'
tasks:
  update-user-email:
    title: Update User's Email
    description: Update a user's email address.
    db:
      connection: sqlite
      sql: update users set email = :email where id = :id
    schema:
      properties:
        id:
          title: User ID
          type: integer
        email:
          title: Email
          pattern: '@'
          type: string
  update-order-status:
    title: Update Order Status
    description: Change an order's status.
    db:
      connection: sqlite
      sql: update orders set status = :status where number = :number
    schema:
      properties:
        number:
          title: Order Number
          type: string
          pattern: '[0-9]+'
        status:
          title: Status
          type: string
          enum:
            - shipped
            - delivered
            - cancelled
          default: shipped

Setup

  1. Create a tasks.yaml file (see the Task Format)
  2. Generate a key for the JWT:
ssh-keygen -t rsa -b 4096 -f chaki.key
# Don't add passphrase
openssl rsa -in chaki.key -pubout -outform PEM -out chaki.key.pub
cat chaki.key
cat chaki.key.pub
  1. Setup a config.yaml with your GHE OAuth ID and secret.

Running

go install
yarn build
chaki serve

About

Simple, configuration based, query/task runner

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published