f4ww4z / go-vinyldns

Go client package for VinylDNS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

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",
})

// 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=
import "github.com/vinyldns/go-vinyldns/vinyldns"

client := vinyldns.NewClientFromEnv()

See vinyldns/resources.go for the various vinyldns resource structs.

See vinyldns/api.go for the various vinyldns API methods.

Development

Install dependencies:

make deps

Run tests w/ code coverage:

make test

Install:

make install

About

Go client package for VinylDNS

License:Apache License 2.0


Languages

Language:Go 99.1%Language:Makefile 0.9%