models

package
v0.0.0-...-542e895 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInformation

type BuildInformation struct {
	Version string `json:"version"`
	Commit  string `json:"commit"`
	Date    string `json:"buildDate"`
}

func (BuildInformation) VersionString

func (b BuildInformation) VersionString() string

type DomainHost

type DomainHost struct {
	Domain string
	Host   string
}

type HTMLData

type HTMLData struct {
	Rows []HTMLRow
}

HTMLData is a list of HTML fields to be rendered. It is exported so that the HTML template engine can render it.

type HTMLRow

type HTMLRow struct {
	Domain      string
	Host        string
	Provider    string
	IPVersion   string
	Status      string
	CurrentIP   string
	PreviousIPs string
}

HTMLRow contains HTML fields to be rendered It is exported so that the HTML template engine can render it.

type History

type History []HistoryEvent // current and previous ips

History contains current and previous IP address for a particular record with the latest success time.

func (History) GetCurrentIP

func (h History) GetCurrentIP() netip.Addr

GetCurrentIP returns the current IP address (latest in history).

func (History) GetDurationSinceSuccess

func (h History) GetDurationSinceSuccess(now time.Time) string

func (History) GetPreviousIPs

func (h History) GetPreviousIPs() []netip.Addr

GetPreviousIPs returns an antichronological list of previous IP addresses if there is any.

func (History) GetSuccessTime

func (h History) GetSuccessTime() time.Time

GetSuccessTime returns the latest success update time.

func (History) String

func (h History) String() (s string)

type HistoryEvent

type HistoryEvent struct {
	IP   netip.Addr `json:"ip"`
	Time time.Time  `json:"time"`
}

type IPMethod

type IPMethod struct {
	Name string
	URL  string
	IPv4 bool
	IPv6 bool
}

IPMethod is a method to obtain your public IP address.

type Provider

type Provider string

Provider is a possible DNS provider.

type Status

type Status string

Status is the record config status.

Jump to

Keyboard shortcuts

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