Envelope Store API

Goal

Envelope Store is responsible for:

  • Storing Transaction’s execution context while it’s being mined.

Quick-Start

Configure Run

The application can be configured through flags or environment variables, we can run the help run command line.

go run . help run
Usage:
  orchestrate envelope-store run [flags]

Flags:
      --db-database string           Target Database name
                                     Environment variable: "DB_DATABASE" (default "postgres")
      --db-host string               Database host
                                     Environment variable: "DB_HOST" (default "127.0.0.1")
      --db-password string           Database User password
                                     Environment variable: "DB_PASSWORD" (default "postgres")
      --db-poolsize int              Maximum number of connections on database
                                     Environment variable: "DB_POOLSIZE"
      --db-port int                  Database port
                                     Environment variable: "DB_PORT" (default 5432)
      --db-user string               Database User.
                                     Environment variable: "DB_USER" (default "postgres")
      --envelope-store-type string   Type of Envelope Store (one of ["postgres" "in-memory"])
                                     Environment variable: "ENVELOPE_STORE_TYPE" (default "postgres")
  -h, --help                         help for run

Configure Migrate

Migration can be configured through flags or environment variables, we can run the help migrate command line.

go run . help migrate
Migrate database

Usage:
  orchestrate envelope-store migrate [flags]
  orchestrate envelope-store migrate [command]

Available Commands:
  down        Reverts last migration
  init        Initialize database
  reset       Reverts all migrations
  set-version Set database version
  up          Upgrade database
  version     Print current database version

Flags:
      --db-database string   Target Database name
                             Environment variable: "DB_DATABASE" (default "postgres")
      --db-host string       Database host
                             Environment variable: "DB_HOST" (default "127.0.0.1")
      --db-password string   Database User password
                             Environment variable: "DB_PASSWORD" (default "postgres")
      --db-poolsize int      Maximum number of connections on database
                             Environment variable: "DB_POOLSIZE"
      --db-port int          Database port
                             Environment variable: "DB_PORT" (default 5432)
      --db-user string       Database User.
                             Environment variable: "DB_USER" (default "postgres")
  -h, --help                 help for migrate

Warning

♦ Default values can be changed by using environment variables.

♦ Environment variables will be overwritten by Flags values.