helpers

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package helpers contains helper functions for working with Azure DNS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRecordName

func GenerateRecordName(hostname string, zone string, relative bool) string

GenerateRecordName determines a DNS resource record name from a hostname and the zone name. It strips any trailing dots and optionally the zone name from the provided hostname. If the result would be the empty string, it instead returns "@", which corresponds to the apex of DNS zone.

func GetAuthorizer

func GetAuthorizer(baseURI string) (authorizer *autorest.BearerAuthorizer, err error)

GetAuthorizer creates a BearerAuthorizer based on credentials retrieved from Viper. If credentials have not been provided, an error will be returned.

func NewRecordSetClient

func NewRecordSetClient(baseURI string) (client dns.RecordSetsClient, err error)

NewRecordSetClient creates a new RecordSetsClient using the specified baseURI and attaches a BearerAuthorizer based on credentials provided either via an Azure SDK auth file, if present, or through any mechanism supported by Viper. If credentials have not been provided, an error will be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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