internal

package
v4.21.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 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 Auth

type Auth struct {
	Login    string `json:"login,omitempty"`
	Password string `json:"password,omitempty"`
}

type Client

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

Client a Core-Networks client.

func NewClient

func NewClient(login, password string) *Client

NewClient creates a new Client.

func (Client) AddRecord

func (c Client) AddRecord(ctx context.Context, zone string, record Record) error

AddRecord adds a record. https://beta.api.core-networks.de/doc/#functon_dnszones_records_add

func (Client) CommitRecords

func (c Client) CommitRecords(ctx context.Context, zone string) error

CommitRecords sends a commit to the zone. https://beta.api.core-networks.de/doc/#functon_dnszones_commit

func (Client) CreateAuthenticatedContext

func (c Client) CreateAuthenticatedContext(ctx context.Context) (context.Context, error)

func (Client) CreateAuthenticationToken

func (c Client) CreateAuthenticationToken(ctx context.Context) (*Token, error)

CreateAuthenticationToken gets an authentication token. https://beta.api.core-networks.de/doc/#functon_auth_token

func (Client) DeleteRecords

func (c Client) DeleteRecords(ctx context.Context, zone string, record Record) error

DeleteRecords deletes all DNS records of a zone that match the DNS record passed. https://beta.api.core-networks.de/doc/#functon_dnszones_records_delete

func (Client) GetZoneDetails

func (c Client) GetZoneDetails(ctx context.Context, zone string) (*ZoneDetails, error)

GetZoneDetails provides detailed information about a DNS zone. https://beta.api.core-networks.de/doc/#functon_dnszones_details

func (Client) ListRecords

func (c Client) ListRecords(ctx context.Context, zone string) ([]Record, error)

ListRecords gets a list of DNS records belonging to the zone. https://beta.api.core-networks.de/doc/#functon_dnszones_records

func (Client) ListZone

func (c Client) ListZone(ctx context.Context) ([]Zone, error)

ListZone gets a list of all DNS zones. https://beta.api.core-networks.de/doc/#functon_dnszones

type Record

type Record struct {
	Name string `json:"name,omitempty"`
	TTL  int    `json:"ttl,omitempty"`
	Type string `json:"type,omitempty"`
	Data string `json:"data,omitempty"`
}

type TSIGKey

type TSIGKey struct {
	Algo   string `json:"algo,omitempty"`
	Secret string `json:"secret,omitempty"`
}

type Token

type Token struct {
	Token   string `json:"token,omitempty"`
	Expires int    `json:"expires,omitempty"`
}

type Zone

type Zone struct {
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
}

type ZoneDetails

type ZoneDetails struct {
	Active bool     `json:"active,omitempty"`
	DNSSec bool     `json:"dnssec,omitempty"`
	Master string   `json:"master,omitempty"`
	Name   string   `json:"name,omitempty"`
	TSIG   *TSIGKey `json:"tsig,omitempty"`
	Type   string   `json:"type,omitempty"`
}

Jump to

Keyboard shortcuts

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