suffix

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 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 if a domain, or domain pattern, that can be matched against subdomains.

func Compile

func Compile(expr string) (Suffix, error)

Compile converts an suffix pattern into a an Suffix.

func MakeSuffixes

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

MakeSuffixes compiles a list of [Suffix]es.

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