Documentation ¶
Index ¶
- func GetCurrentUnsubscriptionsByUserID(ctx context.Context, userID persist.DBID) (persist.EmailUnsubscriptions, error)
- func RequestVerificationEmail(ctx context.Context, userID persist.DBID) error
- func UnsubscribeByJWT(ctx context.Context, jwt string, unsubTypes []model.EmailUnsubscriptionType) error
- func UpdateUnsubscriptionsByUserID(ctx context.Context, userID persist.DBID, ...) error
- type GetSubscriptionsResponse
- type GetUnsubscriptionsInput
- type PreverifyEmailInput
- type PreverifyEmailOutput
- type PreverifyEmailResult
- type ResubInput
- type UnsubInput
- type UpdateUnsubscriptionsTypeInput
- type VerificationEmailInput
- type VerifyEmailInput
- type VerifyEmailOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnsubscribeByJWT ¶
Types ¶
type GetSubscriptionsResponse ¶
type GetSubscriptionsResponse struct {
Unsubscriptions persist.EmailUnsubscriptions `json:"unsubscriptions"`
}
type GetUnsubscriptionsInput ¶
type PreverifyEmailInput ¶
type PreverifyEmailOutput ¶
type PreverifyEmailOutput struct {
Result PreverifyEmailResult `json:"result"`
}
func PreverifyEmail ¶
type PreverifyEmailResult ¶
type PreverifyEmailResult int
const ( PreverifyEmailResultInvalid PreverifyEmailResult = iota PreverifyEmailResultRisky PreverifyEmailResultValid )
type ResubInput ¶
type ResubInput struct { JWT string `json:"jwt" binding:"required"` Resubs []model.EmailUnsubscriptionType `json:"resubscriptions" binding:"required"` }
type UnsubInput ¶
type UnsubInput struct { JWT string `json:"jwt" binding:"required"` Unsubs []model.EmailUnsubscriptionType `json:"unsubscriptions" binding:"required"` }
type UpdateUnsubscriptionsTypeInput ¶
type UpdateUnsubscriptionsTypeInput struct { UserID persist.DBID `json:"user_id" binding:"required"` Unsubs persist.EmailUnsubscriptions `json:"unsubscriptions" binding:"required"` }
type VerificationEmailInput ¶
type VerifyEmailInput ¶
type VerifyEmailInput struct {
JWT string `json:"jwt" binding:"required"`
}
type VerifyEmailOutput ¶
type VerifyEmailOutput struct { UserID persist.DBID `json:"user_id"` Email persist.Email `json:"email"` }
func VerifyEmail ¶
func VerifyEmail(ctx context.Context, token string) (VerifyEmailOutput, error)
Click to show internal directories.
Click to hide internal directories.