config

package
v0.0.0-...-e8464d3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	LoginDelay     time.Duration `yaml:"login_delay"`
	SecretKey      string        `yaml:"secret_key"`
	Timeout        time.Duration `yaml:"timeout"`
	RefreshTimeout time.Duration `yaml:"refresh_timeout"`
}

type Config

type Config struct {
	Server   Server `yaml:"server"`
	Database Db     `yaml:"database"`
	Auth     Auth   `yaml:"auth"`

	Logger []logger.LoggerConfig `yaml:"logger"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

func NewConfig

func NewConfig(defaults bool) *Config

type Db

type Db struct {
	Driver    string `yaml:"driver"`
	DbConnect string `yaml:"db_connect"`
}

type Server

type Server struct {
	Address string `yaml:"address"`
	TLSDir  string `yaml:"tls_dir"`
}

Jump to

Keyboard shortcuts

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