config

package
v0.0.0-...-6765add Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(path string)

Types

type Config

type Config struct {
	EnvType      string // production, staging, development
	Adapters     map[string]Credential
	FeatureFlags struct {
		Flag bool
	}
	Logging struct {
		Level  string
		Format string
	}
	DB struct {
		Postgres Postgres
	}
}
var Env Config

func (*Config) IsDevelopment

func (c *Config) IsDevelopment() bool

type Credential

type Credential struct {
	Auth struct {
		Username string
		Password string
	}
	BaseURL string
	Timeout int
}

type Postgres

type Postgres struct {
	Debug          bool
	Host           string
	Port           int
	Username       string
	Password       string
	DBName         string
	HasSSL         bool
	ClientEncoding string
	Timeout        int
	Timezone       string
}

Jump to

Keyboard shortcuts

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