email

package
v0.0.0-...-3839eb7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type EmailHandler

type EmailHandler struct {
	EmailLogic Sender
	// contains filtered or unexported fields
}

func NewEmailHandler

func NewEmailHandler(cfg *conf.AppConf, emailLogic Sender, codeCache cache.RedisEmailCodeCache) EmailHandler

func (EmailHandler) SendCodeEmail

func (e EmailHandler) SendCodeEmail(ctx *gin.Context)

SendCodeEmail @Summary SendCodeEmail @Description auth code email api @Tags email @Accept json @Produce json @Param email query string true "email" @Success 200 {object} types.Response @Router /email/code [GET]

type Handler

type Handler struct {
	Email EmailHandler
}

type HandlerRouter

type HandlerRouter types.NopType

HandlerRouter just for wire injection, no real influence

func SetupRouter

func SetupRouter(api *ginx.RouterGroup, Handler Handler) HandlerRouter

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

func NewSender

func NewSender(cfg *conf.AppConf) (Sender, func(), error)

func (Sender) SendHtmlTemplateMail

func (e Sender) SendHtmlTemplateMail(mail *email.Email, tmpl string, data map[string]any) error

func (Sender) SendMail

func (e Sender) SendMail(mail *email.Email) error

func (Sender) SendTextMail

func (e Sender) SendTextMail(mail *email.Email, text string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL