rejectif

package
v4.10.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 3 Imported by: 0

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 tag is no zero.

func CaaTargetContainsWhitespace

func CaaTargetContainsWhitespace(rc *models.RecordConfig) error

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

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 SrvHasNullTarget

func SrvHasNullTarget(rc *models.RecordConfig) error

SrvHasNullTarget detects SRV records that has a null target.

func TxtHasBackslash added in v4.6.1

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 added in v4.7.4

func TxtHasSemicolon(rc *models.RecordConfig) error

TxtHasSemicolon audits TXT records for strings that contain backticks.

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 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 added in v4.7.3

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

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

func TxtStartsOrEndsWithSpaces added in v4.7.3

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.

Jump to

Keyboard shortcuts

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