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: 9 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 {
	Type             string            `json:"type,omitempty"`
	Message          string            `json:"message,omitempty"`
	ValidationErrors []ValidationError `json:"validationErrors,omitempty"`
}

func (APIError) Error

func (a APIError) Error() string

type Client

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

Client the Mittwald client.

func NewClient

func NewClient(token string) *Client

NewClient Creates a new Client.

func (Client) CreateDNSZone

func (c Client) CreateDNSZone(ctx context.Context, zone CreateDNSZoneRequest) (*DNSZone, error)

CreateDNSZone Create a DNSZone. https://api.mittwald.de/v2/docs/#/Domain/dns-create-dns-zone

func (Client) DeleteDNSZone

func (c Client) DeleteDNSZone(ctx context.Context, zoneID string) error

DeleteDNSZone Delete a DNSZone. https://api.mittwald.de/v2/docs/#/Domain/dns-delete-dns-zone

func (Client) GetDNSZone

func (c Client) GetDNSZone(ctx context.Context, zoneID string) (*DNSZone, error)

GetDNSZone Get a DNSZone. https://api.mittwald.de/v2/docs/#/Domain/dns-get-dns-zone

func (Client) ListDNSZones

func (c Client) ListDNSZones(ctx context.Context, projectID string) ([]DNSZone, error)

ListDNSZones List DNSZones belonging to a Project. https://api.mittwald.de/v2/docs/#/Domain/dns-list-dns-zones

func (Client) ListDomains

func (c Client) ListDomains(ctx context.Context) ([]Domain, error)

ListDomains List Domains. https://api.mittwald.de/v2/docs/#/Domain/domain-list-domains

func (Client) UpdateTXTRecord

func (c Client) UpdateTXTRecord(ctx context.Context, zoneID string, record TXTRecord) error

UpdateTXTRecord Update a record set on a DNSZone. https://api.mittwald.de/v2/docs/#/Domain/dns-update-record-set

type CreateDNSZoneRequest

type CreateDNSZoneRequest struct {
	Name         string `json:"name,omitempty"`
	ParentZoneID string `json:"parentZoneId,omitempty"`
}

type DNSZone

type DNSZone struct {
	ID        string     `json:"id,omitempty"`
	Domain    string     `json:"domain,omitempty"`
	RecordSet *RecordSet `json:"recordSet,omitempty"`
}

type Domain

type Domain struct {
	Domain    string `json:"domain,omitempty"`
	DomainID  string `json:"domainId,omitempty"`
	ProjectID string `json:"projectId,omitempty"`
}

type NewDNSZone

type NewDNSZone struct {
	ID string `json:"id"`
}

type RecordSet

type RecordSet struct {
	TXT *TXTRecord `json:"txt"`
}

type Settings

type Settings struct {
	TTL TTL `json:"ttl"`
}

type TTL

type TTL struct {
	Seconds int  `json:"seconds,omitempty"`
	Auto    bool `json:"auto,omitempty"`
}

type TXTRecord

type TXTRecord struct {
	Settings Settings `json:"settings,omitempty"`
	Entries  []string `json:"entries,omitempty"`
}

type ValidationError

type ValidationError struct {
	Message string                 `json:"message,omitempty"`
	Path    string                 `json:"path,omitempty"`
	Type    string                 `json:"type,omitempty"`
	Context ValidationErrorContext `json:"context,omitempty"`
}

type ValidationErrorContext

type ValidationErrorContext struct {
	Format string `json:"format,omitempty"`
}

Jump to

Keyboard shortcuts

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