designate

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 10 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_AUTH_URL=""
 OS_AUTH_TYPE="" # Should be v3applicationcredential
 OS_APPLICATION_CREDENTIAL_ID=""
 OS_APPLICATION_CREDENTIAL_SECRET=""

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"`
	AuthURL                     string `json:"auth_url"`
	AuthType                    string `json:"auth_type"`
	ApplicationCredentialId     string `json:"app_credential_id"`
	ApplicationCredentialSecret string `json:"app_credential_secret"`
}

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.

Jump to

Keyboard shortcuts

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