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
- type Conf
- func (conf *Conf) CheckTemplate(f *bufio.Reader) exitvals.CheckSeverity
- func (conf *Conf) GetAndCheckTemplate(f *bufio.Reader) (internal.Template, exitvals.CheckSeverity)
- func (c *Conf) SetCheckLogos(b bool) *Conf
- func (c *Conf) SetCloudflare(b bool) *Conf
- func (c *Conf) SetFilename(fn string) *Conf
- func (c *Conf) SetIncrement(b bool) *Conf
- func (c *Conf) SetInplace(b bool) *Conf
- func (c *Conf) SetLogger(l zerolog.Logger) *Conf
- func (c *Conf) SetPrettyPrint(b bool) *Conf
- func (c *Conf) SetTTL(t uint) *Conf
Constants ¶
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 )
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 (*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 ¶
GetAndCheckTemplate is used in dctweb. Do not use applications outside of this project.