Documentation
¶
Index ¶
Constants ¶
View Source
const AppName = "docuhost"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct {
App struct {
URL string `mapstructure:"url"`
Version string `mapstructure:"version"`
} `mapstructure:"app"`
DB struct {
Prefix string `mapstructure:"prefix"`
User string `mapstructure:"user"`
Password string `mapstructure:"password"`
Host string `mapstructure:"host"`
Port int64 `mapstructure:"port"`
Name string `mapstructure:"name"`
Timeout int64 `mapstructure:"timeout"`
} `mapstructure:"db"`
Server struct {
Port string `mapstructure:"port"`
Timeout int64 `mapstructure:"timeout"`
} `mapstructure:"server"`
Log struct {
Debug bool `mapstructure:"debug"`
} `mapstructure:"log"`
ShortLink struct {
APIKey string `mapstructure:"apiKey"`
Domain string `mapstructure:"domain"`
} `mapstructure:"shortlink"`
}
Configuration represents the application configuration settings
func Load ¶
func Load(logger log.Logger) (*Configuration, error)
Load attempts to read the app configuration file
func (Configuration) PrettyPrint ¶
func (c Configuration) PrettyPrint()
PrettyPrint outputs a formatted listing of the configuration settings
func (Configuration) String ¶
func (c Configuration) String() string
String displays the configuration settings
type VersionInfo ¶ added in v0.2.1
type VersionInfo struct {
Version string `mapstructure:"version"`
Revision string `mapstructure:"revision"`
}
func AppVersion ¶ added in v0.2.1
func AppVersion() VersionInfo
Click to show internal directories.
Click to hide internal directories.