cli

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompleteRecordIDs added in v0.4.0

func CompleteRecordIDs(_ *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective)

CompleteRecordIDs returns DNS record IDs for a zone already provided as args[0].

func CompleteRecordTypes added in v0.4.0

func CompleteRecordTypes(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective)

CompleteRecordTypes returns valid DNS record type values for --type flag completion.

func CompleteZoneNames

func CompleteZoneNames(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

CompleteZoneNames returns a list of zone names for shell completion.

func CompleteZoneThenRecordID added in v0.4.0

func CompleteZoneThenRecordID(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

CompleteZoneThenRecordID completes zone name for arg[0] and record ID for args[1].

func Execute

func Execute()

func NewLogger

func NewLogger(logPath string, debug bool) (*log.Logger, *os.File)

NewLogger creates a themed logger for file output.

Types

type CLI

type CLI struct {
	API    *cloudflare.API
	Logger *log.Logger
	Config *Config
}

CLI stores the shared state for CLI commands.

type Config

type Config struct {
	APIToken string
	Theme    string
	Format   string
	LogPath  string
	Debug    bool
	Mock     bool
}

Config stores application configuration.

Jump to

Keyboard shortcuts

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