conf

package
v0.0.0-...-426b14a Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package conf handles the configuration of the applications. Yaml files are mapped with the struct

Index

Constants

View Source
const PROJECTNAME string = "go-daemon"

PROJECTNAME TODO: should be replaced in your application

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DebugEnabled     bool          `yaml:"debug_enabled,omitempty"`
	Oauth2Enabled    bool          `yaml:"oauth2_enabled,omitempty"`
	ProfilingEnabled bool          `yaml:"profiling_enabled,omitempty"`
	LogFlushInterval time.Duration `yaml:"log_flush_interval,omitempty"`
	URL              string        `yaml:"url,omitempty"`
	RealURL          *url.URL      //RealURL to our service endpoint parsed from URL
	AuthURL          string        `yaml:"auth_url,omitempty"`
	TokenURL         string        `yaml:"token_url,omitempty"`
	Username         string        `yaml:"user,omitempty"`
}

Config is the configuration struct. The config file config.yaml will unmarshaled to this struct.

func New

func New() (*Config, error)

New returns the loaded configuration or panic

Jump to

Keyboard shortcuts

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