2014-01-09 06:42:05 +00:00
|
|
|
package models
|
2013-12-12 06:27:43 +00:00
|
|
|
|
2014-01-10 03:21:54 +00:00
|
|
|
// SMTPServer is used to provide a default SMTP server preference.
|
2013-12-12 06:27:43 +00:00
|
|
|
type SMTPServer struct {
|
|
|
|
Host string `json:"host"`
|
|
|
|
User string `json:"user"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
}
|
|
|
|
|
2014-01-10 03:21:54 +00:00
|
|
|
// Config represents the configuration information.
|
2013-12-12 06:27:43 +00:00
|
|
|
type Config struct {
|
2014-01-06 06:09:41 +00:00
|
|
|
URL string `json:"url"`
|
|
|
|
SMTP SMTPServer `json:"smtp"`
|
|
|
|
DBPath string `json:"dbpath"`
|
2013-12-12 06:27:43 +00:00
|
|
|
}
|
2013-12-12 07:00:22 +00:00
|
|
|
|
2014-01-10 03:21:54 +00:00
|
|
|
// User represents the user model for gophish.
|
2013-12-12 07:00:22 +00:00
|
|
|
type User struct {
|
2014-01-13 02:00:20 +00:00
|
|
|
Id int `json:"id"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
Hash string `json:"-"`
|
|
|
|
APIKey string `json:"apikey"`
|
2013-12-12 07:00:22 +00:00
|
|
|
}
|
2014-01-10 03:21:54 +00:00
|
|
|
|
|
|
|
// Flash is used to hold flash information for use in templates.
|
|
|
|
type Flash struct {
|
|
|
|
Type string
|
|
|
|
Message string
|
|
|
|
}
|