config

package
v0.0.0-...-4e988be Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2018 License: GPL-3.0 Imports: 7 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 {
	ConfigFile string
	Server     serverConfig
	Database   databaseConfig
}

Config binds together configuration items

func NewConfig

func NewConfig() (*Config, error)

NewConfig produces a Config item from flags/configs

func ReadConfig

func ReadConfig(configFile string) (*Config, error)

ReadConfig reads the configuration from a file and sets defaults if needed

func (*Config) DatabaseConnection

func (c *Config) DatabaseConnection() string

DatabaseConnection produces a string containing the database host and port

func (*Config) ListenAddr

func (c *Config) ListenAddr() string

ListenAddr produces a string containing the IP and port

Jump to

Keyboard shortcuts

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