nswrapper

package
v0.0.0-...-5d87fb3 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteRecord

func DeleteRecord(hostname string, zone string, enableWildcard bool) error

DeleteRecord builds a nsupdate file and deletes a record by executing it with nsupdate.

func GetCallerIP

func GetCallerIP(r *http.Request) (string, error)

GetCallerIP searches for the "real" IP senders has actually. If its a private address we won't use it.

func GetIPType

func GetIPType(ipAddr string) string

GetIPType finds out if the IP is IPv4 or IPv6

func ShrinkUserAgent

func ShrinkUserAgent(agent string) string

ShrinkUserAgent simply cuts the user agent information if its too long to display.

func UpdateRecord

func UpdateRecord(hostname string, target string, addrType string, zone string, ttl int, enableWildcard bool) error

UpdateRecord builds a nsupdate file and updates a record by executing it with nsupdate.

Types

This section is empty.

Jump to

Keyboard shortcuts

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