Documentation
¶
Index ¶
- Constants
- func Execute()
- func GetAgentMode() bool
- func GetChunkSize() int64
- func GetPlainMode() bool
- func LoadConfig() (*config.Config, error)
- func NewClientFromConfig(cfg *config.Config) (*client.Client, error)
- func NewDQLExecutorFromConfig(cfg *config.Config, c *client.Client) *exec.DQLExecutor
- func NewPrinter() output.Printer
- func NewSafetyChecker(cfg *config.Config) (*safety.Checker, error)
- func Setup() (*config.Config, *client.Client, output.Printer, error)
- func SetupClient() (*config.Config, *client.Client, error)
- func SetupWithSafety(op safety.Operation) (*config.Config, *client.Client, error)
- type ContextListItem
- type DocumentTypeCount
- type SessionStatus
- type WhoamiResult
Constants ¶
const ( ExitCodeNoDiff = 0 ExitCodeHasDiff = 1 ExitCodeError = 2 )
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately.
func GetAgentMode ¶ added in v0.14.0
func GetAgentMode() bool
GetAgentMode returns the current agent mode setting
func GetChunkSize ¶
func GetChunkSize() int64
GetChunkSize returns the current chunk size setting for pagination
func LoadConfig ¶
LoadConfig loads the config and applies the --context flag override if provided
func NewClientFromConfig ¶
NewClientFromConfig creates a new client from config with verbose mode configured
func NewDQLExecutorFromConfig ¶ added in v0.22.0
NewDQLExecutorFromConfig creates a DQL executor from a config and client, with OAuth token refresh support. When the OAuth token expires during a long-running query poll (which can exceed the 5-minute token lifetime), the executor automatically fetches a fresh token and retries without aborting the query.
func NewPrinter ¶
NewPrinter creates a new printer respecting agent and plain mode settings
func NewSafetyChecker ¶ added in v0.6.0
NewSafetyChecker creates a new safety checker for the current context
func Setup ¶ added in v0.22.0
Setup creates a Config, Client, and Printer for read-only commands. It consolidates the common LoadConfig → NewClientFromConfig → NewPrinter boilerplate.
func SetupClient ¶ added in v0.22.0
SetupClient creates a Config and Client without a Printer. Use this for commands that need the client but handle output differently (e.g., exec commands, log streaming, or commands with conditional printers).
func SetupWithSafety ¶ added in v0.22.0
SetupWithSafety creates a Config + Client for mutating commands, performing a safety check before the client is created. Use this for commands where ownership is unknown (i.e., the resource doesn't need to be fetched first to determine the owner). A Printer is not included because many mutating commands don't use one.
Types ¶
type ContextListItem ¶ added in v0.6.0
type ContextListItem struct {
Current string `table:"CURRENT"`
Name string `table:"NAME"`
Environment string `table:"ENVIRONMENT"`
SafetyLevel string `table:"SAFETY-LEVEL"`
Description string `table:"DESCRIPTION,wide"`
}
ContextListItem is a flattened view of a context for table display
type DocumentTypeCount ¶ added in v0.15.0
type DocumentTypeCount struct {
Type string `table:"TYPE" json:"type" yaml:"type"`
Count int `table:"COUNT" json:"count" yaml:"count"`
}
DocumentTypeCount holds a count per document type (for --types flag)
type SessionStatus ¶ added in v0.25.0
type SessionStatus struct {
Context string `json:"context" yaml:"context"`
Environment string `json:"environment" yaml:"environment"`
IsOAuth bool `json:"isOAuth" yaml:"isOAuth"`
Storage string `json:"storage,omitempty" yaml:"storage,omitempty"`
AccessTokenPresent bool `json:"accessTokenPresent" yaml:"accessTokenPresent"`
AccessTokenExpiresAt *time.Time `json:"accessTokenExpiresAt,omitempty" yaml:"accessTokenExpiresAt,omitempty"`
RefreshTokenPresent bool `json:"refreshTokenPresent" yaml:"refreshTokenPresent"`
RefreshTokenExpiresAt *time.Time `json:"refreshTokenExpiresAt,omitempty" yaml:"refreshTokenExpiresAt,omitempty"`
GrantedScopes []string `json:"grantedScopes,omitempty" yaml:"grantedScopes,omitempty"`
}
SessionStatus summarizes OAuth token state for display by `auth status` and `doctor`.
type WhoamiResult ¶
type WhoamiResult struct {
UserID string `json:"userId" yaml:"userId"`
UserName string `json:"userName,omitempty" yaml:"userName,omitempty"`
EmailAddress string `json:"emailAddress,omitempty" yaml:"emailAddress,omitempty"`
Context string `json:"context" yaml:"context"`
Environment string `json:"environment" yaml:"environment"`
}
WhoamiResult contains the current user information for output
Source Files
¶
- agent_helpers.go
- alias.go
- alias_resolve.go
- apply.go
- apply_extension_configs.go
- auth.go
- breakpoint_helpers.go
- breakpoint_output.go
- commands.go
- completion.go
- config.go
- create.go
- create_anomalydetector.go
- create_azure.go
- create_breakpoints.go
- create_buckets.go
- create_documents.go
- create_edgeconnects.go
- create_extensions.go
- create_gcp.go
- create_lookups.go
- create_providers.go
- create_segments.go
- create_settings.go
- create_slos.go
- create_workflows.go
- ctx.go
- delete.go
- delete_breakpoints.go
- delete_gcp.go
- describe.go
- describe_anomalydetector.go
- describe_apps.go
- describe_breakpoints.go
- describe_buckets.go
- describe_documents.go
- describe_edgeconnects.go
- describe_extension_configs.go
- describe_extensions.go
- describe_function.go
- describe_gcp.go
- describe_hub_extensions.go
- describe_iam.go
- describe_intent.go
- describe_lookups.go
- describe_segments.go
- describe_settings.go
- describe_slos.go
- describe_workflows.go
- diff.go
- doctor.go
- edit.go
- edit_anomalydetector.go
- edit_documents.go
- edit_segments.go
- edit_settings.go
- edit_workflows.go
- enable.go
- enable_azure.go
- enable_gcp.go
- enable_providers.go
- exec.go
- exec_analyzers.go
- exec_copilot.go
- exec_dql.go
- exec_functions.go
- exec_slos.go
- exec_workflows.go
- find.go
- find_intents.go
- get.go
- get_analyzers.go
- get_anomalydetector.go
- get_apps.go
- get_azure.go
- get_buckets.go
- get_documents.go
- get_edgeconnects.go
- get_extensions.go
- get_functions.go
- get_gcp.go
- get_hub_extensions.go
- get_iam.go
- get_intents.go
- get_lookups.go
- get_notifications.go
- get_providers.go
- get_segments.go
- get_settings.go
- get_slos.go
- get_wfe_task_result.go
- get_workflows.go
- help_topics.go
- history.go
- logs.go
- open.go
- open_intent.go
- preview_notice.go
- provider_placeholders.go
- query.go
- restore.go
- root.go
- share.go
- skills.go
- update.go
- update_azure.go
- update_breakpoints.go
- update_gcp.go
- update_providers.go
- verify.go
- verify_query.go
- version.go
- wait.go