rejectif

package
v5.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaaFlagIsNonZero

func CaaFlagIsNonZero(rc *models.RecordConfig) error

CaaFlagIsNonZero identifies CAA records where flag is no zero.

func CaaHasEmptyTag

func CaaHasEmptyTag(rc *models.RecordConfig) error

CaaHasEmptyTag detects CAA records with empty tags.

func CaaHasEmptyTarget

func CaaHasEmptyTarget(rc *models.RecordConfig) error

CaaHasEmptyTarget detects CAA records with empty targets.

func CaaTargetContainsWhitespace

func CaaTargetContainsWhitespace(rc *models.RecordConfig) error

CaaTargetContainsWhitespace identifies CAA records that have whitespace in the target. See https://github.com/DNSControl/dnscontrol/issues/1374

func CaaTargetHasSemicolon

func CaaTargetHasSemicolon(rc *models.RecordConfig) error

CaaTargetHasSemicolon returns an error if a CAA record's target contains a semicolon.

func DnskeyNotAtApex

func DnskeyNotAtApex(rc *models.RecordConfig) error

DnskeyNotAtApex detects DNSKEY records not at the apex/root domain. Use this when a provider doesn't support custom DNSKEY records at subnames.

func LabelIsWildcard

func LabelIsWildcard(rc *models.RecordConfig) error

LabelIsWildcard detects wildcard labels (e.g. "*.example.com").

func LabelNotApex

func LabelNotApex(rc *models.RecordConfig) error

LabelNotApex detects use not at apex. Use this when a record type is only permitted at the apex.

func MxNull

func MxNull(rc *models.RecordConfig) error

MxNull detects MX records that are a "null MX". This is needed by providers that don't support RFC 7505.

func NaptrHasEmptyTarget

func NaptrHasEmptyTarget(rc *models.RecordConfig) error

NaptrHasEmptyTarget detects NAPTR records with empty targets.

func NsAtApex

func NsAtApex(rc *models.RecordConfig) error

NsAtApex detects NS records at the apex/root domain. Use this when a provider doesn't support custom NS records at the apex.

func SrvHasEmptyTarget

func SrvHasEmptyTarget(rc *models.RecordConfig) error

SrvHasEmptyTarget detects SRV records with empty targets.

func SrvHasNullTarget

func SrvHasNullTarget(rc *models.RecordConfig) error

SrvHasNullTarget detects SRV records that has a null target.

func SrvHasZeroPort

func SrvHasZeroPort(rc *models.RecordConfig) error

SrvHasZeroPort detects SRV records with port set to zero.

func TxtHasBackslash

func TxtHasBackslash(rc *models.RecordConfig) error

TxtHasBackslash audits TXT records for strings that contains one or more backslashes.

func TxtHasBackticks

func TxtHasBackticks(rc *models.RecordConfig) error

TxtHasBackticks audits TXT records for strings that contain backticks.

func TxtHasDoubleQuotes

func TxtHasDoubleQuotes(rc *models.RecordConfig) error

TxtHasDoubleQuotes audits TXT records for strings that contain doublequotes.

func TxtHasSemicolon

func TxtHasSemicolon(rc *models.RecordConfig) error

TxtHasSemicolon audits TXT records for strings that contain semicolons.

func TxtHasSingleQuotes

func TxtHasSingleQuotes(rc *models.RecordConfig) error

TxtHasSingleQuotes audits TXT records for strings that contain single-quotes.

func TxtHasTrailingSpace

func TxtHasTrailingSpace(rc *models.RecordConfig) error

TxtHasTrailingSpace audits TXT records for strings that end with space.

func TxtHasUnpairedBackslash

func TxtHasUnpairedBackslash(rc *models.RecordConfig) error

TxtHasUnpairedBackslash audits TXT records for strings that contain an odd number of consecutive backslashes. Some providers strip single backslashes or convert odd consecutive backslashes to even. e.g., "1back\slash" -> "1backslash", "3back\\\slash" -> "3back\\slash".

func TxtHasUnpairedDoubleQuotes

func TxtHasUnpairedDoubleQuotes(rc *models.RecordConfig) error

TxtHasUnpairedDoubleQuotes audits TXT records for strings that contain unpaired doublequotes.

func TxtIsEmpty

func TxtIsEmpty(rc *models.RecordConfig) error

TxtIsEmpty audits TXT records for empty strings.

func TxtLongerThan

func TxtLongerThan(maxLength int) func(rc *models.RecordConfig) error

TxtLongerThan returns a function that audits TXT records for length greater than maxLength.

func TxtStartsOrEndsWithSpaces

func TxtStartsOrEndsWithSpaces(rc *models.RecordConfig) error

TxtStartsOrEndsWithSpaces audits TXT records that starts or ends with spaces.

Types

type Auditor

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

Auditor stores a list of checks to be executed during Audit().

func (*Auditor) Add

func (aud *Auditor) Add(rtype string, fn checker)

Add registers a function to call on each record of a given type.

func (*Auditor) Audit

func (aud *Auditor) Audit(records models.Records) (errs []error)

Audit performs the audit. For each record it calls each function in the list of checks.

func (*Auditor) TypesSupported

func (aud *Auditor) TypesSupported(types []string)

TypesSupported registers a check that rejects any record type not in the provided list. This is useful for providers that only support a fixed set of record types.

Jump to

Keyboard shortcuts

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