dyndns

package
v0.0.0-...-0889dd8 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFqdnIP

func GetFqdnIP(conf Config, log *slog.Logger) string

GetFqdnIP Get the FQDN's current IP address

func GetWanIP

func GetWanIP(log *slog.Logger) string

GetWanIP Call to ipify.org to obtain the host's WAM IP address.

func UpdateFqdnIP

func UpdateFqdnIP(conf Config, log *slog.Logger, ip string)

UpdateFqdnIP Update the FQDN with the current WAN IP address

Types

type Config

type Config struct {
	AccessKeyID     string `toml:"AccessKeyID"`
	SecretAccessKey string `toml:"SecretAccessKey"`
	HostedZoneID    string `toml:"HostedZoneID"`
	Fqdn            string `toml:"Fqdn"`
	Debug           bool   `toml:"Debug"`
}

Config represents the application's config file

func GetConfig

func GetConfig(logger *slog.Logger) Config

GetConfig reads the .dyndns-r53.toml configuration file for initialization.

type Response

type Response struct {
	IP string `json:"ip"`
}

Response represents the API response from https://www.ipify.org/

Jump to

Keyboard shortcuts

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