loopia

package module
v0.0.0-...-1f0c5b1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

loopia

Loopia API Golang

Documentation

Index

Constants

View Source
const APIURL string = "https://api.loopia.se/RPCSERV"

APIURL - where API is hosted

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Username    string
	Password    string
	RPCEndpoint string
}

API Struct to store runtime info

func New

func New(username string, password string) (*API, error)

New returns a loopia.API instance

func (*API) AddSubdomain

func (api *API) AddSubdomain(domain string, subdomain string) (*Status, error)

AddSubdomain - method for creating subdomain

func (*API) AddZoneRecord

func (api *API) AddZoneRecord(domain string, subdomain string, record *Record) error

AddZoneRecord - Create zone record

func (*API) Call

func (api *API) Call(serviceMethod string, args []interface{}, reply interface{}) error

func (*API) GetDomain

func (api *API) GetDomain(domain string) (*Domain, error)

GetDomain

func (*API) GetDomains

func (api *API) GetDomains() ([]Domain, error)

GetDomains - Method for fetching all domains

func (*API) GetSubdomain

func (api *API) GetSubdomain(domain string, subdomain string) (*Subdomain, error)

GetSubdomain ...

func (*API) GetSubdomains

func (api *API) GetSubdomains(domain string) ([]Subdomain, error)

GetSubdomains - Method for fetching all subdomains

func (*API) GetZoneRecord

func (api *API) GetZoneRecord(domain string, subdomain string, id int64) (*Record, error)

GetZoneRecord - fetch specific zone record

func (*API) GetZoneRecords

func (api *API) GetZoneRecords(domain string, subdomain string) ([]Record, error)

GetZoneRecords - fetch subdomains records

func (*API) RemoveSubDomain

func (api *API) RemoveSubDomain(domain string, subdomain string) (*Status, error)

RemoveSubDomain - Removes a subdomain

func (*API) RemoveZoneRecord

func (api *API) RemoveZoneRecord(domain string, subdomain string, id int64) (*Status, error)

RemoveZoneRecord - remove zone record

func (*API) UpdateZoneRecord

func (api *API) UpdateZoneRecord(domain string, subdomain string, record Record) (*Status, error)

UpdateZoneRecord -

func (*API) XMLRPCClient

func (api *API) XMLRPCClient() *xmlrpc.Client

XMLRPCClient to interact with Loopia XMLRPC

type Domain

type Domain struct {
	Name            string `xmlrpc:"domain"`
	Paid            bool   `xmlrpc:"paid"`
	Registered      bool   `xmlrpc:"registered"`
	RenewalStatus   string `xmlrpc:"renewal_status"`
	ExpirationDate  string `xmlrpc:"expiration_date"`
	ReferenceNumber int32  `xmlrpc:"reference_number"`
}

Domain type

type Record

type Record struct {
	ID       int64  `xmlrpc:"record_id"`
	TTL      int    `xmlrpc:"ttl"`
	Type     string `xmlrpc:"type"`
	Value    string `xmlrpc:"rdata"`
	Priority int    `xmlrpc:"priority"`
}

Record descired Loopia record_obj

type Status

type Status struct {
	Status string
	Cause  string
}

Status - operation status wrapper

type Subdomain

type Subdomain struct {
	Name string
}

Subdomain ...

Jump to

Keyboard shortcuts

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