internal

package
v4.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client the ArvanCloud client.

func NewClient

func NewClient(apiKey string) *Client

NewClient Creates a new ArvanCloud client.

func (*Client) CreateRecord

func (c *Client) CreateRecord(domain string, record DNSRecord) (*DNSRecord, error)

CreateRecord creates a DNS record. https://www.arvancloud.com/docs/api/cdn/4.0#operation/dns_records.create

func (*Client) DeleteRecord

func (c *Client) DeleteRecord(domain, id string) error

DeleteRecord deletes a DNS record. https://www.arvancloud.com/docs/api/cdn/4.0#operation/dns_records.remove

func (*Client) GetTxtRecord

func (c *Client) GetTxtRecord(domain, name, value string) (*DNSRecord, error)

GetTxtRecord gets a TXT record.

type DNSRecord

type DNSRecord struct {
	ID            string        `json:"id,omitempty"`
	Type          string        `json:"type"`
	Value         interface{}   `json:"value,omitempty"`
	Name          string        `json:"name,omitempty"`
	TTL           int           `json:"ttl,omitempty"`
	UpstreamHTTPS string        `json:"upstream_https,omitempty"`
	IPFilterMode  *IPFilterMode `json:"ip_filter_mode,omitempty"`
}

DNSRecord a DNS record.

type IPFilterMode

type IPFilterMode struct {
	Count     string `json:"count,omitempty"`
	Order     string `json:"order,omitempty"`
	GeoFilter string `json:"geo_filter,omitempty"`
}

IPFilterMode a DNS ip_filter_mode.

type TXTRecordValue

type TXTRecordValue struct {
	Text string `json:"text,omitempty"` // only for TXT Record.
}

TXTRecordValue represents a TXT record value.

Jump to

Keyboard shortcuts

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