config

package
v0.0.0-...-6690423 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2017 License: MIT Imports: 10 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 {
	Database  Database `yaml:"database"`
	Web       Web      `yaml:"web"`
	LogOutput string   `yaml:"log_output"`
}

func ConfigTest

func ConfigTest() *Config

ConfigTest returns the test configuration file

func Parse

func Parse(location string) (*Config, error)

func (*Config) OpenDatabaseConnection

func (c *Config) OpenDatabaseConnection() (*gorm.DB, error)

type Database

type Database struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Hostname string `yaml:"hostname"`
	Database string `yaml:"database"`
	Port     int    `yaml:"port"`
	Dialect  string `yaml:"dialect"`
	Location string `yaml:"location"`
}

type Web

type Web struct {
	Address     string `yaml:"address"`
	Port        int    `yaml:"port"`
	StaticFiles string `yaml:"static_files"`
}

Jump to

Keyboard shortcuts

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