namesilo_api

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultApiURLPrefix string = "https://www.namesilo.com/api"

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSAddRecordsResponse

type DNSAddRecordsResponse struct {
	XMLName xml.Name `xml:"namesilo"`
	Reply   struct {
		XMLName xml.Name `xml:"reply"`
		Detail  string   `xml:"detail"`
	}
}

type DNSDeleteRecordsResponse

type DNSDeleteRecordsResponse DNSAddRecordsResponse

type DNSUpdateRecordsResponse

type DNSUpdateRecordsResponse DNSAddRecordsResponse

type ListDNSRecordsResponse

type ListDNSRecordsResponse struct {
	XMLName xml.Name `xml:"namesilo"`
	Reply   struct {
		XMLName         xml.Name         `xml:"reply"`
		ResourceRecords []ResourceRecord `xml:"resource_record"`
		Detail          string           `xml:"detail"`
	}
}

type NamesiloApi

type NamesiloApi interface {
	ListDNSRecords() ([]ResourceRecord, error)
	UpdateDNSRecord(rr ResourceRecord) error
	AddDNSRecord(rr ResourceRecord) error
	DeleteDNSRecord(rr ResourceRecord) error
}

func NewNamesiloApi

func NewNamesiloApi(domain, apiKey string) NamesiloApi

func NewNamesiloApiWithServer

func NewNamesiloApiWithServer(domain, apiKey, apiPrefix string) NamesiloApi

type ResourceRecord

type ResourceRecord struct {
	XMLName  xml.Name `xml:"resource_record"`
	RecordId string   `xml:"record_id"`
	Type     string   `xml:"type"`
	Host     string   `xml:"host"`
	Value    string   `xml:"value"`
	TTL      int      `xml:"ttl"`
	Distance int      `xml:"distance"`
}

func (ResourceRecord) Equals

func (r ResourceRecord) Equals(other interface{}) bool

func (ResourceRecord) EqualsRecord

func (r ResourceRecord) EqualsRecord(other ResourceRecord) bool

Jump to

Keyboard shortcuts

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