mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
33 lines
612 B
Go
33 lines
612 B
Go
package fleet
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Mailer is an email campaign
|
|
// Types which implement the Campaign interface
|
|
// can be marshalled into an email body
|
|
type Mailer interface {
|
|
Message() ([]byte, error)
|
|
}
|
|
|
|
type Email struct {
|
|
Subject string
|
|
To []string
|
|
Config *AppConfig
|
|
Mailer Mailer
|
|
}
|
|
|
|
type MailService interface {
|
|
SendEmail(e Email) error
|
|
}
|
|
|
|
// PasswordResetRequest represents a database table for
|
|
// Password Reset Requests
|
|
type PasswordResetRequest struct {
|
|
UpdateCreateTimestamps
|
|
ID uint
|
|
ExpiresAt time.Time `db:"expires_at"`
|
|
UserID uint `db:"user_id"`
|
|
Token string
|
|
}
|