Skip to content

feat: Improved Regex handling and Custom type compilers#268

Merged
CodeShellDev merged 5 commits intov1.6.0from
feat/better-regex-handling-in-endpoints
Mar 1, 2026
Merged

feat: Improved Regex handling and Custom type compilers#268
CodeShellDev merged 5 commits intov1.6.0from
feat/better-regex-handling-in-endpoints

Conversation

@CodeShellDev
Copy link
Owner

@CodeShellDev CodeShellDev commented Feb 28, 2026

Summary

Soo much stuff changed / added / removed ...

Changes

  • removed AllowBlockSlice in favor of StringMatchList
  • moved generics to own package
  • implemented endpoints and ipfilters with the new StringMatchRules (split into allowed and blocked instead of one common long list prepended with ! or not)
  • updated gotl for compiler interface
  • implemented custom compiler for FieldPolicies to gather values from raw compile them into their final structs and also convert strings to enums (from our new generics)
  • added matchrules, with support for
    • exact match
    • equals match
    • glob-like pattern matching
    • regex
    • contains
    • has (for maps)
    • prefix matching
    • suffix matching
  • made wrapper structs to standard type wrappers instead of structs with embedded Value (like time.Duration as Value field)
  • adapted to new generic types like TimeDuration not using underlying Value field
  • removed matching from field policies to instead use matchrules
  • added string match rules just for string matching (endpoints for example now uses them)
  • updated defaults for blocked endpoints to use new system

Checklist

  • PR tested
  • Docs updated (if applicable)

Related

* removed AllowBlockSlice in favor of StringMatchList
* moved generics to own package
* implemented endpoints and ipfilters with the new StringMatchRules (split into allowed and blocked instead of one common long list prepended with `!` or not)
* updated gotl for compiler interface
* implemented custom compiler for FieldPolicies to gather values from raw compile them into their final structs and also convert strings to enums (from our new generics)
* added matchrules, with support for
   - exact match
   - equals match
   - glob-like pattern matching
   - regex
   - contains
   - has (for maps)
   - prefix matching
   - suffix matching
* made wrapper structs to standard type wrappers instead of structs with embedded Value (like time.Duration as Value field)
* adapted to new generic types like TimeDuration not using underlying Value field
* removed matching from field policies to instead use matchrules
* added string match rules just for string matching (endpoints for example now uses them)
* updated defaults for blocked endpoints to use new system
@CodeShellDev CodeShellDev merged commit af6b50d into v1.6.0 Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Field Policies not parsing because of failed type conversion Better regex handling for Endpoints Pre-Process Structs instead of on-the-fly

1 participant