auroradnsclient

package module
Version: v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2017 License: MPL-2.0 Imports: 6 Imported by: 0

README

Aurora DNS API client

Build Status License

An wrapper library for the Aurora DNS API, written in Go.

Features

  • List zones and records
  • Add and remove records

Requirements

  • Go >= 1.6

Build

make deps
make build

Test

make test

Basic usage

client, _ := NewAuroraDNSClient(fakeAuroraEndpoint, fakeAuroraDNSUserId, fakeAuroraDNSKey)

zones, err := client.GetZones()

License

auroradnsclient is licensed under MPL-2.0 - see the LICENSE file for details

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuroraDNSClient

type AuroraDNSClient struct {
	// contains filtered or unexported fields
}

AuroraDNSClient is a client for accessing the Aurora DNS API

func NewAuroraDNSClient

func NewAuroraDNSClient(endpoint string, userID string, key string) (*AuroraDNSClient, error)

NewAuroraDNSClient instantiates a new client

func (*AuroraDNSClient) CreateRecord

func (client *AuroraDNSClient) CreateRecord(zoneID string, data records.CreateRecordRequest) (*records.CreateRecordResponse, error)

CreateRecord creates a new record in given zone

func (*AuroraDNSClient) GetRecords

func (client *AuroraDNSClient) GetRecords(zoneID string) ([]records.GetRecordsResponse, error)

GetRecords returns a list of all records in given zone

func (*AuroraDNSClient) GetZones

func (client *AuroraDNSClient) GetZones() ([]zones.ZoneRecord, error)

GetZones returns a list of all zones

func (*AuroraDNSClient) RemoveRecord

func (client *AuroraDNSClient) RemoveRecord(zoneID string, recordID string) (*records.RemoveRecordResponse, error)

RemoveRecord removes a record corresponding to a particular id in a given zone

type AuroraDNSError

type AuroraDNSError struct {
	ErrorCode string `json:"error"`
	Message   string `json:"errormsg"`
}

AuroraDNSError describes the format of a generic AuroraDNS API error

func (AuroraDNSError) Error

func (e AuroraDNSError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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