internal

package
v4.14.5 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: MIT Imports: 12 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 {
	Message string `json:"error"`
	Detail  string `json:"detail"`
}

func (*APIError) Error

func (a *APIError) Error() string

type APIResponse

type APIResponse struct {
	Message string `json:"message,omitempty"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client the ManageEngine CloudDNS API client.

func NewClient

func NewClient(ctx context.Context, clientID, clientSecret string) *Client

NewClient creates a new Client.

func (*Client) CreateZoneRecord

func (c *Client) CreateZoneRecord(ctx context.Context, zoneID int, record ZoneRecord) error

CreateZoneRecord creates a "zone record". https://pitstop.manageengine.com/portal/en/kb/articles/manageengine-clouddns-rest-api-documentation#POST_Create_10

func (*Client) DeleteZoneRecord

func (c *Client) DeleteZoneRecord(ctx context.Context, zoneID int, domainID int) error

DeleteZoneRecord deletes a "zone record". https://pitstop.manageengine.com/portal/en/kb/articles/manageengine-clouddns-rest-api-documentation#DEL_Delete_10

func (*Client) GetAllZoneRecords

func (c *Client) GetAllZoneRecords(ctx context.Context, zoneID int) ([]ZoneRecord, error)

GetAllZoneRecords gets all "zone records" for a zone. https://pitstop.manageengine.com/portal/en/kb/articles/manageengine-clouddns-rest-api-documentation#GET_All_9

func (*Client) UpdateZoneRecord

func (c *Client) UpdateZoneRecord(ctx context.Context, record ZoneRecord) error

UpdateZoneRecord update an existing "zone record". https://pitstop.manageengine.com/portal/en/kb/articles/manageengine-clouddns-rest-api-documentation#PUT_Update_10

type Record

type Record struct {
	ID       int      `json:"record_id,omitempty"`
	Values   []string `json:"value,omitempty"`
	Disabled bool     `json:"disabled,omitempty"`
	DomainID int      `json:"domain_id,omitempty"`
}

type Zone

type Zone struct {
	ZoneID        int      `json:"zone_id"`
	ZoneName      string   `json:"zone_name"`
	ZoneTTL       int      `json:"zone_ttl"`
	ZoneType      int      `json:"zone_type,omitempty"`
	ZoneTargeting bool     `json:"zone_targeting"`
	Refresh       int      `json:"refresh"`
	Retry         int      `json:"retry"`
	Expiry        int      `json:"expiry"`
	Minimum       int      `json:"minimum"`
	Org           int      `json:"org"`
	AnyQuery      bool     `json:"any_query"`
	Vanity        bool     `json:"vanity,omitempty"`
	NsID          int      `json:"ns_id"`
	Serial        int      `json:"serial"`
	Nss           []string `json:"ns"`
}

type ZoneRecord

type ZoneRecord struct {
	ZoneID           int      `json:"zone_id,omitempty"`
	SpfTxtDomainID   int      `json:"spf_txt_domain_id,omitempty"`
	DomainName       string   `json:"domain_name,omitempty"`
	DomainTTL        int      `json:"domain_ttl,omitempty"`
	DomainLocationID int      `json:"domain_location_id,omitempty"`
	RecordType       string   `json:"record_type,omitempty"`
	Records          []Record `json:"records"`
}

Jump to

Keyboard shortcuts

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