filter

package
v0.0.0-...-81cdc2d Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RuleFilter

func RuleFilter(rules []RuleConfig, s string) (bool, error)

RuleFilter filter string according to rules. Return true if the 'allow' rule matches, false otherwise.

Types

type RuleConfig

type RuleConfig struct {
	Permission string   `yaml:"permission,omitempty"`
	Regex      bool     `yaml:"regex,omitempty"`
	Patterns   []string `yaml:"patterns,omitempty"`
}

Jump to

Keyboard shortcuts

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