dnscli

package
v0.0.0-...-4506ac0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractArgs

func ExtractArgs(checkArgs []*string, args []string) []string

this will scan through checkArgs. If one of the elements is nil or empty it will pop off the first arg and use that as the value of the element. returns the resulting args slice

func Fatal

func Fatal(format string, args ...interface{})

func InitDNSProvider

func InitDNSProvider(provider, zone string, ttl uint) error

func IsJson

func IsJson() bool

func IsQuiet

func IsQuiet() bool

func Log

func Log(format string, args ...interface{})

func Output

func Output(obj map[string]interface{}, quiet interface{}, err error) error

func OutputEmpty

func OutputEmpty() error

func OutputError

func OutputError(err error) error

Types

type ClientOpts

type ClientOpts struct {
	// Only use capital letters here. Also, "H" is off limits. kthxbye.
	Json       bool `long:"json" description:"print the output as JSON. useful for scripting."`
	PrettyJson bool `long:"pretty-json" description:"print the output as pretty JSON. useful for scripting."`
	Quiet      bool `long:"quiet" description:"no logs, only print relevant output. useful for scripting."`
}

type DNSClient

type DNSClient struct {
	*flags.Parser
}

func New

func New() *DNSClient

func (*DNSClient) Run

func (o *DNSClient) Run()

Runs the Passing -d as the first flag will run the server, otherwise the client is run.

type DNSCreateARecordCommand

type DNSCreateARecordCommand struct {
	Provider      string `long:"provider" default:"route53" description:"the dns provider"`
	ZoneID        string `short:"z" long:"zone" description:"the dns zone to use"`
	TTL           uint   `long:"ttl" default:"10" description:"the ttl to use"`
	Prefix        string `short:"p" long:"prefix" description:"the name prefix to use"`
	IP            string `short:"i" long:"ip" description:"the ip to use"`
	HealthCheckID string `short:"H" long:"health-check-id" description:"the health check id to use"`
	Failover      string `short:"f" long:"failover" description:"the failover policy to use"`
	Weight        uint8  `short:"w" long:"weight" description:"the record's weight"`
	Comment       string `long:"comment" default:"CLIENT" description:"the comment to use"`
}

func (*DNSCreateARecordCommand) Execute

func (c *DNSCreateARecordCommand) Execute(args []string) error

type DNSCreateAliasCommand

type DNSCreateAliasCommand struct {
	Provider string `long:"provider" default:"route53" description:"the dns provider"`
	ZoneID   string `short:"z" long:"zone" description:"the dns zone to use"`
	TTL      uint   `long:"ttl" default:"10" description:"the ttl to use"`
	Prefix   string `short:"p" long:"prefix" description:"the name prefix to use for the alias"`
	Original string `short:"o" long:"original" description:"the target of the alias"`
	Failover string `short:"f" long:"failover" description:"the failover policy to use"`
	Comment  string `long:"comment" default:"CLIENT" description:"the comment to use"`
}

func (*DNSCreateAliasCommand) Execute

func (c *DNSCreateAliasCommand) Execute(args []string) error

type DNSCreateCNameCommand

type DNSCreateCNameCommand struct {
	Provider string `long:"provider" default:"route53" description:"the dns provider"`
	ZoneID   string `short:"z" long:"zone" description:"the dns zone to use"`
	TTL      uint   `long:"ttl" default:"10" description:"the ttl to use"`
	Prefix   string `short:"p" long:"prefix" description:"the name prefix to use for the alias"`
	Original string `short:"o" long:"original" description:"the target of the alias"`
	Failover string `short:"f" long:"failover" description:"the failover policy to use"`
	Weight   uint8  `short:"w" long:"weight" description:"the record's weight"`
	Comment  string `long:"comment" default:"CLIENT" description:"the comment to use"`
}

func (*DNSCreateCNameCommand) Execute

func (c *DNSCreateCNameCommand) Execute(args []string) error

type DNSDeleteCNameCommand

type DNSDeleteCNameCommand struct {
	Provider string `long:"provider" default:"route53" description:"the dns provider"`
	ZoneID   string `short:"z" long:"zone" description:"the dns zone to use"`
	TTL      uint   `long:"ttl" default:"10" description:"the ttl to use"`
	Prefix   string `short:"p" long:"prefix" description:"the name prefix to use for the alias"`
	Original string `short:"o" long:"original" description:"the target of the alias"`
	Comment  string `long:"comment" default:"CLIENT" description:"the comment to use"`
}

func (*DNSDeleteCNameCommand) Execute

func (c *DNSDeleteCNameCommand) Execute(args []string) error

type DNSDeleteRecordsCommand

type DNSDeleteRecordsCommand struct {
	Provider  string   `long:"provider" default:"route53" description:"the dns provider"`
	ZoneID    string   `short:"z" long:"zone" description:"the dns zone to use"`
	TTL       uint     `long:"ttl" default:"10" description:"the ttl to use"`
	RecordIDs []string `short:"i" long:"id" description:"the record ids to delete"`
	Comment   string   `long:"comment" default:"CLIENT" description:"the comment to use"`
}

func (*DNSDeleteRecordsCommand) Execute

func (c *DNSDeleteRecordsCommand) Execute(args []string) error

type DNSDeleteRecordsForValueCommand

type DNSDeleteRecordsForValueCommand struct {
	Provider string `long:"provider" default:"route53" description:"the dns provider"`
	ZoneID   string `short:"z" long:"zone" description:"the dns zone to use"`
	TTL      uint   `long:"ttl" default:"10" description:"the ttl to use"`
	Value    string `short:"v" long:"value" description:"the value to use"`
}

func (*DNSDeleteRecordsForValueCommand) Execute

func (c *DNSDeleteRecordsForValueCommand) Execute(args []string) error

type DNSGetRecordsForValueCommand

type DNSGetRecordsForValueCommand struct {
	Provider string `long:"provider" default:"route53" description:"the dns provider"`
	ZoneID   string `short:"z" long:"zone" description:"the dns zone to use"`
	TTL      uint   `long:"ttl" default:"10" description:"the ttl to use"`
	Value    string `short:"v" long:"value" description:"the value to use"`
}

func (*DNSGetRecordsForValueCommand) Execute

func (c *DNSGetRecordsForValueCommand) Execute(args []string) error

Jump to

Keyboard shortcuts

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