cloudns

package
v0.0.0-...-d68e7fd Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ApiHostname = "https://api.cloudns.net/"
View Source
const (
	EPLogin = "dns/login.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClouDNSAPI

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

func New

func New(SubAuthID string, AuthPassword string) ClouDNSAPI

func (*ClouDNSAPI) GetRecordsForZone

func (c *ClouDNSAPI) GetRecordsForZone(zone string) ([]ZoneRecord, error)

func (*ClouDNSAPI) GetZones

func (c *ClouDNSAPI) GetZones() ([]ZoneListResponse, error)

func (*ClouDNSAPI) Login

func (c *ClouDNSAPI) Login() (StatusResponse, error)

type RequestMethod

type RequestMethod int
const (
	METHOD_GET RequestMethod = iota
	METHOD_POST
)

type StatusResponse

type StatusResponse struct {
	Status            string `json:"status"`
	StatusDescription string `json:"statusDescription"`
}

type ZoneListResponse

type ZoneListResponse struct {
	StatusResponse
	Name      string `json:"name"`
	Type      string `json:"type"`
	HasBulk   bool   `json:"hasBulk"`
	Zone      string `json:"zone"`
	Status    string `json:"status"`
	Serial    string `json:"serial"`
	IsUpdated int64  `json:"isUpdated"`
}

type ZoneRecord

type ZoneRecord struct {
	StatusResponse
	ID               string  `json:"id"`
	Type             string  `json:"type"`
	Host             string  `json:"host"`
	Record           string  `json:"record"`
	Failover         string  `json:"failover"`
	TTL              string  `json:"ttl"`
	Status           int64   `json:"status"`
	DynamicurlStatus *int64  `json:"dynamicurl_status,omitempty"`
	Priority         *string `json:"priority,omitempty"`
	Weight           *string `json:"weight,omitempty"`
	Port             *string `json:"port,omitempty"`
}

Jump to

Keyboard shortcuts

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