# README
models
import "github.com/SuperBuker/terraform-provider-dns-he-net/client/models"
Index
- Variables
- func concatTXTData(data string) string
- func splitTXTData(data string) string
- func toString(n interface{}) string
- type A
- type AAAA
- type AFSDB
- type ALIAS
- type CAA
- type CNAME
- type DDNSKey
- type ErrFormat
- type HINFO
- type LOC
- type MX
- type NAPTR
- type NS
- type PTR
- type RP
- type Record
- type RecordX
- type SOA
- type SPF
- type SRV
- type SSHFP
- type StatusMessage
- type TXT
- type Zone
Variables
var b2s = map[bool]string{false: "0", true: "1"}
var txtInData = regexp.MustCompile(`(?:"([ -~]{255})" )|"([ -~]{1,255})"$`)
var txtOutData = regexp.MustCompile(`^"([ -~]*)"$`)
func concatTXTData
func concatTXTData(data string) string
concatTXTData concatenates the received field to reconstruct the original value. By default, the provider splits the data in chunks of 255 characters.
func splitTXTData
func splitTXTData(data string) string
splitTXTData splits the data in chunks of 255 characters which are sent quoted and separated by a whitespace. This processing is automatically done by the provider on the server side, we just handle it on advance to mimic the regular website requests.
func toString
func toString(n interface{}) string
type A
type A struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
Dynamic bool
}
func ToA
func ToA(r Record) A
func (A) Equals
func (r A) Equals(rx RecordX) bool
func (A) GetID
func (r A) GetID() (uint, bool)
func (A) GetZoneID
func (r A) GetZoneID() uint
func (A) Refs
func (r A) Refs() map[string]string
func (A) Serialise
func (r A) Serialise() map[string]string
func (A) Type
func (r A) Type() string
type AAAA
type AAAA struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
Dynamic bool
}
func ToAAAA
func ToAAAA(r Record) AAAA
func (AAAA) Equals
func (r AAAA) Equals(rx RecordX) bool
func (AAAA) GetID
func (r AAAA) GetID() (uint, bool)
func (AAAA) GetZoneID
func (r AAAA) GetZoneID() uint
func (AAAA) Refs
func (r AAAA) Refs() map[string]string
func (AAAA) Serialise
func (r AAAA) Serialise() map[string]string
func (AAAA) Type
func (r AAAA) Type() string
type AFSDB
type AFSDB struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
}
func ToAFSDB
func ToAFSDB(r Record) AFSDB
func (AFSDB) Equals
func (r AFSDB) Equals(rx RecordX) bool
func (AFSDB) GetID
func (r AFSDB) GetID() (uint, bool)
func (AFSDB) GetZoneID
func (r AFSDB) GetZoneID() uint
func (AFSDB) Refs
func (r AFSDB) Refs() map[string]string
func (AFSDB) Serialise
func (r AFSDB) Serialise() map[string]string
func (AFSDB) Type
func (r AFSDB) Type() string
type ALIAS
type ALIAS struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
}
func ToALIAS
func ToALIAS(r Record) ALIAS
func (ALIAS) Equals
func (r ALIAS) Equals(rx RecordX) bool
func (ALIAS) GetID
func (r ALIAS) GetID() (uint, bool)
func (ALIAS) GetZoneID
func (r ALIAS) GetZoneID() uint
func (ALIAS) Refs
func (r ALIAS) Refs() map[string]string
func (ALIAS) Serialise
func (r ALIAS) Serialise() map[string]string
func (ALIAS) Type
func (r ALIAS) Type() string
type CAA
type CAA struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
}
func ToCAA
func ToCAA(r Record) CAA
func (CAA) Equals
func (r CAA) Equals(rx RecordX) bool
func (CAA) GetID
func (r CAA) GetID() (uint, bool)
func (CAA) GetZoneID
func (r CAA) GetZoneID() uint
func (CAA) Refs
func (r CAA) Refs() map[string]string
func (CAA) Serialise
func (r CAA) Serialise() map[string]string
func (CAA) Type
func (r CAA) Type() string
type CNAME
type CNAME struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
}
func ToCNAME
func ToCNAME(r Record) CNAME
func (CNAME) Equals
func (r CNAME) Equals(rx RecordX) bool
func (CNAME) GetID
func (r CNAME) GetID() (uint, bool)
func (CNAME) GetZoneID
func (r CNAME) GetZoneID() uint
func (CNAME) Refs
func (r CNAME) Refs() map[string]string
func (CNAME) Serialise
func (r CNAME) Serialise() map[string]string
func (CNAME) Type
func (r CNAME) Type() string
type DDNSKey
type DDNSKey struct {
Domain string
ZoneID uint
Key string
}
func (DDNSKey) GetDomain
func (dk DDNSKey) GetDomain() string
func (DDNSKey) GetZoneID
func (dk DDNSKey) GetZoneID() uint
func (DDNSKey) Refs
func (dk DDNSKey) Refs() map[string]string
func (DDNSKey) Serialise
func (dk DDNSKey) Serialise() map[string]string
type ErrFormat
type ErrFormat struct {
Field string
Reason string
}
func (*ErrFormat) Error
func (e *ErrFormat) Error() string
type HINFO
type HINFO struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
}
func ToHINFO
func ToHINFO(r Record) HINFO
func (HINFO) Equals
func (r HINFO) Equals(rx RecordX) bool
func (HINFO) GetID
func (r HINFO) GetID() (uint, bool)
func (HINFO) GetZoneID
func (r HINFO) GetZoneID() uint
func (HINFO) Refs
func (r HINFO) Refs() map[string]string
func (HINFO) Serialise
func (r HINFO) Serialise() map[string]string
func (HINFO) Type
func (r HINFO) Type() string
type LOC
type LOC struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
}
func ToLOC
func ToLOC(r Record) LOC
func (LOC) Equals
func (r LOC) Equals(rx RecordX) bool
func (LOC) GetID
func (r LOC) GetID() (uint, bool)
func (LOC) GetZoneID
func (r LOC) GetZoneID() uint
func (LOC) Refs
func (r LOC) Refs() map[string]string
func (LOC) Serialise
func (r LOC) Serialise() map[string]string
func (LOC) Type
func (r LOC) Type() string
type MX
type MX struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Priority uint16
Data string
}
func ToMX
func ToMX(r Record) (MX, error)
func (MX) Equals
func (r MX) Equals(rx RecordX) bool
func (MX) GetID
func (r MX) GetID() (uint, bool)
func (MX) GetZoneID
func (r MX) GetZoneID() uint
func (MX) Refs
func (r MX) Refs() map[string]string
func (MX) Serialise
func (r MX) Serialise() map[string]string
func (MX) Type
func (r MX) Type() string
type NAPTR
type NAPTR struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
}
func ToNAPTR
func ToNAPTR(r Record) NAPTR
func (NAPTR) Equals
func (r NAPTR) Equals(rx RecordX) bool
func (NAPTR) GetID
func (r NAPTR) GetID() (uint, bool)
func (NAPTR) GetZoneID
func (r NAPTR) GetZoneID() uint
func (NAPTR) Refs
func (r NAPTR) Refs() map[string]string
func (NAPTR) Serialise
func (r NAPTR) Serialise() map[string]string
func (NAPTR) Type
func (r NAPTR) Type() string
type NS
type NS struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
}
func ToNS
func ToNS(r Record) NS
func (NS) Equals
func (r NS) Equals(rx RecordX) bool
func (NS) GetID
func (r NS) GetID() (uint, bool)
func (NS) GetZoneID
func (r NS) GetZoneID() uint
func (NS) Refs
func (r NS) Refs() map[string]string
func (NS) Serialise
func (r NS) Serialise() map[string]string
func (NS) Type
func (r NS) Type() string
type PTR
type PTR struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
}
func ToPTR
func ToPTR(r Record) PTR
func (PTR) Equals
func (r PTR) Equals(rx RecordX) bool
func (PTR) GetID
func (r PTR) GetID() (uint, bool)
func (PTR) GetZoneID
func (r PTR) GetZoneID() uint
func (PTR) Refs
func (r PTR) Refs() map[string]string
func (PTR) Serialise
func (r PTR) Serialise() map[string]string
func (PTR) Type
func (r PTR) Type() string
type RP
type RP struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
}
func ToRP
func ToRP(r Record) RP
func (RP) Equals
func (r RP) Equals(rx RecordX) bool
func (RP) GetID
func (r RP) GetID() (uint, bool)
func (RP) GetZoneID
func (r RP) GetZoneID() uint
func (RP) Refs
func (r RP) Refs() map[string]string
func (RP) Serialise
func (r RP) Serialise() map[string]string
func (RP) Type
func (r RP) Type() string
type Record
type Record struct {
ID *uint
ZoneID uint
Domain string
RecordType string // to improve
TTL uint // seconds
Priority *uint16
Data string
Dynamic bool
Locked bool
}
func (Record) Equals
func (r Record) Equals(rx RecordX) bool
func (Record) GetID
func (r Record) GetID() (uint, bool)
func (Record) GetZoneID
func (r Record) GetZoneID() uint
func (Record) Refs
func (r Record) Refs() map[string]string
func (Record) Serialise
func (r Record) Serialise() map[string]string
func (Record) ToX
func (r Record) ToX() (RecordX, error)
func (Record) Type
func (r Record) Type() string
type RecordX
type RecordX interface {
Equals(RecordX) bool
GetID() (uint, bool)
GetZoneID() uint
Refs() map[string]string
Serialise() map[string]string
Type() string
}
type SOA
type SOA struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
MName string
RName string
Serial uint
Refresh uint
Retry uint
Expire uint
}
func ToSOA
func ToSOA(r Record) (SOA, error)
func parseSOAData
func parseSOAData(data string) (SOA, error)
func (SOA) Equals
func (r SOA) Equals(rx RecordX) bool
func (SOA) GetID
func (r SOA) GetID() (uint, bool)
func (SOA) GetZoneID
func (r SOA) GetZoneID() uint
func (SOA) Refs
func (r SOA) Refs() map[string]string
func (SOA) Serialise
func (r SOA) Serialise() map[string]string
func (SOA) Type
func (r SOA) Type() string
type SPF
type SPF struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
}
func ToSPF
func ToSPF(r Record) SPF
func (SPF) Equals
func (r SPF) Equals(rx RecordX) bool
func (SPF) GetID
func (r SPF) GetID() (uint, bool)
func (SPF) GetZoneID
func (r SPF) GetZoneID() uint
func (SPF) Refs
func (r SPF) Refs() map[string]string
func (SPF) Serialise
func (r SPF) Serialise() map[string]string
func (SPF) Type
func (r SPF) Type() string
type SRV
type SRV struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Priority uint16
Weight uint16
Port uint16
Target string
}
func ToSRV
func ToSRV(r Record) (SRV, error)
func parseSRVData
func parseSRVData(data string) (SRV, error)
func (SRV) Equals
func (r SRV) Equals(rx RecordX) bool
func (SRV) GetID
func (r SRV) GetID() (uint, bool)
func (SRV) GetZoneID
func (r SRV) GetZoneID() uint
func (SRV) Refs
func (r SRV) Refs() map[string]string
func (SRV) Serialise
func (r SRV) Serialise() map[string]string
func (SRV) Type
func (r SRV) Type() string
type SSHFP
type SSHFP struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
}
func ToSSHFP
func ToSSHFP(r Record) SSHFP
func (SSHFP) Equals
func (r SSHFP) Equals(rx RecordX) bool
func (SSHFP) GetID
func (r SSHFP) GetID() (uint, bool)
func (SSHFP) GetZoneID
func (r SSHFP) GetZoneID() uint
func (SSHFP) Refs
func (r SSHFP) Refs() map[string]string
func (SSHFP) Serialise
func (r SSHFP) Serialise() map[string]string
func (SSHFP) Type
func (r SSHFP) Type() string
type StatusMessage
type StatusMessage struct {
Data string
}
type TXT
type TXT struct {
ID *uint
ZoneID uint
Domain string
TTL uint // seconds
Data string
Dynamic bool
}
func ToTXT
func ToTXT(r Record) TXT
func (TXT) Equals
func (r TXT) Equals(rx RecordX) bool
func (TXT) GetID
func (r TXT) GetID() (uint, bool)
func (TXT) GetZoneID
func (r TXT) GetZoneID() uint
func (TXT) Refs
func (r TXT) Refs() map[string]string
func (TXT) Serialise
func (r TXT) Serialise() map[string]string
func (TXT) Type
func (r TXT) Type() string
type Zone
type Zone struct {
ID uint
Name string
}
Generated by gomarkdoc