gcp

package
v0.0.0-...-98a31d7 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiErrorFromErr

func ApiErrorFromErr(err error) *apierror.APIError

Types

type CloudDnsService

type CloudDnsService interface {
	// GetZone returns a ManagedZone object for the given project and zone
	GetZone(ctx context.Context, project string, zone string) (*dns.ManagedZone, error)
	// GetOperation returns an Operation object for the given project and zone
	GetOperation(ctx context.Context, project string, zone string, operation string) (*dns.Operation, error)
	// CreateZone creates a new ManagedZone object for the given project
	CreateZone(ctx context.Context, project string, zone *dns.ManagedZone) (*dns.ManagedZone, error)
	// UpdateZone updates an existing ManagedZone object for the given project and zone
	UpdateZone(ctx context.Context, project string, zone string, mz *dns.ManagedZone) (*dns.Operation, error)
	// DeleteZone deletes a ManagedZone object for the given project and zone
	DeleteZone(ctx context.Context, project string, zone string) error
	// GetRecord returns a RecordSet object for the given project, zone and record
	GetRecord(ctx context.Context, project string, zone string, record string, type_ string) (*dns.ResourceRecordSet, error)
}

CloudDnsService is an interface for interacting with Google Cloud DNS

type GcpCloudDnsService

type GcpCloudDnsService struct {
	NewService    newCloudDnsService
	ClientOptions []option.ClientOption
}

func (*GcpCloudDnsService) CreateZone

func (g *GcpCloudDnsService) CreateZone(ctx context.Context, project string, zone *dns.ManagedZone) (*dns.ManagedZone, error)

func (*GcpCloudDnsService) DeleteZone

func (g *GcpCloudDnsService) DeleteZone(ctx context.Context, project string, zone string) error

func (*GcpCloudDnsService) GetOperation

func (g *GcpCloudDnsService) GetOperation(ctx context.Context, project string, zone string, operation string) (*dns.Operation, error)

func (*GcpCloudDnsService) GetRecord

func (g *GcpCloudDnsService) GetRecord(ctx context.Context, project string, zone string, record string, type_ string) (*dns.ResourceRecordSet, error)

func (*GcpCloudDnsService) GetZone

func (g *GcpCloudDnsService) GetZone(ctx context.Context, project string, zone string) (*dns.ManagedZone, error)

func (*GcpCloudDnsService) UpdateZone

func (g *GcpCloudDnsService) UpdateZone(ctx context.Context, project string, zoneName string, zone *dns.ManagedZone) (*dns.Operation, error)

Jump to

Keyboard shortcuts

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