Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface { // GetAllDomains returns a list of domains stored in the configuration struct GetAllDomains() []string // GetCredentialsByDomain returns an individual Credential for the specified domains GetCredentialsByHostname(hostname string) (Credential, error) // GetDomainsURL should return the URL for Google Domains' api GetDomainsURL() string // GetIPIfyURL returns the IPify URL to use in the client GetIPIfyURL() string // GetUpdateInterval returns the interval for the client to update Google Domains GetUpdateInterval() time.Duration }
Config is an interface that all config types must implement
func NewConfigFromFile ¶
NewConfigFromFile creates a new Config from filename or returns any errors during file reads or YAML parsing
type Credential ¶
type Credential struct {
User, Password string
}
Credential is a simple struct to handle username/password combos
type DomainsAPI ¶
type DomainsAPI interface { // Update conforms to the HTTP API for updating a DDNS name on Google Domains Update(credential Credential, hostname string, ip net.IP, offline bool) error }
DomainsAPI is an interface that Domains API implementations must implement
func NewDomainsAPI ¶
func NewDomainsAPI(baseURL string) DomainsAPI
NewDomainsAPI returns a new instance of a DaomainsAPI
Click to show internal directories.
Click to hide internal directories.