conf

package
v0.0.0-...-ac55774 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLimit  = 10
	DefaultOffset = 0
)

Default params for our application.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vars

type Vars struct {
	AppName      string `toml:"-"`
	Mode         string `toml:"mode"`
	Port         string `toml:"port"`
	GraceTimeout int    `toml:"grace_timeout"`
	Log          struct {
		Access string `toml:"access"`
		Error  string `toml:"error"`
		Format string `toml:"format"`
	} `toml:"log"`
	Postgres struct {
		Host string `toml:"host"`
		Port string `toml:"port"`
		User string `toml:"user"`
		Pass string `toml:"pass"`
		DB   string `toml:"db"`
	} `toml:"postgres"`
}

Vars respresent configuration for an app.

func Read

func Read(appName, path string) *Vars

Read application configuration into Vars struct.

Jump to

Keyboard shortcuts

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