butterrobot/internal/model/plugin.go
Felipe M. 7c684af8c3
All checks were successful
ci/woodpecker/tag/release Pipeline was successful
refactor: python -> go
2025-04-20 14:13:44 +02:00

28 lines
No EOL
658 B
Go

package model
import (
"errors"
)
var (
// ErrPluginNotFound is returned when a requested plugin doesn't exist
ErrPluginNotFound = errors.New("plugin not found")
)
// Plugin defines the interface all chat plugins must implement
type Plugin interface {
// GetID returns the plugin ID
GetID() string
// GetName returns the plugin name
GetName() string
// GetHelp returns the plugin help text
GetHelp() string
// RequiresConfig indicates if the plugin requires configuration
RequiresConfig() bool
// OnMessage processes an incoming message and returns response messages
OnMessage(msg *Message, config map[string]interface{}) []*Message
}