config

package
Version: v0.0.0-...-acf62fd Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Server    ServerConfiguration    `json:"server"`
	Database  DatabaseConfiguration  `json:"database"`
	Directory DirectoryConfiguration `json:"directory"`
	Logging   LoggingConfiguration   `json:"loggin"`
}

Configuration type encapsulates the configurations for the serer, database, logging, directory paths, etc.

type DatabaseConfiguration

type DatabaseConfiguration struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Database string `json:"database"`
	DBType   string `json:"dbtype"`
}

DatabaseConfiguration is a struct for database username, password, and database set by environment variables and imported via viper

type DirectoryConfiguration

type DirectoryConfiguration struct {
	StaticFilesPath string
}

DirectoryConfiguration contains the path to the directory housing static files used by the application

type LoggingConfiguration

type LoggingConfiguration struct {
	OutputFile string
	LocalFile  string
}

LoggingConfiguration is the struct for the logging output file and path

type ServerConfiguration

type ServerConfiguration struct {
	Port string `json:"port"`
}

ServerConfiguration struct

func (*ServerConfiguration) GetPort

func (s *ServerConfiguration) GetPort() string

GetPort returns the port from ServerConfiguration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL