records

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeleteCmd = &cobra.Command{
	Use:   "delete <domain>",
	Short: "Delete DNS records",
	Long:  `This endpoint deletes DNS zone records for a specific domain, filtered by record name and type.`,
	Args:  cobra.MatchAll(cobra.ExactArgs(1)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().DNSDeleteDNSRecordsV1WithResponse(context.TODO(), args[0], zoneDeleteRequest(cmd))
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}
View Source
var GroupCmd = &cobra.Command{
	Use:   "records",
	Short: "DNS zone record management",
	Long:  ``,
}
View Source
var ListCmd = &cobra.Command{
	Use:   "list <domain>",
	Short: "Get DNS records",
	Long:  `This endpoint retrieves DNS zone records for a specific domain.`,
	Args:  cobra.MatchAll(cobra.ExactArgs(1)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().DNSGetDNSRecordsV1WithResponse(context.TODO(), args[0])
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}
View Source
var ResetCmd = &cobra.Command{
	Use:   "reset <domain>",
	Short: "Reset DNS records",
	Long:  `This endpoint resets DNS zone records to the default state for a specific domain.`,
	Args:  cobra.MatchAll(cobra.ExactArgs(1)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().DNSResetDNSRecordsV1WithResponse(context.TODO(), args[0], zoneResetRequest(cmd))
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}
View Source
var UpdateCmd = &cobra.Command{
	Use:   "update <domain>",
	Short: "Update DNS records",
	Long: `This endpoint updates DNS records for the selected domain.

Using ` + "`overwrite = true`" + ` in the request will replace existing records matching the name and type with the provided
records. When ` + "`false`" + `, provided records are appended and existing records' TTLs are updated.`,
	Args: cobra.MatchAll(cobra.ExactArgs(1)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().DNSUpdateDNSRecordsV1WithResponse(context.TODO(), args[0], zoneUpdateRequest(cmd))
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}
View Source
var ValidateCmd = &cobra.Command{
	Use:   "validate <domain>",
	Short: "Validate DNS records",
	Long:  `This endpoint validates DNS records prior to updating them, without applying any changes.`,
	Args:  cobra.MatchAll(cobra.ExactArgs(1)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().DNSValidateDNSRecordsV1WithResponse(context.TODO(), args[0], zoneUpdateRequest(cmd))
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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