suffix

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package suffix implement domain name suffix matching

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Suffix

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

Suffix ...

func Compile

func Compile(expr string) (Suffix, error)

Compile ...

func MakeSuffixes

func MakeSuffixes(suffixes []string) ([]Suffix, error)

MakeSuffixes ...

func (Suffix) Match

func (s Suffix) Match(qName string) bool

Match checks if a qName matches the Suffix

type Suffixes

type Suffixes []Suffix

Suffixes is a set of Suffix that restrict a [Resolver]. If empty, any name is accepted.

func (Suffixes) Match

func (ss Suffixes) Match(qName string) bool

Match checks if a qName matches any of the [Suffix]es. If none, it will always match as it means the [Resolver] is unrestricted.

Jump to

Keyboard shortcuts

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