cmd

package
v0.2.711 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 60 Imported by: 1 module, 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

This section is empty.

Functions

func BinName

func BinName() string

BinName returns the name this binary was invoked as.

func Execute

func Execute()

Execute runs the root command.

func SetDocsFS added in v0.2.710

func SetDocsFS(f fs.FS)

SetDocsFS registers the embedded documentation.

func SetVersion

func SetVersion(v string)

SetVersion sets the version shown by --version. Release builds may pass one in via -ldflags; otherwise it is internal/version.Version (e.g. 0.2.710).

Types

type AuthStatus

type AuthStatus struct {
	Authenticated bool   `json:"authenticated"`
	TokenSource   string `json:"token_source,omitempty"`
	TokenPath     string `json:"token_path"`
	ConfigPath    string `json:"config_path"`
	AccountID     string `json:"account_id,omitempty"`
	AccountName   string `json:"account_name,omitempty"`
	// TokenType is "user" or "account" ("" if unknown without --verify).
	TokenType string `json:"token_type,omitempty"`
	// Verified/TokenStatus are only set with --verify.
	Verified    *bool  `json:"verified,omitempty"`
	TokenStatus string `json:"token_status,omitempty"`
}

AuthStatus is what `auth status --json` prints. It never includes the token.

type AutoRenewStatus

type AutoRenewStatus struct {
	Domain    string `json:"domain"`
	State     string `json:"state,omitempty"`
	AutoRenew bool   `json:"auto_renew"`
	ExpiresAt string `json:"expires_at,omitempty"`
	Changed   *bool  `json:"changed,omitempty"`
	// Pending is set when Cloudflare accepted the change but is still applying it.
	Pending bool `json:"pending,omitempty"`
}

AutoRenewStatus is the result of an auto-renew query or change.

type LoginResult

type LoginResult struct {
	Authenticated bool   `json:"authenticated"`
	TokenID       string `json:"token_id"`
	TokenStatus   string `json:"token_status"`
	TokenType     string `json:"token_type"`
	AccountID     string `json:"account_id"`
	AccountName   string `json:"account_name"`
	TokenPath     string `json:"token_path"`
	ConfigPath    string `json:"config_path"`
}

LoginResult is what `auth login --json` prints. It never includes the token.

type Record

type Record struct {
	ID         string `json:"id"`
	Zone       string `json:"zone"`
	Type       string `json:"type"`
	Name       string `json:"name"`
	Content    string `json:"content"`
	TTL        int64  `json:"ttl"` // 1 = automatic
	Proxied    bool   `json:"proxied"`
	Proxiable  bool   `json:"proxiable"`
	Priority   *int64 `json:"priority,omitempty"`
	Comment    string `json:"comment,omitempty"`
	CreatedOn  string `json:"created_on,omitempty"`
	ModifiedOn string `json:"modified_on,omitempty"`
}

Record is cfctl's stable JSON shape for a DNS record.

type Whoami

type Whoami struct {
	Token struct {
		ID        string `json:"id"`
		Status    string `json:"status"`
		Type      string `json:"type"` // "user" or "account"
		ExpiresOn string `json:"expires_on,omitempty"`
	} `json:"token"`
	Account struct {
		ID   string `json:"id"`
		Name string `json:"name,omitempty"`
		Type string `json:"type,omitempty"`
	} `json:"account"`
	// User is only filled in if the token has User Details: Read.
	User *struct {
		ID    string `json:"id"`
		Email string `json:"email"`
	} `json:"user,omitempty"`
}

Whoami is the identity behind the current token.

Jump to

Keyboard shortcuts

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