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