config

package
v0.0.0-...-7d7a4ac Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvironmentVariableName is the name of the environment variable that defines the application mode.
	EnvironmentVariableName = "ECHO_ENV"
	// Development environment name
	Development = "development"
	// Test environment name
	Test = "test"
	// Production environment name
	Production = "production"
)

Variables

Engine is the current instance of storage.

View Source
var Log = logrus.New()

Log is an instance of Logrus logger

Functions

func Env

func Env() string

Env returns the current application environment.

func SetEnv

func SetEnv(environment string)

SetEnv sets the application environment.

Types

type Config

type Config struct {
	Version string `env:"APP_VERSION"`

	Workspace       string `env:"LSS_WORKSPACE" envDefault:"./workspace"`
	UploadSizeLimit string `env:"LSS_UPLOAD_SIZE_LIMIT" envDefault:"8G"`
	RouterNamespace string `env:"LSS_ROUTER_NAMESPACE" envDefault:""`
}

Config holds all configuration for our program.

var Cfg *Config

Cfg variable holds all LSS configuration.

type ProductionFormatter

type ProductionFormatter struct{}

ProductionFormatter.

func (*ProductionFormatter) Format

func (f *ProductionFormatter) Format(entry *logrus.Entry) ([]byte, error)

Format implements Logrus formatter.

Jump to

Keyboard shortcuts

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