2015-06-05 01:15:38 -05:00
|
|
|
package models
|
|
|
|
|
2015-06-08 06:39:02 -05:00
|
|
|
import "errors"
|
|
|
|
|
|
|
|
var ErrInvalidEmailCode = errors.New("Invalid or expired email code")
|
2017-04-25 06:16:37 -05:00
|
|
|
var ErrSmtpNotEnabled = errors.New("SMTP not configured, check your grafana.ini config file's [smtp] section.")
|
2015-06-08 06:39:02 -05:00
|
|
|
|
2015-06-05 01:15:38 -05:00
|
|
|
type SendEmailCommand struct {
|
2016-10-20 08:06:59 -05:00
|
|
|
To []string
|
|
|
|
Template string
|
2016-12-15 07:26:35 -06:00
|
|
|
Subject string
|
2016-10-20 08:06:59 -05:00
|
|
|
Data map[string]interface{}
|
|
|
|
Info string
|
|
|
|
EmbededFiles []string
|
2015-06-05 01:15:38 -05:00
|
|
|
}
|
|
|
|
|
2016-10-03 02:38:03 -05:00
|
|
|
type SendEmailCommandSync struct {
|
|
|
|
SendEmailCommand
|
|
|
|
}
|
|
|
|
|
|
|
|
type SendWebhookSync struct {
|
2016-10-18 09:18:16 -05:00
|
|
|
Url string
|
|
|
|
User string
|
|
|
|
Password string
|
|
|
|
Body string
|
|
|
|
HttpMethod string
|
2017-01-19 01:25:21 -06:00
|
|
|
HttpHeader map[string]string
|
2016-10-03 02:38:03 -05:00
|
|
|
}
|
|
|
|
|
2015-06-05 01:15:38 -05:00
|
|
|
type SendResetPasswordEmailCommand struct {
|
2015-06-05 04:08:19 -05:00
|
|
|
User *User
|
2015-06-05 01:15:38 -05:00
|
|
|
}
|
|
|
|
|
2015-06-08 06:39:02 -05:00
|
|
|
type ValidateResetPasswordCodeQuery struct {
|
|
|
|
Code string
|
|
|
|
Result *User
|
|
|
|
}
|