mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 11:20:27 -06:00
54c1bf0cc9
* Chore: use early return technic everywhere And enable "indent-error-flow" revive rule * Chore: remove if-return rule from revive config * Chore: improve error messages And enable "error-strings" revive rule * Chore: enable "error-naming" revive rule * Chore: make linter happy * Chore: do not duplicate gofmt execution * Chore: make linter happy * Chore: address the pull review comments
39 lines
770 B
Go
39 lines
770 B
Go
package models
|
|
|
|
import "errors"
|
|
|
|
var ErrInvalidEmailCode = errors.New("Invalid or expired email code")
|
|
var ErrSmtpNotEnabled = errors.New("SMTP not configured, check your grafana.ini config file's [smtp] section")
|
|
|
|
type SendEmailCommand struct {
|
|
To []string
|
|
Template string
|
|
Subject string
|
|
Data map[string]interface{}
|
|
Info string
|
|
EmbededFiles []string
|
|
}
|
|
|
|
type SendEmailCommandSync struct {
|
|
SendEmailCommand
|
|
}
|
|
|
|
type SendWebhookSync struct {
|
|
Url string
|
|
User string
|
|
Password string
|
|
Body string
|
|
HttpMethod string
|
|
HttpHeader map[string]string
|
|
ContentType string
|
|
}
|
|
|
|
type SendResetPasswordEmailCommand struct {
|
|
User *User
|
|
}
|
|
|
|
type ValidateResetPasswordCodeQuery struct {
|
|
Code string
|
|
Result *User
|
|
}
|