repost

package
v0.0.0-...-1120f02 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("repost not found")
)

Functions

This section is empty.

Types

type Detector

type Detector interface {
	Find(channelID string, artworkID string) (*Repost, error)
	Create(*Repost, time.Duration) error
	Close() error
}

func NewMemory

func NewMemory() Detector

func NewRedis

func NewRedis(addr string) (Detector, error)

type Repost

type Repost struct {
	ID        string `redis:"id"`
	URL       string `redis:"url"`
	GuildID   string `redis:"guild_id"`
	ChannelID string `redis:"channel_id"`
	MessageID string `redis:"message_id"`
	ExpiresAt time.Time
}

Jump to

Keyboard shortcuts

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