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: 10 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 {
	Message string `json:"message"`
	Result  int    `json:"result"`
}

type Client

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

Client Sonic client.

func NewClient

func NewClient(userID, apiKey string) (*Client, error)

NewClient creates a Client.

func (*Client) SetRecord

func (c *Client) SetRecord(ctx context.Context, hostname string, value string, ttl int) error

SetRecord creates or updates a TXT records. Sonic does not provide a delete record API endpoint. https://public-api.sonic.net/dyndns#updating_or_adding_host_records

type Record

type Record struct {
	UserID   string `json:"userid"`
	APIKey   string `json:"apikey"`
	Hostname string `json:"hostname"`
	Value    string `json:"value"`
	TTL      int    `json:"ttl"`
	Type     string `json:"type"`
}

Record holds the Sonic API representation of a Domain Record.

Jump to

Keyboard shortcuts

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