ddns

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProvider

func RegisterProvider(providerName string, factory ProviderFactory)

Types

type Cloudflare

type Cloudflare struct {
	Email    string        `json:"email"`
	APIToken string        `json:"api_token"`
	ZoneName string        `json:"zone_name"`
	TTL      time.Duration `json:"ttl"`
	Proxied  bool          `json:"proxied"`
}

func (*Cloudflare) MarshalJSON

func (d *Cloudflare) MarshalJSON() ([]byte, error)

func (*Cloudflare) PrettyPrint

func (c *Cloudflare) PrettyPrint(prefix string) ([]byte, error)

func (*Cloudflare) UnmarshalJSON

func (d *Cloudflare) UnmarshalJSON(b []byte) error

func (*Cloudflare) Update

func (c *Cloudflare) Update(domain string, hosts []string) error

type DuckDNS

type DuckDNS struct {
	APIToken string `json:"api_token"`
}

func (*DuckDNS) PrettyPrint

func (d *DuckDNS) PrettyPrint(prefix string) ([]byte, error)

func (*DuckDNS) Update

func (d *DuckDNS) Update(domain string, hosts []string) error

type ProviderFactory

type ProviderFactory func(ProviderSettings) Service

type ProviderSettings

type ProviderSettings interface{}

type Service

type Service interface {
	Update(domain string, hosts []string) error
	PrettyPrint(string) ([]byte, error)
}

func NewCloudflare

func NewCloudflare(settings ProviderSettings) Service

func NewDDNSService

func NewDDNSService(provider string, config ProviderSettings) (Service, error)

func NewDuckDNS

func NewDuckDNS(settings ProviderSettings) Service

Jump to

Keyboard shortcuts

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