Documentation
¶
Overview ¶
Package prettyprint holds pretty printer for internal models.
Index ¶
- type JSONPrinter
- func (pp *JSONPrinter) RecordAdd(rr models.DNSRecord)
- func (pp *JSONPrinter) RecordDel(rr models.DNSRecord)
- func (pp *JSONPrinter) RecordInfo(rr models.DNSRecord)
- func (pp *JSONPrinter) RecordUpdate(rr models.DNSRecord)
- func (pp *JSONPrinter) RecordsList(rrset []models.DNSRecord)
- func (pp *JSONPrinter) ZonesList(zones []models.Zone, providerName string)
- type NonePrinter
- func (pp *NonePrinter) RecordAdd(rr models.DNSRecord)
- func (pp *NonePrinter) RecordDel(rr models.DNSRecord)
- func (pp *NonePrinter) RecordInfo(rr models.DNSRecord)
- func (pp *NonePrinter) RecordUpdate(rr models.DNSRecord)
- func (pp *NonePrinter) RecordsList(rrset []models.DNSRecord)
- func (pp *NonePrinter) ZonesList(zones []models.Zone, providerName string)
- type OutputFormat
- type PrettyPrinter
- type TextPrinter
- func (pp *TextPrinter) RecordAdd(rr models.DNSRecord)
- func (pp *TextPrinter) RecordDel(rr models.DNSRecord)
- func (pp *TextPrinter) RecordInfo(rr models.DNSRecord)
- func (pp *TextPrinter) RecordUpdate(rr models.DNSRecord)
- func (pp *TextPrinter) RecordsList(rrset []models.DNSRecord)
- func (pp *TextPrinter) ZonesList(zones []models.Zone, providerName string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONPrinter ¶
type JSONPrinter struct{}
JSONPrinter prints in JSON format.
func (*JSONPrinter) RecordAdd ¶
func (pp *JSONPrinter) RecordAdd(rr models.DNSRecord)
RecordAdd displays information about a new DNS resource record.
func (*JSONPrinter) RecordDel ¶
func (pp *JSONPrinter) RecordDel(rr models.DNSRecord)
RecordDel displays information about a deleted DNS recource record.
func (*JSONPrinter) RecordInfo ¶
func (pp *JSONPrinter) RecordInfo(rr models.DNSRecord)
RecordInfo displays information about a specified DNS resource record.
func (*JSONPrinter) RecordUpdate ¶
func (pp *JSONPrinter) RecordUpdate(rr models.DNSRecord)
RecordUpdate displays information about an updated DNS resource record.
func (*JSONPrinter) RecordsList ¶
func (pp *JSONPrinter) RecordsList(rrset []models.DNSRecord)
RecordsList prints list of DNS resource records.
type NonePrinter ¶
type NonePrinter struct{}
NonePrinter don't print enythings. Use for scripts when output not needed.
func (*NonePrinter) RecordAdd ¶
func (pp *NonePrinter) RecordAdd(rr models.DNSRecord)
RecordAdd displays information about a new DNS resource record.
func (*NonePrinter) RecordDel ¶
func (pp *NonePrinter) RecordDel(rr models.DNSRecord)
RecordDel displays information about a deleted DNS recource record.
func (*NonePrinter) RecordInfo ¶
func (pp *NonePrinter) RecordInfo(rr models.DNSRecord)
RecordInfo displays information about a specified DNS resource record.
func (*NonePrinter) RecordUpdate ¶
func (pp *NonePrinter) RecordUpdate(rr models.DNSRecord)
RecordUpdate displays information about an updated DNS resource record.
func (*NonePrinter) RecordsList ¶
func (pp *NonePrinter) RecordsList(rrset []models.DNSRecord)
RecordsList prints list of DNS resource records.
type OutputFormat ¶
type OutputFormat uint
OutputFormat holds supported output formats.
const ( // FormatText format for human-readable output. FormatText OutputFormat = iota // FormatJSON format for output in JSON. FormatJSON // FormatNone format for discarding output. FormatNone )
type PrettyPrinter ¶
type PrettyPrinter interface {
// ZonesList prints list of DNS zones.
ZonesList(zones []models.Zone, providerName string)
// RecordsList prints list of DNS resource records.
RecordsList(rrset []models.DNSRecord)
// RecordInfo displays information about a specified DNS resource record.
RecordInfo(rr models.DNSRecord)
// RecordAdd displays information about a new DNS resource record.
RecordAdd(rr models.DNSRecord)
// RecordDel displays information about a deleted DNS recource record.
RecordDel(rr models.DNSRecord)
// RecordUpdate displays information about an updated DNS resource record.
RecordUpdate(rr models.DNSRecord)
}
PrettyPrinter interface for printing in various formats.
type TextPrinter ¶
type TextPrinter struct{}
TextPrinter prints in human-readable format.
func (*TextPrinter) RecordAdd ¶
func (pp *TextPrinter) RecordAdd(rr models.DNSRecord)
RecordAdd displays information about a new DNS resource record.
func (*TextPrinter) RecordDel ¶
func (pp *TextPrinter) RecordDel(rr models.DNSRecord)
RecordDel displays information about a deleted DNS recource record.
func (*TextPrinter) RecordInfo ¶
func (pp *TextPrinter) RecordInfo(rr models.DNSRecord)
RecordInfo displays information about a specified DNS resource record.
func (*TextPrinter) RecordUpdate ¶
func (pp *TextPrinter) RecordUpdate(rr models.DNSRecord)
RecordUpdate displays information about an updated DNS resource record.
func (*TextPrinter) RecordsList ¶
func (pp *TextPrinter) RecordsList(rrset []models.DNSRecord)
RecordsList prints list of DNS resource records.