timer

package
v3.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func New

func New(db database.Connector) (*Service, error)

func (Service) AddCooldown

func (s Service) AddCooldown(tt plugins.TimerType, limiter, ruleID string, expiry time.Time) error

func (Service) AddPermit

func (s Service) AddPermit(channel, username string) error

func (Service) HasPermit

func (s Service) HasPermit(channel, username string) (bool, error)

func (Service) HasTimer

func (s Service) HasTimer(id string) (bool, error)

func (Service) InCooldown

func (s Service) InCooldown(tt plugins.TimerType, limiter, ruleID string) (bool, error)

func (Service) SetTimer

func (s Service) SetTimer(id string, expiry time.Time) error

func (*Service) UpdatePermitTimeout

func (s *Service) UpdatePermitTimeout(d time.Duration)

Jump to

Keyboard shortcuts

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