Documentation ¶
Index ¶
- func ColorJson(jsonData []byte) ([]byte, error)
- func FormatUnixTime(seconds interface{}) string
- func FormatUnixTimeF(seconds interface{}, fmt string) string
- func MakeTemplateHelpers(t *template.Template) template.FuncMap
- func RoundTripJson(obj interface{}) interface{}
- func SaveConfig(key string, value interface{})
- type DnsClass
- type RecordTtl
- type RecordType
- type ZoneEntry
- type ZoneEntryInclude
- type ZoneEntryOrigin
- type ZoneEntryRr
- type ZoneEntryTtl
- type ZoneParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatUnixTime ¶
func FormatUnixTime(seconds interface{}) string
Format a unix time value returned by the API in a way that is human-readable.
func FormatUnixTimeF ¶
func MakeTemplateHelpers ¶
Returns the template helper functions accessible to our templates.
func RoundTripJson ¶
func RoundTripJson(obj interface{}) interface{}
Convert a JSON-serializable value to a model of interface{} maps and slices. Effectively serializing the object to maps/slices with the JSON model.
func SaveConfig ¶
func SaveConfig(key string, value interface{})
Save a value to the configuration file.
Types ¶
type RecordType ¶ added in v1.6.0
type RecordType uint16
const ( RecordTypeA RecordType = 1 RecordTypeNS RecordType = 2 RecordTypeCNAME RecordType = 5 // SOA is not supported by Level27 but it shows up a lot so we should be able to parse it. RecordTypeSOA RecordType = 6 RecordTypeMX RecordType = 15 RecordTypeTXT RecordType = 16 RecordTypeAAAA RecordType = 28 RecordTypeSRV RecordType = 33 RecordTypeDS RecordType = 43 RecordTypeTLSA RecordType = 52 RecordTypeCAA RecordType = 257 )
func (RecordType) String ¶ added in v1.6.0
func (t RecordType) String() string
type ZoneEntry ¶ added in v1.6.0
type ZoneEntry interface {
IsZoneEntry()
}
Base type for all entry types parseable in a zone file.
type ZoneEntryInclude ¶ added in v1.6.0
$INCLUDE zone file entry.
func (ZoneEntryInclude) IsZoneEntry ¶ added in v1.6.0
func (ZoneEntryInclude) IsZoneEntry()
type ZoneEntryOrigin ¶ added in v1.6.0
type ZoneEntryOrigin struct {
DomainName string
}
$ORIGIN zone file entry.
func (ZoneEntryOrigin) IsZoneEntry ¶ added in v1.6.0
func (ZoneEntryOrigin) IsZoneEntry()
func (ZoneEntryOrigin) String ¶ added in v1.6.0
func (e ZoneEntryOrigin) String() string
type ZoneEntryRr ¶ added in v1.6.0
type ZoneEntryRr struct { // Can be nil to indicate not given for record DomainName *string // Can be nil to indicate not given for record Class *DnsClass // Can be nil to indicate not given for record Ttl *RecordTtl // Type of the record. Type RecordType // Record data is given as an unstructed set of strings. Data []string }
Resource Record zone file entry.
func (ZoneEntryRr) IsZoneEntry ¶ added in v1.6.0
func (ZoneEntryRr) IsZoneEntry()
func (ZoneEntryRr) String ¶ added in v1.6.0
func (e ZoneEntryRr) String() string
type ZoneEntryTtl ¶ added in v1.6.0
type ZoneEntryTtl struct {
Ttl RecordTtl
}
$TTL zone file entry.
func (ZoneEntryTtl) IsZoneEntry ¶ added in v1.6.0
func (ZoneEntryTtl) IsZoneEntry()
func (ZoneEntryTtl) String ¶ added in v1.6.0
func (e ZoneEntryTtl) String() string
type ZoneParser ¶ added in v1.6.0
type ZoneParser struct {
// contains filtered or unexported fields
}
func NewZoneParser ¶ added in v1.6.0
func NewZoneParser(reader io.Reader) ZoneParser
func (*ZoneParser) NextEntry ¶ added in v1.6.0
func (z *ZoneParser) NextEntry() (ZoneEntry, error)
Parse an entry from the input. This moves the parser forward in the input.
Click to show internal directories.
Click to hide internal directories.