Documentation ¶
Index ¶
- Constants
- func MarshalJSON(record DNSRecord) ([]byte, error)
- type ARecord
- type ARecordData
- type CNAMERecord
- type CNAMERecordData
- type DNSRecord
- type MXRecord
- type MXRecordData
- type NSRecord
- type NSRecordData
- type RecordBlueprint
- type RecordCommon
- type SOARecord
- type SOARecordData
- type TXTRecord
- type TXTRecordData
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func MarshalJSON ¶
Types ¶
type ARecord ¶
type ARecord struct { RecordCommon Data ARecordData `json:"data"` }
func (*ARecord) GetCommon ¶
func (r *ARecord) GetCommon() RecordCommon
func (*ARecord) GetResponse ¶
GetResponse returns a pre-processed DNS response for an A Record
type ARecordData ¶
type CNAMERecord ¶
type CNAMERecord struct { RecordCommon Data CNAMERecordData `json:"data"` }
func (*CNAMERecord) GetCommon ¶
func (r *CNAMERecord) GetCommon() RecordCommon
func (*CNAMERecord) GetData ¶
func (r *CNAMERecord) GetData() []byte
func (*CNAMERecord) GetResponse ¶
func (r *CNAMERecord) GetResponse() dns.RR
GetResponse returns a pre-processed DNS response for an A Record
type CNAMERecordData ¶
type CNAMERecordData struct {
Alias string `json:"alias"`
}
type DNSRecord ¶
type DNSRecord interface { GetCommon() RecordCommon GetData() []byte GetResponse() dns.RR }
func ParseRecord ¶
func ParseRecord(common RecordCommon, data []byte) (DNSRecord, error)
func UnmarshalJSON ¶
type MXRecord ¶
type MXRecord struct { RecordCommon Data MXRecordData `json:"data"` }
func (*MXRecord) GetCommon ¶
func (r *MXRecord) GetCommon() RecordCommon
func (*MXRecord) GetResponse ¶
GetResponse returns a pre-processed DNS response for an A Record
type MXRecordData ¶
type NSRecord ¶
type NSRecord struct { RecordCommon Data NSRecordData `json:"data"` }
func (*NSRecord) GetCommon ¶
func (r *NSRecord) GetCommon() RecordCommon
func (*NSRecord) GetResponse ¶
GetResponse returns a pre-processed DNS response for an A Record
type NSRecordData ¶
type NSRecordData struct {
NameServer string `json:"server"`
}
type RecordBlueprint ¶
type RecordBlueprint struct { Id int `json:"id"` Type string `json:"type"` Domain string `json:"domain"` Subdomain string `json:"subdomain"` TTL int `json:"ttl"` Data interface{} `json:"data"` }
func (RecordBlueprint) Build ¶
func (r RecordBlueprint) Build() DNSRecord
func (*RecordBlueprint) Override ¶
func (r *RecordBlueprint) Override(rb DNSRecord)
type RecordCommon ¶
type RecordCommon struct { Id int `json:"id"` Domain string `json:"domain"` Subdomain string `json:"subdomain"` // DNS Record Types Type int `json:"type"` RouteType int `json:"route_type"` // Times Data CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeactivatedAt time.Time `json:"deactivated_at"` ExpiredAt time.Time `json:"expired_at"` TTL int `json:"ttl"` // Time to Live (in seconds) // Allow and Deny Lists (IPs and Subnets) Allow []string `json:"allow"` Deny []string `json:"deny"` }
func (RecordCommon) GetFQDN ¶
func (r RecordCommon) GetFQDN() string
func (RecordCommon) GetType ¶
func (r RecordCommon) GetType() string
type SOARecord ¶
type SOARecord struct { RecordCommon Data SOARecordData `json:"data"` }
func (*SOARecord) GetCommon ¶
func (r *SOARecord) GetCommon() RecordCommon
func (*SOARecord) GetResponse ¶
GetResponse returns a pre-processed DNS response for an A Record
type SOARecordData ¶
type TXTRecord ¶
type TXTRecord struct { RecordCommon Data TXTRecordData `json:"data"` }
func (*TXTRecord) GetCommon ¶
func (r *TXTRecord) GetCommon() RecordCommon
func (*TXTRecord) GetResponse ¶
GetResponse returns a pre-processed DNS response for an A Record
type TXTRecordData ¶
type TXTRecordData struct {
Content []string `json:"content"`
}
Click to show internal directories.
Click to hide internal directories.