util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package util contains util functions for godaddy-cli

Index

Constants

This section is empty.

Variables

View Source
var Flags = map[string]cli.Flag{
	"domain": &cli.StringFlag{
		Name:     "domain",
		Value:    "",
		Usage:    "The domain name to query e.g. example.com",
		Required: true,
	},
	"type": &cli.StringFlag{
		Name:     "type",
		Value:    "",
		Usage:    "The type of record, can be one of [A, AAAA, TXT, MX]",
		Required: true,
	},
	"name": &cli.StringFlag{
		Name:     "name",
		Value:    "",
		Usage:    "The name value of the record",
		Required: true,
	},
	"value": &cli.StringFlag{
		Name:     "value",
		Value:    "",
		Usage:    "The value of the record",
		Required: true,
	},
	"ttl": &cli.IntFlag{
		Name:  "ttl",
		Value: 600,
		Usage: "The TTL of the record (600 by default)",
	},
	"priority": &cli.IntFlag{
		Name:  "priority",
		Value: 0,
		Usage: "The priority when using an MX record",
	},
}

Functions

func PrintAvailability

func PrintAvailability(availability godaddygo.DomainAvailability)

func PrintDomains

func PrintDomains(domains []godaddygo.DomainSummary)

PrintDomains formats the output for listing domains

func PrintError

func PrintError(err error)

PrintError prints the error received by oze4/godaddygo

func PrintRecord

func PrintRecord(record godaddygo.Record, message string)

PrintRecord prints a single record with a specified message

func PrintRecords

func PrintRecords(records []godaddygo.Record)

PrintRecords prints the listed records of a domain

func StringToRecord

func StringToRecord(r string) godaddygo.RecordType

/ StringToRecord takes a string and returns a oze4/godaddygo.RecordType

Types

This section is empty.

Jump to

Keyboard shortcuts

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