models

package
v0.0.0-...-1711327 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DynamicRecords = -3
View Source
const StaticNsRecord = -2
View Source
const StaticSoaRecord = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type A

type A struct {
	net.IP
}

func (A) EncodeValue

func (a A) EncodeValue() string

func (A) MarshalJSON

func (a A) MarshalJSON() ([]byte, error)

func (*A) UnmarshalJSON

func (a *A) UnmarshalJSON(bytes []byte) error

func (A) ValueRR

func (a A) ValueRR(header dns.RR_Header) dns.RR

func (A) ValueType

func (a A) ValueType() uint16

type AAAA

type AAAA struct {
	net.IP
}

func (AAAA) EncodeValue

func (aaaa AAAA) EncodeValue() string

func (AAAA) MarshalJSON

func (aaaa AAAA) MarshalJSON() ([]byte, error)

func (*AAAA) UnmarshalJSON

func (aaaa *AAAA) UnmarshalJSON(bytes []byte) error

func (AAAA) ValueRR

func (aaaa AAAA) ValueRR(header dns.RR_Header) dns.RR

func (AAAA) ValueType

func (aaaa AAAA) ValueType() uint16

type CNAME

type CNAME struct {
	Target string
}

func (CNAME) EncodeValue

func (cname CNAME) EncodeValue() string

func (CNAME) MarshalJSON

func (cname CNAME) MarshalJSON() ([]byte, error)

func (*CNAME) UnmarshalJSON

func (cname *CNAME) UnmarshalJSON(bytes []byte) error

func (CNAME) ValueRR

func (cname CNAME) ValueRR(header dns.RR_Header) dns.RR

func (CNAME) ValueType

func (cname CNAME) ValueType() uint16

type MX

type MX struct {
	Preference uint16 `json:"preference"`
	Mx         string `json:"mx"`
}

func (MX) EncodeValue

func (mx MX) EncodeValue() string

func (*MX) UnmarshalJSON

func (mx *MX) UnmarshalJSON(bytes []byte) error

func (MX) ValueRR

func (mx MX) ValueRR(header dns.RR_Header) dns.RR

func (MX) ValueType

func (mx MX) ValueType() uint16

type NS

type NS struct {
	Ns string
}

func (NS) EncodeValue

func (ns NS) EncodeValue() string

func (NS) MarshalJSON

func (ns NS) MarshalJSON() ([]byte, error)

func (*NS) UnmarshalJSON

func (ns *NS) UnmarshalJSON(bytes []byte) error

func (NS) ValueRR

func (ns NS) ValueRR(header dns.RR_Header) dns.RR

func (NS) ValueType

func (ns NS) ValueType() uint16

type Record

type Record struct {
	Id    int64        `json:"id"`
	Name  string       `json:"name"`
	Type  uint16       `json:"type"`
	Ttl   nulls.UInt32 `json:"ttl"`
	Value RecordValue  `json:"value"`
}

func (Record) RR

func (r Record) RR(ttl uint32) dns.RR

type RecordValue

type RecordValue interface {
	ValueRR(header dns.RR_Header) dns.RR
	ValueType() uint16
	EncodeValue() string
}

type SOA

type SOA struct {
	Ns      string `json:"ns"`
	Mbox    string `json:"mbox"`
	Serial  uint32 `json:"serial"`
	Refresh uint32 `json:"refresh"`
	Retry   uint32 `json:"retry"`
	Expire  uint32 `json:"expire"`
	Minttl  uint32 `json:"minttl"`
}

func (SOA) EncodeValue

func (soa SOA) EncodeValue() string

func (SOA) ValueRR

func (soa SOA) ValueRR(header dns.RR_Header) dns.RR

func (SOA) ValueType

func (soa SOA) ValueType() uint16

type SRV

type SRV struct {
	Priority uint16 `json:"priority"`
	Weight   uint16 `json:"weight"`
	Port     uint16 `json:"port"`
	Target   string `json:"target"`
}

func (SRV) EncodeValue

func (srv SRV) EncodeValue() string

func (*SRV) UnmarshalJSON

func (srv *SRV) UnmarshalJSON(bytes []byte) error

func (SRV) ValueRR

func (srv SRV) ValueRR(header dns.RR_Header) dns.RR

func (SRV) ValueType

func (srv SRV) ValueType() uint16

type TXT

type TXT struct {
	Value string
}

func (TXT) EncodeValue

func (txt TXT) EncodeValue() string

func (TXT) MarshalJSON

func (txt TXT) MarshalJSON() ([]byte, error)

func (*TXT) UnmarshalJSON

func (txt *TXT) UnmarshalJSON(bytes []byte) error

func (TXT) ValueRR

func (txt TXT) ValueRR(header dns.RR_Header) dns.RR

func (TXT) ValueType

func (txt TXT) ValueType() uint16

Jump to

Keyboard shortcuts

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