config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustBindEnv

func MustBindEnv(name string, envName string)

Types

type Config

type Config struct {
	Server ServerConf
	Log    LogConf
}

func MustLoad

func MustLoad() *Config

type LogConf

type LogConf struct {
	Level  string `validate:"omitempty,oneof=error warn info debug"`
	Format string `validate:"omitempty,oneof=text json"`
}

type ServerConf

type ServerConf struct {
	Port string `validate:"omitempty,numeric"`
}

Jump to

Keyboard shortcuts

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