windns

package
v0.0.0-...-cc7e7cf Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKrb5Config

func NewKrb5Config(domain string, kdcs []string) (*config.Config, error)

NewKrb5Config creates a new krb5 config

Types

type Client

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

Client a dns client for windows dns

func NewClient

func NewClient(conf *ClientConfig, opts ...ClientOption) (c *Client, err error)

NewClient creates a new client

func (*Client) Cleanup

func (c *Client) Cleanup() (err error)

Cleanup cleans up the client

func (*Client) Exchange

func (c *Client) Exchange(host string, msg *dns.Msg) (r *dns.Msg, tt time.Duration, err error)

Exchange performs an exchange

func (*Client) Insert

func (c *Client) Insert(host, zone string, reqs []string) (r *dns.Msg, tt time.Duration, err error)

Insert performs an insert

func (*Client) InsertA

func (c *Client) InsertA(host, name, zone, address string, ttl int) (r *dns.Msg, tt time.Duration, err error)

InsertA inserts an A record

func (*Client) InsertCNAME

func (c *Client) InsertCNAME(host, name, zone, target string, ttl int) (r *dns.Msg, tt time.Duration, err error)

InsertCNAME inserts an CNAME record

func (*Client) Keyname

func (c *Client) Keyname() *string

Keyname returns the keyname

func (*Client) Lookup

func (c *Client) Lookup(host, value string) (data string, r *dns.Msg, tt time.Duration, err error)

Lookup looks up a value

func (*Client) NegotiateContext

func (c *Client) NegotiateContext() (err error)

NegotiateContext obtains a new tkey

func (*Client) Remove

func (c *Client) Remove(host, zone string, reqs []string) (r *dns.Msg, tt time.Duration, err error)

Remove performs a remove

func (*Client) RemoveA

func (c *Client) RemoveA(host, name, zone, address string, ttl int) (r *dns.Msg, tt time.Duration, err error)

RemoveA removes an A record

func (*Client) RemoveCNAME

func (c *Client) RemoveCNAME(host, name, zone, target string, ttl int) (r *dns.Msg, tt time.Duration, err error)

RemoveCNAME removes an CNAME record

func (*Client) Update

func (c *Client) Update(host, zone string, oReqs, nReqs []string) (r *dns.Msg, tt time.Duration, err error)

Update performs an update

func (*Client) UpdateA

func (c *Client) UpdateA(host, name, zone, oAddress, nAddress string, ttl int) (r *dns.Msg, tt time.Duration, err error)

UpdateA updates an A record

func (*Client) UpdateCNAME

func (c *Client) UpdateCNAME(host, name, zone, oTarget, nTarget string, ttl int) (r *dns.Msg, tt time.Duration, err error)

UpdateCNAME updates an CNAME record

type ClientConfig

type ClientConfig struct {
	KRB5Host string
	KRB5Conf *config.Config
	Domain   string
	Username string
	Password string
}

ClientConfig .

type ClientOption

type ClientOption func(cl *Client) (err error)

ClientOption a client option

func WithKRB5ConfigData

func WithKRB5ConfigData(domain string, kdcs []string) ClientOption

WithKRB5ConfigData generates the krb5 config

func WithKRB5ConfigString

func WithKRB5ConfigString(conf string) ClientOption

WithKRB5ConfigString sets the krb5 config

Jump to

Keyboard shortcuts

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