Documentation ¶
Index ¶
- type Configuration
- func (c *Configuration) GetFullListenAddress() string
- func (c *Configuration) LoadFlags()
- func (c *Configuration) LoadFooter(fileName string)
- func (c *Configuration) LoadHeader(fileName string)
- func (c *Configuration) LoadSettings(configFile string) error
- func (c *Configuration) RenderView(writer http.ResponseWriter, fileName string)
- func (c *Configuration) SaveSettings(configFile string) error
- func (c *Configuration) WriteJson(writer http.ResponseWriter, jsonData []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Header string WWW string `json:"www"` WWWAbs string WWWPort float64 `json:"wwwPort"` SmtpAddress string `json:"smtpAddress"` SmtpPort float64 `json:"smtpPort"` DBEngine string `json:"dbEngine"` DBHost string `json:"dbHost"` DBPort string `json:"dbPort"` DBDatabase string `json:"dbDatabase"` DBUserName string `json:"dbUserName"` DBPassword string `json:"dbPassword"` }
var Config Configuration
func (*Configuration) GetFullListenAddress ¶
func (c *Configuration) GetFullListenAddress() string
Returns a fully qualified address and port
func (*Configuration) LoadFlags ¶
func (c *Configuration) LoadFlags()
Sets values in this Configuration struct with any command line flag values.
func (*Configuration) LoadFooter ¶
func (c *Configuration) LoadFooter(fileName string)
Loads a footer view for HTML output
func (*Configuration) LoadHeader ¶
func (c *Configuration) LoadHeader(fileName string)
Loads a header view for HTML output
func (*Configuration) LoadSettings ¶
func (c *Configuration) LoadSettings(configFile string) error
Loads the specified configuration JSON file and parses the contents into a Configuration struct. It then calls loadFlags() to determine if any command line arguments override the config file.
func (*Configuration) RenderView ¶
func (c *Configuration) RenderView(writer http.ResponseWriter, fileName string)
Renders a view to the HTTP response stream
func (*Configuration) SaveSettings ¶
func (c *Configuration) SaveSettings(configFile string) error
Saves the current settings structure to the config file.
func (*Configuration) WriteJson ¶
func (c *Configuration) WriteJson(writer http.ResponseWriter, jsonData []byte)
Takes a byte array of JSON serialized data and writes it to the HTTP response stream.
Click to show internal directories.
Click to hide internal directories.