dmapi

package
v4.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package dmapi Client for DMAPI joker.com. https://joker.com/faq/category/39/22-dmapi.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTxtEntryToZone

func AddTxtEntryToZone(zone, relative, value string, ttl int) string

AddTxtEntryToZone returns DNS zone with added TXT record.

func RemoveTxtEntryFromZone

func RemoveTxtEntryFromZone(zone, relative string) (string, bool)

RemoveTxtEntryFromZone clean-ups all TXT records with given name.

Types

type AuthInfo

type AuthInfo struct {
	APIKey   string
	Username string
	Password string
	// contains filtered or unexported fields
}

type Client

type Client struct {
	HTTPClient *http.Client
	BaseURL    string

	Debug bool
	// contains filtered or unexported fields
}

Client a DMAPI Client.

func NewClient

func NewClient(auth AuthInfo) *Client

NewClient creates a new DMAPI Client.

func (*Client) GetZone

func (c *Client) GetZone(domain string) (*Response, error)

GetZone returns content of DNS zone for domain.

func (*Client) Login

func (c *Client) Login() (*Response, error)

Login performs a login to Joker's DMAPI.

func (*Client) Logout

func (c *Client) Logout() (*Response, error)

Logout closes authenticated session with Joker's DMAPI.

func (*Client) PutZone

func (c *Client) PutZone(domain, zone string) (*Response, error)

PutZone uploads DNS zone to Joker DMAPI.

type Response

type Response struct {
	Headers    url.Values
	Body       string
	StatusCode int
	StatusText string
	AuthSid    string
}

Response Joker DMAPI Response.

Jump to

Keyboard shortcuts

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