context

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 1 Imported by: 6

README

Environment Variables

Server Port: [Optional]

QLedger server by default runs in port 7000, which can be overridden by the following:

export PORT=7000
Authentication Token:

QLedger API requests are authenticated using the secret token, which can be set using the following:

export LEDGER_AUTH_TOKEN=XXXXX
Database URL:

QLedger uses PostgreSQL database to store the accounts and transactions.

The PostgreSQL database URL can be set using:

export DATABASE_URL="postgres://localhost/ledgerdb?sslmode=disable"

For the purpose of running test cases, a separate database URL can be set using:

export TEST_DATABASE_URL="postgres://localhost/qw_ledger_test?sslmode=disable"

Note:

Sharing Load Balancer/Domain Name: [Optional]

In staging/production environments, the services are usually deployed in the same domain, differentiated and routed using the definite path prefixes.

To access all QLedger APIs with prefix /qledger/api, set the following:

export HOST_PREFIX=/qledger/api

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppContext

type AppContext struct {
	DB *sql.DB
}

AppContext provides the context to the app components such as controllers, jobs, etc.,

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL