2014-04-24 00:22:50 +01:00
|
|
|
package config
|
2014-04-19 12:19:17 +01:00
|
|
|
|
2014-11-23 00:23:39 +00:00
|
|
|
import (
|
|
|
|
"github.com/ian-kent/Go-MailHog/mailhog/storage"
|
|
|
|
)
|
|
|
|
|
2014-04-19 12:19:17 +01:00
|
|
|
func DefaultConfig() *Config {
|
|
|
|
return &Config{
|
2014-04-20 15:35:59 +01:00
|
|
|
SMTPBindAddr: "0.0.0.0:1025",
|
|
|
|
HTTPBindAddr: "0.0.0.0:8025",
|
2014-06-24 22:21:06 +01:00
|
|
|
Hostname: "mailhog.example",
|
|
|
|
MongoUri: "127.0.0.1:27017",
|
|
|
|
MongoDb: "mailhog",
|
|
|
|
MongoColl: "messages",
|
2014-04-19 12:19:17 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Config struct {
|
2014-04-20 15:35:59 +01:00
|
|
|
SMTPBindAddr string
|
|
|
|
HTTPBindAddr string
|
2014-06-24 22:21:06 +01:00
|
|
|
Hostname string
|
|
|
|
MongoUri string
|
|
|
|
MongoDb string
|
|
|
|
MongoColl string
|
|
|
|
MessageChan chan interface{}
|
2014-11-23 00:23:39 +00:00
|
|
|
Storage storage.Storage
|
2014-06-24 22:21:06 +01:00
|
|
|
Assets func(asset string) ([]byte, error)
|
2014-04-19 12:19:17 +01:00
|
|
|
}
|