notifications.go 770 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. ContentType string
  24. }
  25. type SendResetPasswordEmailCommand struct {
  26. User *User
  27. }
  28. type ValidateResetPasswordCodeQuery struct {
  29. Code string
  30. Result *User
  31. }