filter

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 0 Imported by: 0

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.

Jump to

Keyboard shortcuts

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