ddns

package
v0.0.0-...-0baba6e Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PublicIpPage = "https://1.1.1.1/cdn-cgi/trace"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*cf.API
	Logger *zap.SugaredLogger
	Config Config
}

Client is a wrapper around cloudflare.API.

func (Client) Start

func (client Client) Start()

Start starts the main application loop.

type Config

type Config struct {
	ApiToken        string        `mapstructure:"api_token"`
	RefreshInterval time.Duration `mapstructure:"refresh_interval"`
	Zones           []Zone        `mapstructure:"zones"`
}

type Record

type Record struct {
	Name string `mapstructure:"name"`
}

type Zone

type Zone struct {
	ZoneId          string   `mapstructure:"zone_id"`
	Proxied         bool     `mapstructure:"proxied"`
	Ipv6            bool     `mapstructure:"ipv6"`
	ExplicitRecords []Record `mapstructure:"explicit_records"`
}

func (Zone) ContainsExplicitRecords

func (zone Zone) ContainsExplicitRecords() bool

Jump to

Keyboard shortcuts

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