dnsproviders

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package googleclouddns provides functions to manage Google Cloud DNS entries

Index

Constants

View Source
const Cloudflare = "cloudflare"
View Source
const GoogleCloudDNS = "googleclouddns"

Variables

This section is empty.

Functions

func GetProvider

func GetProvider(ctx context.Context, typ api.ProviderType, zone string, credentialsData map[string]string, logger api.Logger) (api.Provider, error)

Types

type CloudDNS

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

func NewGoogleCloudDNSProvider

func NewGoogleCloudDNSProvider(ctx context.Context, zone string, credentialsData map[string]string, logger api.Logger) (*CloudDNS, error)

NewGoogleCloudDNS creates a new Google Cloud DNS provider

func (*CloudDNS) CreateOrUpdateDNSRecord

func (s *CloudDNS) CreateOrUpdateDNSRecord(ctx context.Context, zone, name, rtype, content string, ttl int, proxy bool) error

func (*CloudDNS) DeleteDNSRecord

func (s *CloudDNS) DeleteDNSRecord(ctx context.Context, zone, name string) error

func (*CloudDNS) GetDNSRecords

func (s *CloudDNS) GetDNSRecords(ctx context.Context, zone, name string) ([]api.Record, error)

type CloudflareAPI

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

func NewCloudflareProvider

func NewCloudflareProvider(ctx context.Context, zone string, credentialsData map[string]string, logger api.Logger) (*CloudflareAPI, error)

NewCloudflareProvider creates a new Cloudflare DNS provider.

func (*CloudflareAPI) CreateOrUpdateDNSRecord

func (s *CloudflareAPI) CreateOrUpdateDNSRecord(ctx context.Context, zone, name, rtype, content string, ttl int, proxy bool) error

CreateOrUpdateDNSRecord changes the existing record if found, or adds a new one

func (*CloudflareAPI) DeleteDNSRecord

func (s *CloudflareAPI) DeleteDNSRecord(ctx context.Context, zone, name string) error

DeleteDNSRecord deletes DNS record specified by recordID in zone.

func (*CloudflareAPI) GetDNSRecords

func (s *CloudflareAPI) GetDNSRecords(ctx context.Context, zone, name string) ([]api.Record, error)

GetDNSRecords returns a list of DNS records for the given domain name. Error returned otherwise. if name is provided, that is used as a filter

Directories

Path Synopsis
Package api defines the common API interface for DNS managers
Package api defines the common API interface for DNS managers

Jump to

Keyboard shortcuts

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