counter

package
v3.20.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCounterValue

func GetCounterValue(db database.Connector, counterName string) (int64, error)

func Register

func Register(args plugins.RegistrationArguments) error

func UpdateCounter

func UpdateCounter(db database.Connector, counterName string, value int64, absolute bool) error

Types

type ActorCounter

type ActorCounter struct{}

func (ActorCounter) Execute

func (a ActorCounter) Execute(_ *irc.Client, m *irc.Message, r *plugins.Rule, eventData *plugins.FieldCollection, attrs *plugins.FieldCollection) (preventCooldown bool, err error)

func (ActorCounter) IsAsync

func (a ActorCounter) IsAsync() bool

func (ActorCounter) Name

func (a ActorCounter) Name() string

func (ActorCounter) Validate

func (a ActorCounter) Validate(tplValidator plugins.TemplateValidatorFunc, attrs *plugins.FieldCollection) (err error)

type Counter added in v3.19.0

type Counter struct {
	Name  string `gorm:"primaryKey"`
	Value int64
}

Jump to

Keyboard shortcuts

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