rwthdns

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ApiBase = "https://noc-portal.rz.rwth-aachen.de/dns-admin/api/v1/"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ApiToken string
	Client   *http.Client
	Log      *logr.Logger
}

func (*Client) CreateRecord

func (c *Client) CreateRecord(content string) (Record, error)

func (*Client) DeployZone

func (c *Client) DeployZone(zone int) (Zone, error)

func (*Client) DestroyRecord

func (c *Client) DestroyRecord(record int) (Record, error)

func (*Client) ListRecords

func (c *Client) ListRecords(zone *int, search *string) ([]Record, error)

func (*Client) ListZones

func (c *Client) ListZones(search *string) ([]Zone, error)

func (*Client) RestoreRecord

func (c *Client) RestoreRecord(record int) (Record, error)

func (*Client) UpdateRecord

func (c *Client) UpdateRecord(record int, content string) (Record, error)

type Dnssec

type Dnssec struct {
	ZoneSigningKey struct {
		CreatedAt time.Time `json:"created_at"`
	} `json:"zone_signing_key"`
	KeySigningKey struct {
		CreatedAt time.Time `json:"created_at"`
	} `json:"key_signing_key"`
}

type Record

type Record struct {
	Id        int       `json:"id"`
	ZoneId    int       `json:"zone_id"`
	Type      string    `json:"type"`
	Content   string    `json:"content"`
	Status    string    `json:"status"`
	UpdatedAt time.Time `json:"updated_at"`
	Editable  bool      `json:"editable"`
}

type Zone

type Zone struct {
	Id         int         `json:"id"`
	ZoneName   string      `json:"zone_name"`
	Status     string      `json:"status"`
	UpdatedAt  time.Time   `json:"updated_at"`
	LastDeploy time.Time   `json:"last_deploy"`
	Dnssec     interface{} `json:"dnssec"`
}

Jump to

Keyboard shortcuts

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