Skip to content

djordan17/go-vinyldns

 
 

Repository files navigation

Build Status 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

About

Go client package for VinylDNS

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.9%
  • Makefile 1.1%