rule

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rule

type Rule struct {
	RegistryRegex string
	Project       string
	ServerURL     string
}

func MergeRules

func MergeRules(h, l []Rule) []Rule

MergeRules appends rule l after h, so h will be checked first. we append instead of merge since rules are regex, hard to merge, for example 'google.com' and '$google.com^' are the same.

func StringToRules

func StringToRules(raw []string, server string) ([]Rule, error)

StringToRules parse rule and create Rule object assume rule.Rules are concatentated by '=>'.

Jump to

Keyboard shortcuts

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