windns

package
v0.0.0-...-71008ac Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddARecordOptions

type AddARecordOptions struct {
	DnsServer      string
	Name           string
	Address        string
	ZoneName       string
	AllowUpdateAny bool
	CreatePtr      bool
	TTL            int
}

AddARecordOptions options to add an a record

type Client

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

Client a windns client

func NewClient

func NewClient(opts *Options) (*Client, error)

NewClient creates a new client

func (*Client) AddARecord

func (c *Client) AddARecord(opts *AddARecordOptions) (*Response, error)

AddARecord adds a new A record

func (*Client) DeleteARecord

func (c *Client) DeleteARecord(opts *DeleteARecordOptions) (*Response, error)

DeleteARecord deletes an A record

func (*Client) ReadARecord

func (c *Client) ReadARecord(opts *ReadARecordOptions) (*Response, error)

ReadARecord reads an A record

func (*Client) UpdateARecord

func (c *Client) UpdateARecord(opts *UpdateARecordOptions) (*Response, error)

UpdateARecord adds an A record

type DeleteARecordOptions

type DeleteARecordOptions struct {
	DnsServer string
	Name      string
	Address   string
	ZoneName  string
}

DeleteARecordOptions options to add an a record

type Options

type Options struct {
	DnsServer       string
	ProxyHost       string
	Username        string
	Password        string
	Domain          string
	SecureTransport bool
	SkipSSLVerify   bool
	Port            int
	KDCServers      []string
	KRB5Conf        string
	TimeoutSeconds  int
}

Options client options

type ReadARecordOptions

type ReadARecordOptions struct {
	DnsServer string
	Name      string
	Address   string
	ZoneName  string
}

ReadARecordOptions options to read an a record

type Record

type Record struct {
	Type string      `json:"type"`
	Name string      `json:"name"`
	Zone string      `json:"zone"`
	Data interface{} `json:"data"`
	TTL  int         `json:"ttl"`
}

Record record

type Response

type Response struct {
	Code    int       `json:"code"`
	Detail  string    `json:"detail"`
	Records []*Record `json:"records"`
}

Response a response object

type UpdateARecordOptions

type UpdateARecordOptions struct {
	DnsServer  string
	Name       string
	Address    string
	NewAddress string
	ZoneName   string
	TTL        int
}

UpdateARecordOptions options to add an a record

Jump to

Keyboard shortcuts

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