spam

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache Cache

func NewCache

func NewCache(c *redis.Config) *Cache

NewCache NewCache

func (*Cache) ExpireDailyReply

func (c *Cache) ExpireDailyReply(ctx context.Context, mid int64, exp int) (err error)

ExpireDailyReply ExpireDailyReply

func (*Cache) IncrAct

func (c *Cache) IncrAct(ctx context.Context, mid int64) (count int, err error)

IncrAct incr user action count.

func (*Cache) IncrDailyReply

func (c *Cache) IncrDailyReply(ctx context.Context, mid int64) (count int, err error)

IncrDailyReply IncrDailyReply

func (*Cache) IncrReply

func (c *Cache) IncrReply(ctx context.Context, mid int64, isUp bool) (count int, err error)

IncrReply incr user reply count.

func (*Cache) SetActionRecSpam

func (c *Cache) SetActionRecSpam(ctx context.Context, mid int64, code, exp int) (err error)

SetActionRecSpam SetActionRecSpam

func (*Cache) SetReplyDailySpam

func (c *Cache) SetReplyDailySpam(ctx context.Context, mid int64, code, exp int) (err error)

SetReplyDailySpam SetReplyDailySpam

func (*Cache) SetReplyRecSpam

func (c *Cache) SetReplyRecSpam(ctx context.Context, mid int64, code, exp int) (err error)

SetReplyRecSpam SetReplyRecSpam

func (*Cache) TTLDailyReply

func (c *Cache) TTLDailyReply(ctx context.Context, mid int64) (ttl int, err error)

TTLDailyReply TTLDailyReply

Jump to

Keyboard shortcuts

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