config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DATABASE_NAME                 = "DATABASE_NAME"
	DATABASE_HOSTNAME             = "DATABASE_HOSTNAME"
	DATABASE_PORT                 = "DATABASE_PORT"
	DATABASE_USER                 = "DATABASE_USER"
	DATABASE_PASSWORD             = "DATABASE_PASSWORD"
	DATABASE_MAX_IDLE_CONNECTIONS = "DATABASE_MAX_IDLE_CONNECTIONS"
	DATABASE_MAX_OPEN_CONNECTIONS = "DATABASE_MAX_OPEN_CONNECTIONS"
	DATABASE_MAX_CONN_LIFETIME    = "DATABASE_MAX_CONN_LIFETIME"
)

Env variables

Variables

This section is empty.

Functions

func DbConnectionString

func DbConnectionString(dbConfig Database) string

DbConnectionString function to construct and return the db connection string from a Database config

Types

type Client

type Client struct {
	RPCPath string
}

Client holds configuraiton information for the eth client

type Database

type Database struct {
	Hostname    string
	Name        string
	User        string
	Password    string
	Port        int
	MaxIdle     int
	MaxOpen     int
	MaxLifetime int
}

Database is the config struct for the Postgres database

func (*Database) Init added in v0.1.0

func (d *Database) Init()

Init inits the database config from env/config values Precedence is env variables > cli flags > toml config values

Jump to

Keyboard shortcuts

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