email

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao struct {
	FansAddr map[int16][]string

	PrivateAddr map[string][]string
	// contains filtered or unexported fields
}

Dao is redis dao.

func New

func New(c *conf.Config) (d *Dao)

New is new redis dao.

func (*Dao) Close

func (d *Dao) Close() (err error)

Close close

func (*Dao) FastChan

func (d *Dao) FastChan() <-chan int

FastChan get fast channel

func (*Dao) MonitorNotifyTemplate

func (d *Dao) MonitorNotifyTemplate(subject string, body string, toEmails []string) (tpl *email.Template)

MinitorNotifyTeamplate 审核监控报警邮件模板

func (*Dao) NotifyEmailTemplate

func (d *Dao) NotifyEmailTemplate(params map[string]string) (tpl *email.Template)

NotifyEmailTemplate 优质UP主/时政UP主/企业UP主/十万粉丝报备邮件

func (*Dao) PopRedis

func (d *Dao) PopRedis(c context.Context, key string) (bs []byte, err error)

PopRedis lpop fail item from redis

func (*Dao) PrivateEmailTemplate

func (d *Dao) PrivateEmailTemplate(params map[string]string) (tpl *email.Template)

PrivateEmailTemplate 私单报备邮件模板

func (*Dao) PushRedis

func (d *Dao) PushRedis(c context.Context, a interface{}, key string) (err error)

PushRedis rpush fail item to redis

func (*Dao) PushToRedis

func (d *Dao) PushToRedis(c context.Context, tpl *email.Template) (isFast bool, key string, err error)

PushToRedis start to push email to redis according to speed

func (*Dao) RemoveRedis

func (d *Dao) RemoveRedis(c context.Context, key string, member ...interface{}) (reply int, err error)

RemoveRedis lrem an element from redis list

func (*Dao) SendMail

func (d *Dao) SendMail(tpl *email.Template)

SendMail send the email

func (*Dao) Start

func (d *Dao) Start(key string) (err error)

Start get email from redis and send

Jump to

Keyboard shortcuts

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