cfg

package
v0.0.0-...-3b7be81 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCfg

type AppCfg struct {
	Introspection struct {
		Enable bool `envconfig:"default=true"`
	}

	Mongo struct {
		DSN        string `envconfig:"default=mongodb://localhost:27017"`
		ImageDB    string `envconfig:"default=images"`
		TemplateDB string `envconfig:"default=templates"`
		ActsDB     string `envconfig:"default=acts"`
	}

	Database struct {
		DSN                   string `envconfig:"default=postgres://postgres:secret@postgres:5432/rosseti"`
		Params                string `envconfig:"default=connect_timeout=10&sslmode=disable"`
		MaxIdleConnections    int    `envconfig:"default=5"`
		MaxOpenedConnections  int    `envconfig:"default=10"`
		MaxConnectionLifetime string `envconfig:"default=10s"`
	}

	Pg struct {
		Migrate struct {
			Dir    string `envconfig:"default=/internal/db/migrations/pg"`
			Action string `envconfig:"default=up"`
		}
	}

	PublicHTTP struct {
		Listen string `envconfig:"default=0.0.0.0:9000"`
	}

	PrivateHTTP struct {
		Listen string `envconfig:"default=0.0.0.0:9100"`
	}

	Logger struct {
		Level           string `envconfig:"default=INFO"`
		SuperVerbosive  bool   `envconfig:"default=false"`
		NoColoredOutput bool   `envconfig:"default=true"`
	}
}

func NewConfig

func NewConfig() *AppCfg

Jump to

Keyboard shortcuts

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