dns

package
v0.0.0-...-7896bf9 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OutputTable

func OutputTable(rec []Record)

OutputTable a table containing DNS entries

Types

type Client

type Client struct {
	ServerName string
	Username   string
	Password   string
	Port       int
	HTTPS      bool
	Insecure   bool
	Client     *winrm.Client
}

Client struct for holding winrm.Client configuration

func GenerateClient

func GenerateClient(sn, un, pwd string) Client

GenerateClient generates the winrm.client configuration

func (*Client) ConfigureWinRMClient

func (c *Client) ConfigureWinRMClient() error

ConfigureWinRMClient creates the connection to the winrm server

func (*Client) CreateRecord

func (c *Client) CreateRecord(rec Record) ([]Record, error)

CreateRecord creates new DNS records on server

func (*Client) DeleteRecord

func (c *Client) DeleteRecord(rec Record) error

DeleteRecord deletes DNS record specified

func (*Client) ExecutePowerShellScript

func (c *Client) ExecutePowerShellScript(pscript string) (*Output, error)

ExecutePowerShellScript runs a PS script on the winrm server

func (*Client) ReadRecord

func (c *Client) ReadRecord(rec Record) (Record, error)

ReadRecord performs DNS Record lookup from server

func (*Client) ReadRecordfromID

func (c *Client) ReadRecordfromID(recID string) (Record, error)

ReadRecordfromID retrieves specifc DNS record based on record ID

func (*Client) ReadRecords

func (c *Client) ReadRecords(rec Record) ([]Record, error)

ReadRecords returns all DNS records matching query

func (*Client) RecordExist

func (c *Client) RecordExist(rec Record) bool

RecordExist returns if record exists or not

func (*Client) UpdateRecord

func (c *Client) UpdateRecord(rec Record, newValue string, newTTL float64) (Record, error)

UpdateRecord updates an existing DNS record

type Output

type Output struct {
	// contains filtered or unexported fields
}

Output returned from running PS scripts on WinRm server

type Record

type Record struct {
	Dnszone  string
	Name     string
	Type     string
	Value    string
	TTL      float64
	ID       string
	NewValue string
	NewTTL   float64
}

Record containing information regarding DNS record

Jump to

Keyboard shortcuts

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