Documentation ¶
Overview ¶
Copyright 2013-2016 Adam Presley. All rights reserved Use of this source code is governed by the MIT license that can be found in the LICENSE file.
Index ¶
- Constants
- type Configuration
- func (this *Configuration) GetDatabaseConfiguration() (storage.StorageType, *storage.ConnectionInformation)
- func (this *Configuration) GetFullServiceAppAddress() string
- func (this *Configuration) GetFullSmtpBindingAddress() string
- func (this *Configuration) GetFullWwwBindingAddress() string
- func (this *Configuration) SaveConfiguration(configFile string) error
- type ServiceTierConfiguration
Constants ¶
const (
CONFIGURATION_FILE_NAME string = "config.json"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { WWWAddress string `json:"wwwAddress"` WWWPort int `json:"wwwPort"` ServiceAddress string `json:"serviceAddress"` ServicePort int `json:"servicePort"` SmtpAddress string `json:"smtpAddress"` SmtpPort int `json:"smtpPort"` DBEngine string `json:"dbEngine"` DBHost string `json:"dbHost"` DBPort int `json:"dbPort"` DBDatabase string `json:"dbDatabase"` DBUserName string `json:"dbUserName"` DBPassword string `json:"dbPassword"` MaxWorkers int `json:"maxWorkers"` AutoStartBrowser bool `json:"autoStartBrowser"` CertFile string `json:"certFile"` KeyFile string `json:"keyFile"` DoNotStoreEmails bool `json:"doNotStoreEmails"` StorageType storage.StorageType }
The Configuration structure represents a JSON configuration file with settings for how to bind servers and connect to databases.
func LoadConfiguration ¶
func LoadConfiguration(reader io.Reader) (*Configuration, error)
Reads data from a Reader into a new Configuration structure.
func LoadConfigurationFromFile ¶
func LoadConfigurationFromFile(fileName string) (*Configuration, error)
Reads data from a file into a Configuration object. Makes use of LoadConfiguration().
func (*Configuration) GetDatabaseConfiguration ¶
func (this *Configuration) GetDatabaseConfiguration() (storage.StorageType, *storage.ConnectionInformation)
Returns a pointer to a DatabaseConnection structure with data pulled from a Configuration structure.
func (*Configuration) GetFullServiceAppAddress ¶
func (this *Configuration) GetFullServiceAppAddress() string
Returns a full address and port for the MailSlurper service application.
func (*Configuration) GetFullSmtpBindingAddress ¶
func (this *Configuration) GetFullSmtpBindingAddress() string
Returns a full address and port for the MailSlurper SMTP server.
func (*Configuration) GetFullWwwBindingAddress ¶
func (this *Configuration) GetFullWwwBindingAddress() string
Returns a full address and port for the Web application.
func (*Configuration) SaveConfiguration ¶
func (this *Configuration) SaveConfiguration(configFile string) error
Saves the current state of a Configuration structure into a JSON file.
type ServiceTierConfiguration ¶
type ServiceTierConfiguration struct { Address string Context *middleware.AppContext Database storage.IStorage Log *logging.Logger Port int CertFile string KeyFile string CertIsSelfSigned bool }
ServiceTierConfiguration allows a caller to configure how to start and run the service tier HTTP server