designate

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 12 Imported by: 1

README

OpenStack Designate for libdns

godoc reference

This package implements the libdns interfaces for the OpenStack Designate API (using the Go implementation from: github.com/gophercloud/gophercloud/openstack)

Authenticating

To authenticate you need to supply a OpenStack API credentials and zone name on which you want to operate.

Credentials needed to authenticate to the OpenStack Designate API

 OS_REGION_NAME=""
 OS_TENANT_ID=""
 OS_IDENTITY_API_VERSION=
 OS_PASSWORD=""
 OS_AUTH_URL=""
 OS_USERNAME=""
 OS_TENANT_NAME=""
 OS_ENDPOINT_TYPE=""

Example

You can find minimal example of how to get all your DNS records using this libdns provider in examples directory (see examples/main.go)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthOpenStack

type AuthOpenStack struct {
	RegionName         string `json:"region_name"`
	TenantID           string `json:"tenant_id"`
	IdentityApiVersion string `json:"identity_api_version"`
	Password           string `json:"password"`
	AuthURL            string `json:"auth_url"`
	Username           string `json:"username"`
	TenantName         string `json:"tenant_name"`
	EndpointType       string `json:"endpoint_type"`
}

AuthOpenStack contains credentials for OpenStack Designate.

type Provider

type Provider struct {
	AuthOpenStack AuthOpenStack `json:"auth_open_stack"`
	// contains filtered or unexported fields
}

Provider implements the libdns interfaces for OpenStack Designate.

func (*Provider) AppendRecords

func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)

AppendRecords adds records to the zone and returns the records that were created. Due to technical limitations of the LiveDNS API, it may affect the TTL of similar records

func (*Provider) DeleteRecords

func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)

DeleteRecords deletes records from the zone and returns the records that were deleted.

func (*Provider) GetRecords

func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)

GetRecords lists all the records in the zone.

func (*Provider) SetRecords

func (p *Provider) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)

SetRecords sets the records in the zone, either by updating existing records or creating new ones, and returns the recordsthat were updated. Due to technical limitations of the LiveDNS API, it may affect the TTL of similar records.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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