internal

package
v0.0.0-...-9ba10be Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package internal contains Domain Connect Template Linter messaging code values.

Index

Constants

View Source
const ProjectVersion uint = 118

Variables

This section is empty.

Functions

func SetLoglevel

func SetLoglevel(loglevel string)

func StripSpaces

func StripSpaces(str string) string

StripSpaces will remove all (beginning, middle, or end) whitespace characters from a string

Types

type DCTL

type DCTL uint16

DCTL codes type

const (
	DCTL0001 DCTL = 1
	DCTL0002 DCTL = 2
	DCTL0003 DCTL = 3
	DCTL0004 DCTL = 4
	DCTL0005 DCTL = 5
	DCTL0006 DCTL = 6
	DCTL0007 DCTL = 7
	DCTL0008 DCTL = 8
	DCTL0009 DCTL = 9

	DCTL1000 DCTL = 1000
	DCTL1001 DCTL = 1001
	DCTL1002 DCTL = 1002
	DCTL1003 DCTL = 1003
	DCTL1004 DCTL = 1004
	DCTL1005 DCTL = 1005
	DCTL1006 DCTL = 1006
	DCTL1007 DCTL = 1007
	DCTL1008 DCTL = 1008
	DCTL1009 DCTL = 1009
	DCTL1010 DCTL = 1010
	DCTL1011 DCTL = 1011
	DCTL1012 DCTL = 1012
	DCTL1013 DCTL = 1013
	DCTL1014 DCTL = 1014
	DCTL1015 DCTL = 1015
	DCTL1016 DCTL = 1016
	DCTL1017 DCTL = 1017
	DCTL1018 DCTL = 1018
	DCTL1019 DCTL = 1019
	DCTL1020 DCTL = 1020
	DCTL1021 DCTL = 1021
	DCTL1022 DCTL = 1022
	DCTL1023 DCTL = 1023
	DCTL1024 DCTL = 1024
	DCTL1025 DCTL = 1025
	DCTL1026 DCTL = 1026
	DCTL1027 DCTL = 1027
	DCTL1028 DCTL = 1028
	DCTL1029 DCTL = 1029
	DCTL1030 DCTL = 1030
	DCTL1031 DCTL = 1031
	DCTL1032 DCTL = 1032
	DCTL1033 DCTL = 1033
	DCTL1034 DCTL = 1034
	DCTL1035 DCTL = 1035
	DCTL1036 DCTL = 1036
	DCTL1037 DCTL = 1037
	DCTL1038 DCTL = 1038
	DCTL1039 DCTL = 1039
	DCTL1040 DCTL = 1040

	DCTL5000 DCTL = 5000
	DCTL5001 DCTL = 5001
	DCTL5002 DCTL = 5002
	DCTL5003 DCTL = 5003
	DCTL5004 DCTL = 5004
	DCTL5005 DCTL = 5005
	DCTL5006 DCTL = 5006
	DCTL5007 DCTL = 5007
	DCTL5008 DCTL = 5008
	DCTL5009 DCTL = 5009
	DCTL5010 DCTL = 5010
	DCTL5011 DCTL = 5011
)

DCTL code reservations 0000 unused 0001 - 0999 operating system and library errors 1000 - 3999 domain connect specific messages 5000 - 5200 cloudflare messages

func (DCTL) Level

func (dctl DCTL) Level() zerolog.Level

Level returns the zerolog.Level associated with this DCTL code. Unknown codes default to ErrorLevel.

func (DCTL) MarshalZerologObject

func (dctl DCTL) MarshalZerologObject(e *zerolog.Event)

func (DCTL) Severity

func (dctl DCTL) Severity() exitvals.CheckSeverity

Severity returns the exitvals.CheckSeverity bit that corresponds to this DCTL code's log level.

type Record

type Record struct {
	Type      string `json:"type" validate:"required,min=1,max=16"`
	GroupID   string `json:"groupId,omitempty" validate:"omitempty"`
	Essential string `json:"essential,omitempty" validate:"omitempty,oneof=Always OnApply"`
	Host      string `json:"host,omitempty" validate:"omitempty,max=255"`
	Name      string `json:"name,omitempty" validate:"omitempty,max=63"`
	PointsTo  string `json:"pointsTo,omitempty" validate:"omitempty,max=255"`
	TTL       SINT   `json:"ttl,omitempty" validate:"omitempty,min=1"`
	Data      string `json:"data,omitempty" validate:"required_if=Type TXT"`
	TxtCMM    string `json:"txtConflictMatchingMode,omitempty" validate:"omitempty,oneof=None All Prefix"`
	TxtCMP    string `json:"txtConflictMatchingPrefix,omitempty" validate:"omitempty"`
	Priority  SINT   `json:"priority,omitempty" validate:"required_if=Type SRV"`
	Weight    SINT   `json:"weight,omitempty" validate:"required_if=Type SRV"`
	Port      SINT   `json:"port,omitempty" validate:"required_if=Type SRV"`
	Protocol  string `json:"protocol,omitempty" validate:"required_if=Type SRV"`
	Service   string `json:"service,omitempty" validate:"required_if=Type SRV"`
	Target    string `json:"target,omitempty" validate:"required_if=Type SRV"`
	SPFRules  string `json:"spfRules,omitempty" validate:"omitempty,min=1"`
}

type Records

type Records []Record

type SINT

type SINT string

func (*SINT) MarshalJSON

func (sint *SINT) MarshalJSON() ([]byte, error)

func (*SINT) SetUint32

func (sint *SINT) SetUint32(value uint32)

func (*SINT) Uint16

func (sint *SINT) Uint16() (uint16, bool)

func (*SINT) Uint32

func (sint *SINT) Uint32() (uint32, bool)

func (*SINT) UnmarshalJSON

func (sint *SINT) UnmarshalJSON(b []byte) error

UnmarshalJSON can take string and integer version of an int and return int. When int is integer all happens without complaints, but a string int will cause warning and conversion to int. The json parsing will fail completely when string is not integer at all.

type Template

type Template struct {
	ProviderID          string  `json:"providerId" validate:"required,min=1,max=64"`
	ProviderName        string  `json:"providerName" validate:"required,min=1,max=64"`
	ServiceID           string  `json:"serviceId" validate:"required,min=1,max=64"`
	ServiceName         string  `json:"serviceName" validate:"required,min=1,max=255"`
	Version             uint    `json:"version,omitempty"`
	Description         string  `json:"description,omitempty"`
	VariableDescription string  `json:"variableDescription,omitempty"`
	Shared              bool    `json:"shared,omitempty"` /* deprecated */
	SyncBlock           bool    `json:"syncBlock,omitempty"`
	SharedProviderName  bool    `json:"sharedProviderName,omitempty"`
	SharedServiceName   bool    `json:"sharedServiceName,omitempty"`
	SyncPubKeyDomain    string  `json:"syncPubKeyDomain,omitempty" validate:"max=255"`
	SyncRedirectDomain  string  `json:"syncRedirectDomain,omitempty"`
	MultiInstance       bool    `json:"multiInstance,omitempty"`
	WarnPhishing        bool    `json:"warnPhishing,omitempty"`
	HostRequired        bool    `json:"hostRequired,omitempty"`
	Records             Records `json:"records"`
}

Jump to

Keyboard shortcuts

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