aftermarketpl

package module
v0.0.0-...-3ac0b9b Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: MIT Imports: 7 Imported by: 0

README

Go-Aftermarket

unofficial aftermarket api binding

Work in progress

Documentation

Index

Constants

View Source
const (
	RecordTypeA     string = "A"
	RecordTypeAAAA  string = "AAAA"
	RecordTypeCNAME string = "CNAME"
	RecordTypeMX    string = "MX"
	RecordTypeTXT   string = "TXT"
	RecordTypeNS    string = "NS"
	RecordTypeCAA   string = "CAA"
	RecordTypeSRV   string = "SRV"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Aftermarketpl

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

Aftermarketpl structs holds information neede to perform API request

func New

func New(key, secret string) *Aftermarketpl

New creates new instace of Aftermarketpl struct with default URL

func NewCustomURL

func NewCustomURL(key, secret, url string) *Aftermarketpl

NewCustomURL creates new instace of Aftermarketpl struct with custom URL

func (*Aftermarketpl) AccountBalance

func (a *Aftermarketpl) AccountBalance() (float64, error)

AccountBalance Returns the current user balance.

func (*Aftermarketpl) AccountCurrency

func (a *Aftermarketpl) AccountCurrency() (string, error)

AccountCurrency Returns the current user currency.

func (*Aftermarketpl) AccountID

func (a *Aftermarketpl) AccountID() (string, error)

AccountID Returns the current user identifier.

func (*Aftermarketpl) Do

func (a *Aftermarketpl) Do(actionName string, request, response interface{}) error

Do executes action with given request and ouput it into response

func (*Aftermarketpl) DomainDNSAdd

func (a *Aftermarketpl) DomainDNSAdd(name, value, recordType string) (int, error)

DomainDNSAdd adds new DNS entry for domain

func (*Aftermarketpl) DomainDNSList

func (a *Aftermarketpl) DomainDNSList(name string) ([]DomainDNSListEntry, error)

DomainDNSList returns the list of domain DNS entries.

func (*Aftermarketpl) DomainDNSListCount

func (a *Aftermarketpl) DomainDNSListCount(name string) (int, error)

DomainDNSListCount returns the number of domain DNS entries.

func (*Aftermarketpl) DomainDNSRemove

func (a *Aftermarketpl) DomainDNSRemove(name string, entryID int) (bool, error)

DomainDNSRemove Remove DNS entry for domain.

func (*Aftermarketpl) DomainGet

func (a *Aftermarketpl) DomainGet(name string) (*DomainGetDataResponse, error)

DomainGet returns the domain information on user account.

type DomainDNSListEntry

type DomainDNSListEntry struct {
	Name    string `json:"name"`
	Value   string `json:"value"`
	EntryID int    `json:"entryId"`
	Type    string `json:"type"`
}

DomainDNSListEntry represents DNS entry

type DomainGetDataResponse

type DomainGetDataResponse struct {
	Name         string `json:"name"`
	AutoRenew    bool   `json:"autorenew"`
	CostCurrency string `json:"costCurrency"`
}

DomainGetDataResponse represents domain information on user account.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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