libdctlint

package
v0.0.0-...-d529551 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package libdctlint provides a library to check/lint Domain Connect service provider template.

Check results are communicated to humans with zerolog messages, that one is recommended to configure in software calling this library.

Index

Constants

View Source
const (
	TypeNS         uint16 = 2
	TypeCNAME      uint16 = 5
	TypeNULL       uint16 = 10
	TypeTXT        uint16 = 16
	TypeSRV        uint16 = 33
	TypeTLSA       uint16 = 52
	TypeSMIMEA     uint16 = 53
	TypeOPENPGPKEY uint16 = 61
	TypeSVCB       uint16 = 64
	TypeHTTPS      uint16 = 65
	TypeURI        uint16 = 256
)
View Source
const MaxTTL = (1 << 31) - 1 // 2147483647

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

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

Conf holds template checking instructions. The field type FileName must be updated each time CheckTemplate() is called to match with the bufio.Reader argument.

func NewConf

func NewConf() *Conf

NewConf will create template check configuration.

func (*Conf) CheckTemplate

func (conf *Conf) CheckTemplate(f *bufio.Reader) exitvals.CheckSeverity

CheckTemplate takes bufio.Reader as an argument and will run template checks according to the Conf configuration. Please remember to set conf.fileName appropriately before calling this function to avoid confusing results.

func (*Conf) GetAndCheckTemplate

func (conf *Conf) GetAndCheckTemplate(f *bufio.Reader) (internal.Template, exitvals.CheckSeverity)

GetAndCheckTemplate is used in dctweb. Do not use applications outside of this project.

func (*Conf) SetCheckLogos

func (c *Conf) SetCheckLogos(b bool) *Conf

func (*Conf) SetCloudflare

func (c *Conf) SetCloudflare(b bool) *Conf

func (*Conf) SetFilename

func (c *Conf) SetFilename(fn string) *Conf

func (*Conf) SetIncrement

func (c *Conf) SetIncrement(b bool) *Conf

func (*Conf) SetInplace

func (c *Conf) SetInplace(b bool) *Conf

func (*Conf) SetLogger

func (c *Conf) SetLogger(l zerolog.Logger) *Conf

func (*Conf) SetPrettyPrint

func (c *Conf) SetPrettyPrint(b bool) *Conf

func (*Conf) SetTTL

func (c *Conf) SetTTL(t uint) *Conf

Jump to

Keyboard shortcuts

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