gcp

package
v0.0.0-...-1bf9b51 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterLocation

func GetClusterLocation() (string, error)

GetClusterLocation returns GKE cluster location

func GetClusterName

func GetClusterName() (string, error)

GetClusterName returns GKE cluster name

func GetProject

func GetProject() (string, error)

GetProject return GCP project name

Types

type CloudDNS

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

CloudDNS is a wrapper for GCP SDK api to hold relevant conf

func FromJSON

func FromJSON(filePath, zone, reverseZone, project string) *CloudDNS

FromJSON creaties DNS client instance with JSON key file

func (*CloudDNS) NewRequest

func (c *CloudDNS) NewRequest() pdns.DNSRequest

type DNSRequest

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

func (*DNSRequest) AddRecord

func (d *DNSRequest) AddRecord(domain, ip string)

AddRecord adds A record with single IP

func (*DNSRequest) AddReverseRecord

func (d *DNSRequest) AddReverseRecord(domain, ip string)

AddReverseRecord adds a PTR record for the reverse lookup

func (*DNSRequest) AddToSRV

func (d *DNSRequest) AddToSRV(srv, domain string, priority int)

AddToSRV adds domain to SRV record

func (*DNSRequest) AddToService

func (d *DNSRequest) AddToService(domain, ip string)

AddToService adds the given IP to A record with multiple IPs

func (*DNSRequest) Do

func (d *DNSRequest) Do() error

Do makes the request with all the attached changes No error would be returned when no changes have been added

func (*DNSRequest) RemoveFromSRV

func (d *DNSRequest) RemoveFromSRV(srv, domain string)

RemoveFromSRV removes domain from SRV record

func (*DNSRequest) RemoveFromService

func (d *DNSRequest) RemoveFromService(domain, ip string)

RemoveFromService removes given IP from an A record with multiple IPs

func (*DNSRequest) RemoveRecord

func (d *DNSRequest) RemoveRecord(domain, ip string)

RemoveRecord deletes A record with a single IP

func (*DNSRequest) RemoveReverseRecord

func (d *DNSRequest) RemoveReverseRecord(domain, ip string)

RemoveReverseRecord removes a PTR record from the reverse lookup zone

Jump to

Keyboard shortcuts

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