notifications.go 745 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package models
  2. import "errors"
  3. var ErrInvalidEmailCode = errors.New("Invalid or expired email code")
  4. var ErrSmtpNotEnabled = errors.New("SMTP not configured, check your grafana.ini config file's [smtp] section.")
  5. type SendEmailCommand struct {
  6. To []string
  7. Template string
  8. Subject string
  9. Data map[string]interface{}
  10. Info string
  11. EmbededFiles []string
  12. }
  13. type SendEmailCommandSync struct {
  14. SendEmailCommand
  15. }
  16. type SendWebhookSync struct {
  17. Url string
  18. User string
  19. Password string
  20. Body string
  21. HttpMethod string
  22. HttpHeader map[string]string
  23. }
  24. type SendResetPasswordEmailCommand struct {
  25. User *User
  26. }
  27. type ValidateResetPasswordCodeQuery struct {
  28. Code string
  29. Result *User
  30. }