dyndns

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package dyndns is the implementation of pkg/dnsprovider interface for DynDNS

Index

Constants

View Source
const (
	// ADDITION record change type for adding ResourceRecordSet
	ADDITION = ChangeSetType("ADDITION")
	// DELETION record change type for deleting ResourceRecordSet
	DELETION = ChangeSetType("DELETION")
	// UPSERT record change type for upserting ResourceRecordSet
	UPSERT = ChangeSetType("UPSERT")
)
View Source
const (
	ProviderName = "dyndns"
)

"dyndns" should be used to use this DNS provider

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeSet

type ChangeSet struct {
	// contains filtered or unexported fields
}

ChangeSet to hold ResourceRecordSet changes

type ChangeSetType

type ChangeSetType string

ChangeSetType the type of the ResourceRecordSet change

type Config

type Config struct {
	Global struct {
		DNSZones string `gcfg:"zones"`
		Customer string `gcfg:"customer"`
		User     string `gcfg:"user"`
		Password string `gcfg:"password"`
	}
}

Config to override defaults

type ConfigInfo

type ConfigInfo struct {
	DNSZones string
	Customer string
	User     string
	Password string
}

ConfigInfo holds information from config file

type Interface

type Interface struct {
	// contains filtered or unexported fields
}

Interface provides DynDNS implementation of the dns provider interface Interface

func (Interface) Zones

func (i Interface) Zones() (dnsprovider.Zones, bool)

Zones returns the hosted zones of the dns provider

type ResourceRecordChangeset

type ResourceRecordChangeset struct {
	// contains filtered or unexported fields
}

ResourceRecordChangeset provides DynDNS implementation of the dns provider interface ResourceRecordChangeset

func (*ResourceRecordChangeset) Add

Add adds a ResourceRecordSet to ChangeSet

func (*ResourceRecordChangeset) Apply

func (c *ResourceRecordChangeset) Apply() error

Apply publishes the changes of the ChangeSet

func (*ResourceRecordChangeset) IsEmpty

func (c *ResourceRecordChangeset) IsEmpty() bool

IsEmpty checks whether the ChangeSet is empty

func (*ResourceRecordChangeset) Remove

Remove removes a ResourceRecordSet from ChangeSet

func (*ResourceRecordChangeset) ResourceRecordSets

func (c *ResourceRecordChangeset) ResourceRecordSets() dnsprovider.ResourceRecordSets

ResourceRecordSets returns the parent ResourceRecordSets

func (*ResourceRecordChangeset) Upsert

Upsert upserts a ResourceRecordSet to ChangeSet

type ResourceRecordSet

type ResourceRecordSet struct {
	// contains filtered or unexported fields
}

ResourceRecordSet provides DynDNS implementation of the dns provider interface ResourceRecordSet

func (ResourceRecordSet) Name

func (rrset ResourceRecordSet) Name() string

Name returns the name of the ResourceRecordSet

func (ResourceRecordSet) Rrdatas

func (rrset ResourceRecordSet) Rrdatas() []string

Rrdatas returns the data of the ResourceRecordSet

func (ResourceRecordSet) Ttl

func (rrset ResourceRecordSet) Ttl() int64

Ttl returns the time to live of the ResourceRecordSet

func (ResourceRecordSet) Type

func (rrset ResourceRecordSet) Type() rrstype.RrsType

Type returns the type of the ResourceRecordSet

type ResourceRecordSets

type ResourceRecordSets struct {
	// contains filtered or unexported fields
}

ResourceRecordSets provides DynDNS implementation of the dns provider interface ResourceRecordSets

func (ResourceRecordSets) Get

Get gets the list of ResourceRecordSets that match the specified record name

func (ResourceRecordSets) GetRecordsFromDNSRRS

func (rrsets ResourceRecordSets) GetRecordsFromDNSRRS(rrs dnsprovider.ResourceRecordSet) []*godynect.Record

GetRecordsFromDNSRRS gets records which map to single IP address so they can be used for REST API to DynDNS server

func (ResourceRecordSets) List

List lists the ResourceRecordSet in its hosted zone

func (ResourceRecordSets) New

func (rrsets ResourceRecordSets) New(name string, rrdatas []string, ttl int64, rrsType rrstype.RrsType) dnsprovider.ResourceRecordSet

New returns a new ResourceRecordSet

func (ResourceRecordSets) StartChangeset

func (rrsets ResourceRecordSets) StartChangeset() dnsprovider.ResourceRecordChangeset

StartChangeset returns a new ResourceRecordChangeset

func (ResourceRecordSets) Zone

func (rrsets ResourceRecordSets) Zone() dnsprovider.Zone

Zone returns the parent zone

type Zone

type Zone struct {
	// contains filtered or unexported fields
}

Zone provides DynDNS implementation of the dns provider interface Zone

func (Zone) ID

func (zone Zone) ID() string

ID returns the id of the zone

func (Zone) Name

func (zone Zone) Name() string

Name returns the name of the zone

func (Zone) ResourceRecordSets

func (zone Zone) ResourceRecordSets() (dnsprovider.ResourceRecordSets, bool)

ResourceRecordSets returns the ResourceRecordSets of the zone

type Zones

type Zones struct {
	// contains filtered or unexported fields
}

Zones provides DynDNS implementation of the dns provider interface Zones

func (Zones) Add

func (zones Zones) Add(zone dnsprovider.Zone) (dnsprovider.Zone, error)

Add adds a Zone to the Zones

func (Zones) List

func (zones Zones) List() ([]dnsprovider.Zone, error)

List lists the Zone of the Zones

func (Zones) New

func (zones Zones) New(name string) (dnsprovider.Zone, error)

New returns a new Zone

func (Zones) Remove

func (zones Zones) Remove(zone dnsprovider.Zone) error

Remove removes a Zone from the Zones

Directories

Path Synopsis
Package stubs implements a stub for the service, used primarily for unit testing purposes
Package stubs implements a stub for the service, used primarily for unit testing purposes

Jump to

Keyboard shortcuts

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