config

package
v0.0.0-...-275110d Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2020 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 Config

type Config struct {
	*Runtime
	*Server
}

func LoadEnvConfig

func LoadEnvConfig() *Config

type Runtime

type Runtime struct {
	IsDebugging bool   `envconfig:"DEBUGGING" default:"true"`
	LogLevel    string `envconfig:"LOG_LEVEL" default:"debug"`
}

type Server

type Server struct {
	IP       string        `envconfig:"SERVER_IP" default:"127.0.0.1"`
	Port     string        `envconfig:"SERVER_PORT" default:"3333"`
	TLSKey   string        `envconfig:"SERVER_TLS_KEY"`
	TLSCert  string        `envconfig:"SERVER_TLS_CERT"`
	RTimeout time.Duration `envconfig:"SERVER_READ_TIMEOUT" default:"15s"`
	WTimeout time.Duration `envconfig:"SERVER_WRITE_TIMEOUT" default:"15s"`
}

func (*Server) GetFullAddr

func (s *Server) GetFullAddr() string

Jump to

Keyboard shortcuts

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