string_exp

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PluginType = "string_exp"

Variables

This section is empty.

Functions

func QuickSetup

func QuickSetup(_ sequence.BQ, s string) (sequence.Matcher, error)

QuickSetup returns a sequence.ExecQuickSetupFunc.

func QuickSetupFromStr

func QuickSetupFromStr(s string) (sequence.Matcher, error)

Format: "scr_string_name op [string]..." scr_string_name = {url_path|server_name|$env_key} op = {zl|eq|prefix|suffix|contains|regexp}

Types

type GetStrFunc

type GetStrFunc func(qCtx *query_context.Context) string

type Matcher

type Matcher struct {
	// contains filtered or unexported fields
}

func NewMatcher

func NewMatcher(f GetStrFunc, sm StringMatcher) *Matcher

func (*Matcher) Match

func (m *Matcher) Match(_ context.Context, qCtx *query_context.Context) (bool, error)

type StringMatcher

type StringMatcher interface {
	MatchStr(s string) bool
}

Jump to

Keyboard shortcuts

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