Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
Source Files
¶
- access.go
- accounts.go
- agentmemory.go
- ai.go
- aisearch.go
- analytics.go
- api.go
- api_exec.go
- api_gen.go
- api_smoke.go
- artifacts.go
- auditlogs.go
- auth.go
- autorenew.go
- basin.go
- billing.go
- browser.go
- cache.go
- cert.go
- completion.go
- containers.go
- d1.go
- d1_migrations.go
- dispatch.go
- dns.go
- docs.go
- domains.go
- email.go
- firewall.go
- flagship.go
- graphql.go
- healthchecks.go
- helpers.go
- hyperdrive.go
- init.go
- k2.go
- kv.go
- lb.go
- lists.go
- logpush.go
- notifications.go
- pagerules.go
- pages.go
- pages_deploy.go
- pages_tail.go
- platform_kit.go
- queues.go
- queues_common.go
- r2.go
- r2_common.go
- r2_config.go
- r2_objects.go
- r2_s3.go
- r2_usage.go
- records.go
- redirects.go
- root.go
- rulesets.go
- secretsstore.go
- settings.go
- settings_kit.go
- spectrum.go
- ssl.go
- tail.go
- tokens.go
- transform.go
- tunnel.go
- turnstile.go
- user.go
- vectorize.go
- vpc.go
- waf.go
- waitingrooms.go
- whoami.go
- workers.go
- workers_deploy.go
- workers_logs.go
- workers_preview.go
- workers_secret.go
- workers_triggers.go
- workers_versions.go
- workflows.go
- zones.go