Files
grafana/pkg/models/notifications.go
T

55 lines
1.2 KiB
Go
Raw Normal View History

package models
2022-06-28 14:32:25 +02:00
import (
"errors"
"github.com/grafana/grafana/pkg/services/user"
)
2015-06-08 13:39:02 +02:00
2020-11-05 13:07:06 +01:00
var ErrInvalidEmailCode = errors.New("invalid or expired email code")
2019-04-23 11:24:47 +03: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
// SendEmailAttachFile is a definition of the attached files without path
type SendEmailAttachFile struct {
Name string
Content []byte
}
// SendEmailCommand is the command for sending emails
type SendEmailCommand struct {
To []string
SingleEmail bool
Template string
Subject string
Data map[string]interface{}
Info string
ReplyTo []string
EmbeddedFiles []string
AttachedFiles []*SendEmailAttachFile
}
// SendEmailCommandSync is the command for sending emails synchronously
2016-10-03 09:38:03 +02:00
type SendEmailCommandSync struct {
SendEmailCommand
}
type SendWebhookSync struct {
2017-03-23 21:53:54 +01:00
Url string
User string
Password string
Body string
HttpMethod string
HttpHeader map[string]string
ContentType string
Validation func(body []byte, statusCode int) error
2016-10-03 09:38:03 +02:00
}
type SendResetPasswordEmailCommand struct {
2022-06-28 14:32:25 +02:00
User *user.User
}
2015-06-08 13:39:02 +02:00
type ValidateResetPasswordCodeQuery struct {
Code string
2022-06-28 14:32:25 +02:00
Result *user.User
2015-06-08 13:39:02 +02:00
}