app

package
v0.0.0-...-8e86d08 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootPath = "/etc/cloudflare-ddns/"
View Source
var RootSystemdPath = "/etc/systemd/system/"

Functions

func GetOutboundIP

func GetOutboundIP() (string, error)

Types

type Cloudflare

type Cloudflare struct {
	CfApiKey   string `toml:"cf_api_key" json:"cf_api_key"`
	CfApiEmail string `toml:"cf_api_email" json:"cf_api_email"`
	Domain     Domain `toml:"domain" json:"domain"`
}

type Config

type Config struct {
	Title      string     `toml:"title" json:"title"`
	Cloudflare Cloudflare `toml:"cloudflare" json:"cloudflare"`
}

func (*Config) Decode

func (c *Config) Decode() error

func (*Config) FileName

func (c *Config) FileName() string

func (*Config) IsConfigFileExist

func (c *Config) IsConfigFileExist() bool

func (*Config) IsSystemdServiceExist

func (c *Config) IsSystemdServiceExist() bool

type Core

type Core struct {
	Config *Config
	API    *cloudflare.API
}

func NewCore

func NewCore(config *Config, api *cloudflare.API) *Core

func (*Core) Init

func (c *Core) Init()

func (*Core) Run

func (c *Core) Run()

type Domain

type Domain struct {
	Zone string `json:"zone"`
	Type string `toml:"type" json:"type"`
	Name string `toml:"name" json:"name"`
}

type IP

type IP struct {
	Query string
}

Jump to

Keyboard shortcuts

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