switchy

package module
v0.0.0-...-c5647f0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 6 Imported by: 0

README

Switchy Parser on Golang

This a Switchy Rule parser implemented on Golang.

Implement Status

Host conditions

  • Host wildcard condition
  • Host regex condition
  • Host levels condition
  • IP Literals

URL conditions

  • URL wildcard condition
  • URL regex condition
  • Keyword condition

Credits

gobwas/glob
stretchr/testify

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rule

type Rule interface {
	Note() string
	Match(string) bool
	String() string
}

type Rules

type Rules []Rule

func Parse

func Parse(s string) (Rules, error)

func (Rules) Match

func (r Rules) Match(s string) bool

func (Rules) MatchRule

func (r Rules) MatchRule(s string) Rule

func (Rules) String

func (r Rules) String() string

Jump to

Keyboard shortcuts

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