plugs

package
v0.0.0-...-acd5450 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDisabled = errors.New("plugin is disabled")
	ErrTimeout  = errors.New("plugin execution timed out")
	ErrNotMatch = errors.New("event type not match")
	ErrEventNil = errors.New("event is nil")
)
View Source
var Prefix = []string{".", "/"}

Functions

This section is empty.

Types

type Basic

type Basic struct {
	ID string

	Name        string
	Description string

	Accepts []string
	Disable bool
	Hidden  bool
	Timeout float64

	PreExec PreExecFunc
	Exec    ExecFunc
}

func (*Basic) Check

func (b *Basic) Check(c event.Ctx) error

type Cmd

type Cmd struct {
	Basic

	Patterns []string
	Prefix   bool
}

func (*Cmd) GeneratePatterns

func (c *Cmd) GeneratePatterns() []string

func (*Cmd) Hit

func (c *Cmd) Hit(ct event.Ctx) error

type ExecFunc

type ExecFunc func(event.Ctx) error

type Listen

type Listen struct {
	Basic
}

func (*Listen) Hit

func (l *Listen) Hit(c event.Ctx) error

type PreExecFunc

type PreExecFunc func(event.Ctx) error

Jump to

Keyboard shortcuts

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