conf

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2016 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug bool `yaml:"debug"`
	DB    DB   `yaml:"db"`
	Host  Host `yaml:"host"`
}

Config struct

type ConfigManager added in v0.1.2

type ConfigManager struct {
	// contains filtered or unexported fields
}

ConfigManager struct

func NewConfig

func NewConfig(file string) *ConfigManager

NewConfig constructor

func (*ConfigManager) Load added in v0.1.2

func (cm *ConfigManager) Load() (*Config, error)

Load config from file

type DB

type DB struct {
	UserName     string `yaml:"username"`
	UserPassword string `yaml:"userpassword"`
	Host         string `yaml:"host"`
	Port         string `yaml:"port"`
	Database     string `yaml:"database"`
}

DB struct

type Host

type Host struct {
	IP   string `yaml:"ip"`
	Port string `yaml:"port"`
}

Host struct

Jump to

Keyboard shortcuts

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