2015-06-05 14:15:38 +08:00
|
|
|
package models
|
|
|
|
|
|
2015-06-08 19:39:02 +08:00
|
|
|
import "errors"
|
|
|
|
|
|
|
|
|
|
var ErrInvalidEmailCode = errors.New("Invalid or expired email code")
|
|
|
|
|
|
2015-06-05 14:15:38 +08:00
|
|
|
type SendEmailCommand struct {
|
2016-10-20 21:06:59 +08:00
|
|
|
To []string
|
|
|
|
|
Template string
|
2016-12-15 21:26:35 +08:00
|
|
|
Subject string
|
2016-10-20 21:06:59 +08:00
|
|
|
Data map[string]interface{}
|
|
|
|
|
Info string
|
|
|
|
|
EmbededFiles []string
|
2015-06-05 14:15:38 +08:00
|
|
|
}
|
|
|
|
|
|
2016-10-03 15:38:03 +08:00
|
|
|
type SendEmailCommandSync struct {
|
|
|
|
|
SendEmailCommand
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type SendWebhookSync struct {
|
2016-10-18 22:18:16 +08:00
|
|
|
Url string
|
|
|
|
|
User string
|
|
|
|
|
Password string
|
|
|
|
|
Body string
|
|
|
|
|
HttpMethod string
|
2017-01-19 15:25:21 +08:00
|
|
|
HttpHeader map[string]string
|
2016-10-03 15:38:03 +08:00
|
|
|
}
|
|
|
|
|
|
2015-06-05 14:15:38 +08:00
|
|
|
type SendResetPasswordEmailCommand struct {
|
2015-06-05 17:08:19 +08:00
|
|
|
User *User
|
2015-06-05 14:15:38 +08:00
|
|
|
}
|
|
|
|
|
|
2015-06-08 19:39:02 +08:00
|
|
|
type ValidateResetPasswordCodeQuery struct {
|
|
|
|
|
Code string
|
|
|
|
|
Result *User
|
|
|
|
|
}
|