cloudflare

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Success  bool     `json:"success"`
	Errors   []Error  `json:"errors"`
	Messages []string `json:"messages"`
}

type Client

type Client interface {
	ListZones(zoneName string) (int, ListZonesResponse, error)
	ListDNSRecords(zoneID string, name string) (int, ListDNSRecordsResponse, error)
	CreateDNSRecord(zoneID string, dnsRecord DNSRecord) (int, APIResponse, error)
	UpdateDNSRecord(zoneID string, dnsRecord DNSRecord) (int, APIResponse, error)
}

func NewClient

func NewClient(config config.Config) Client

type DNSRecord

type DNSRecord struct {
	ID      string `json:"id,omitempty"`
	Name    string `json:"name"`
	Type    string `json:"type"`
	Content string `json:"content"`
	Proxied bool   `json:"proxied"`
}

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type ListDNSRecordsResponse

type ListDNSRecordsResponse struct {
	APIResponse
	Result []DNSRecord `json:"result"`
}

type ListZonesResponse

type ListZonesResponse struct {
	APIResponse
	Result []Zone `json:"result"`
}

type Zone

type Zone struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Status string `json:"status"`
}

Jump to

Keyboard shortcuts

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