ConfigManager

package
v0.0.0-...-432c02d Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2015 License: GPL-3.0 Imports: 4 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 {
	Storage StorageConfig `json:"storage"`
}

func NewDefaultCfg

func NewDefaultCfg() *Config

func NewEnvCfg

func NewEnvCfg() *Config

func NewFileCfg

func NewFileCfg(fileName string) (*Config, error)

func NewFlagsCfg

func NewFlagsCfg() *Config

type ConfigManager

type ConfigManager struct {
	Sources map[string]*Config
	Config  Config
}

func New

func New() *ConfigManager

func (*ConfigManager) LoadAll

func (cm *ConfigManager) LoadAll()

func (*ConfigManager) LoadSource

func (cm *ConfigManager) LoadSource(name string, c *Config)

func (ConfigManager) String

func (cm ConfigManager) String() string

type DefaultConfig

type DefaultConfig struct {
}

type FileConfig

type FileConfig struct {
}

type FlagsConfig

type FlagsConfig struct {
}

type StorageConfig

type StorageConfig struct {
	Type string `json:"type"`
	DSN  string `json:"dsn"`

	Username string `json:"username"`
	Password string `json:"password"`
	Hostname string `json:"hostname"`
	Port     string `json:"port"`
	DBName   string `json:"dbName"`
}

Jump to

Keyboard shortcuts

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