Documentation ¶
Overview ¶
Package filter provides interfaces and structures for creating and managing filters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Config string `koanf:"config"`
}
Config is a structure for holding the configuration of a filter provider. The configuration is represented as a string.
type Provider ¶
type Provider interface { // ID returns the unique identifier of the filter provider. ID() string // IsAllowed checks if the provided message is allowed by the filter. It returns true if the message is allowed, // false otherwise. IsAllowed(msg []byte) bool }
Provider is an interface for filter providers. It defines methods for getting the ID of a provider and checking if a message is allowed by the provider.
Click to show internal directories.
Click to hide internal directories.