internal

package
v0.0.0-...-d25b310 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 11 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 {
	Status  string `json:"status"`
	Message string `json:"message"`
}

func (APIResponse) Error

func (a APIResponse) Error() string

type Client

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

Client for the RcodeZero API.

func NewClient

func NewClient(apiToken string) *Client

NewClient creates a new Client.

func (*Client) UpdateRecords

func (c *Client) UpdateRecords(ctx context.Context, authZone string, sets []UpdateRRSet) (*APIResponse, error)

type Record

type Record struct {
	Content  string `json:"content"`
	Disabled bool   `json:"disabled"`
}

type UpdateRRSet

type UpdateRRSet struct {
	Name       string   `json:"name"`
	Type       string   `json:"type"`
	ChangeType string   `json:"changetype"`
	Records    []Record `json:"records"`
	TTL        int      `json:"ttl"`
}

Jump to

Keyboard shortcuts

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