Documentation
¶
Overview ¶
Package config reads config files and returns the proper config structure.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
// LogList is a list of log file locations that should be read if no arguments are uncompressed.
LogList []string `toml:"LogList"`
// EmailList is the list of recipients that will get an email when algorithm is done.
EmailList []string `toml:"EmailList"`
// OutputFile is the location of a file to output the emails if an SMTP server is not present.
OutputFile string `toml:"OutputFile"`
// SMTPConfig is the locationn of the SMTP config file with credentials in it.
SMTPConfig string `toml:"SMTPConfig"`
// Port is the port at which the API is to listen on.
Port int `toml:"Port"`
}
Configuration is the main configurations for the application.
type SMTPConfig ¶
type SMTPConfig struct {
// Server has the information about the where the SMTP server is hosted and what port it is listening on.
Server Server
// User is the person who is going to be the person who is sending the emails.
User User
}
SMTPConfig is the configurations for a personal SMTP server a user would like to use.
func LoadSMTP ¶
func LoadSMTP() (*SMTPConfig, error)
LoadSMTP loads the settings for the smtp server.
type SecretConfig ¶
type SecretConfig struct {
// Sender is the user who is sending the email.
Sender string `toml:"Sender"`
// Domain is the domain name of which we want to use.
Domain string `toml:"Domain"`
// PrivateKey is the private key to access MailGun's API.
PrivateKey string `toml:"PrivateKey"`
// PublicKey is the public key to access MailGun's API.
PublicKey string `toml:"PublicKey"`
}
SecretConfig is the configurations to hold the keys for MailGun.
Click to show internal directories.
Click to hide internal directories.