Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
vinyldns/ | H | 17-Sep-2020 | - | |||
.gitignore | H A D | 17-Sep-2020 | 13 | |||
.travis.yml | H A D | 17-Sep-2020 | 125 | |||
CODE_OF_CONDUCT.md | H A D | 17-Sep-2020 | 3.2 KiB | |||
CONTRIBUTING.md | H A D | 17-Sep-2020 | 3.1 KiB | |||
ISSUE_TEMPLATE.md | H A D | 17-Sep-2020 | 647 | |||
LICENSE | H A D | 17-Sep-2020 | 11.1 KiB | |||
Makefile | H A D | 17-Sep-2020 | 1.4 KiB | |||
NOTICE | H A D | 17-Sep-2020 | 674 | |||
PULL_REQUEST_TEMPLATE.md | H A D | 17-Sep-2020 | 1.5 KiB | |||
README.md | H A D | 17-Sep-2020 | 1.6 KiB | |||
go.mod | H A D | 17-Sep-2020 | 244 | |||
go.sum | H A D | 17-Sep-2020 | 834 |
README.md
1[![Build Status](https://travis-ci.org/vinyldns/go-vinyldns.svg?branch=master)](https://travis-ci.org/vinyldns/go-vinyldns) [![Go Report Card](https://goreportcard.com/badge/github.com/vinyldns/go-vinyldns)](https://goreportcard.com/report/github.com/vinyldns/go-vinyldns) [![Godoc](https://godoc.org/github.com/vinyldns/go-vinyldns/vinyldns?status.svg)](https://godoc.org/github.com/vinyldns/go-vinyldns/vinyldns) 2![GitHub](https://img.shields.io/github/license/vinyldns/go-vinyldns) 3 4# vinyldns 5 6A Golang client for the [vinyldns](https://github.com/vinyldns/vinyldns) DNS as a service API. 7 8## Usage 9 10Basic usage requires instantiating a client and using the `vinyldns/api.go` methods to interact with `vinyldns`: 11 12For example: 13 14```golang 15import "github.com/vinyldns/go-vinyldns/vinyldns" 16 17client := vinyldns.NewClient(vinyldns.ClientConfiguration{ 18 "accessKey", 19 "secretKey", 20 "my-vinyldns-host.com", 21 "my custom user agent", 22}) 23 24// For example, fetch zones... 25// returns vinyldns.Error, []vinyldns.Zone 26zs, err := client.Zones() 27``` 28 29Alternatively, `NewClientFromEnv` instantiates a client from the following environment variables: 30 31``` 32VINYLDNS_ACCESS_KEY= 33VINYLDNS_SECRET_KEY= 34VINYLDNS_HOST= 35 36# Optional; defaults to `go-vinyldns/<version>` 37VINYLDNS_USER_AGENT= 38``` 39 40```golang 41import "github.com/vinyldns/go-vinyldns/vinyldns" 42 43client := vinyldns.NewClientFromEnv() 44``` 45 46See `vinyldns/${resource}_resources.go` files for the various `vinyldns` resource structs. 47 48See `vinyldns/${resource}.go` files for the various `vinyldns` API methods. 49 50## Development 51 52Run tests w/ code coverage: 53 54``` 55make test 56``` 57 58Install: 59 60``` 61make install 62``` 63