ultradns

package module
v0.0.0-...-ee296f2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2016 License: MIT Imports: 4 Imported by: 1

README

ultradns

Ultradns SDK for GoLang

Documentation

Index

Constants

View Source
const (
	UltraHost = "https://restapi.ultradns.com"
	AuthURL   = UltraHost + "/v1/authorization/token"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccInfo

type AccInfo struct {
	AccountName    string `json:"accountName"`
	AccountType    string `json:"accountType"`
	HolderUserName string `json:"accountHolderUserName"`
	OwnerUserName  string `json:"accountOwnerUserName"`
	NumUsers       string `json:"numberOfUsers"`
	NumGrps        string `json:"numberOfGroups"`
}

type AuthResp

type AuthResp struct {
	TokenType    string `json:"tokenType"`
	RefreshToken string `json:"refreshToken"`
	AccessToken  string `json:"accessToken"`
	Expires      string `json:"expiresIn"`
	// contains filtered or unexported fields
}

type QueryInfo

type QueryInfo struct {
	QSort   string `json:"sort,omitempty"`
	Reverse bool   `json:"reverse,omitempty"`
	Limit   int    `json:"limit"`
}

type RRSet

type RRSet struct {
	RecName  string   `json:"ownerName"`
	RType    string   `json:"rrtype"`
	TTL      int      `json:"ttl"`
	RRecords []string `json:"rdata"`
}

type RegistrarInfo

type RegistrarInfo struct {
	Registrar    string `json:"registrar"`
	WhoIsExpires string `json:"whoisExpiration,omitempty"`
	NameServers  struct {
		Ok        []string `json:"ok,omitempty"`
		Unknown   []string `json:"unknown,omitempty"`
		Missing   []string `json:"missing,omitempty"`
		InCorrect []string `json:"incorrect,omitempty"`
	} `json:"nameServers,omitempty"`
}

type ResultInfo

type ResultInfo struct {
	Total    int `json:"totalCount"`
	OffSet   int `json:"offset"`
	RetCount int `json:"returnedCount"`
}

type UltraDns

type UltraDns struct {
	Client *gorequest.SuperAgent
	// contains filtered or unexported fields
}

func NewSession

func NewSession() *UltraDns

func (*UltraDns) Authenticate

func (ud *UltraDns) Authenticate(username, password string) error

get and set the authentication tokens

func (*UltraDns) GetAccountDetails

func (ud *UltraDns) GetAccountDetails() ([]AccInfo, error)

get account details for user

func (*UltraDns) GetAllZones

func (ud *UltraDns) GetAllZones() ([]Zone, error)

list all zones for the account

func (*UltraDns) GetRRsets

func (ud *UltraDns) GetRRsets(zName string, offset, limit int) ([]RRSet, ResultInfo, error)

get all resource record sets

func (*UltraDns) GetVersion

func (ud *UltraDns) GetVersion() (VerInfo, error)

get version

type VerInfo

type VerInfo struct {
	Ver string `json:"version"`
}

type Zone

type Zone struct {
	Property    ZoneProp      `json:"properties"`
	RegInfo     RegistrarInfo `json:"registrarInfo"`
	RestrictIps []struct {
		SingleIP string `json:"singleIP,omitempty"`
		StartIP  string `json:"startIP,omitempty"`
		EndIP    string `json:"EndIP,omitempty"`
	} `json:"restrictIpList,omitempty"`
}

type ZoneProp

type ZoneProp struct {
	ZName        string `json:"name"`
	AccName      string `json:"accountName"`
	AccType      string `json:"type"`
	DNSSecStatus string `json:"dnssecStatus"`
	Status       string `json:"status"`
	Owner        string `json:"owner"`
	RRCount      int    `json:"resourceRecordCount"`
	LastUpdated  string `json:"lastModifiedDateTime"`
}

Jump to

Keyboard shortcuts

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