internal

package
v4.18.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Message string `json:"error,omitempty"`
	Result  string `json:"result,omitempty"`
}

APIError represents a API error.

func (APIError) Error

func (a APIError) Error() string

type Client

type Client struct {
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

Client the Direct Admin API client.

func NewClient

func NewClient(baseURL, username, password string) (*Client, error)

NewClient creates a new Client.

func (Client) DeleteRecord

func (c Client) DeleteRecord(ctx context.Context, domain string, record Record) error

func (Client) SetRecord

func (c Client) SetRecord(ctx context.Context, domain string, record Record) error

type Record

type Record struct {
	Name  string `url:"name,omitempty"`
	Type  string `url:"type,omitempty"`
	Value string `url:"value,omitempty"`
	TTL   int    `url:"ttl,omitempty"`
}

Record represents a DNS record.

Jump to

Keyboard shortcuts

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