go-vinyldns

module
v0.9.16 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: Apache-2.0

README

Build and Release Go Report Card Godoc GitHub

vinyldns

A Golang client for the vinyldns DNS as a service API.

Usage

Basic usage requires instantiating a client and using the vinyldns/api.go methods to interact with vinyldns:

For example:

import "github.com/vinyldns/go-vinyldns/vinyldns"

client := vinyldns.NewClient(vinyldns.ClientConfiguration{
  "accessKey",
  "secretKey",
  "my-vinyldns-host.com",
  "my custom user agent",
})

// For example, fetch zones...
// returns vinyldns.Error, []vinyldns.Zone
zs, err := client.Zones()

Alternatively, NewClientFromEnv instantiates a client from the following environment variables:

VINYLDNS_ACCESS_KEY=
VINYLDNS_SECRET_KEY=
VINYLDNS_HOST=

# Optional; defaults to `go-vinyldns/<version>`
VINYLDNS_USER_AGENT=
import "github.com/vinyldns/go-vinyldns/vinyldns"

client := vinyldns.NewClientFromEnv()

See vinyldns/${resource}_resources.go files for the various vinyldns resource structs.

See vinyldns/${resource}.go files for the various vinyldns API methods.

Development

Run tests w/ code coverage:

make test

Install:

make install

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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