config

package
v0.0.0-...-a063660 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = &config{
	Database: Database{
		Driver:          "postgres",
		IP:              os.Getenv("POSTGRES_HOST"),
		Port:            getPort(),
		User:            os.Getenv("POSTGRES_USER"),
		Password:        os.Getenv("POSTGRES_PASSWORD"),
		Name:            os.Getenv("POSTGRES_DB"),
		ConnMaxIdle:     96,
		ConnMaxOpen:     144,
		ConnMaxLifetime: 10,
		Debug:           false,
		SSLMode:         "require",
	},
	Server: Server{
		IP:   os.Getenv("SERVER_IP"),
		Port: 4510,
	},
}

Functions

This section is empty.

Types

type Database

type Database struct {
	Driver          string
	IP              string
	Port            int
	User            string
	Password        string `json:"-"`
	Name            string
	ConnMaxIdle     int
	ConnMaxOpen     int
	ConnMaxLifetime int
	Debug           bool
	SSLMode         string
}

type Server

type Server struct {
	IP   string
	Port int
}

Jump to

Keyboard shortcuts

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