Documentation
¶
Index ¶
- Constants
- func CreateGlobalFlagSet() *pflag.FlagSet
- func ExecuteWithAutoInstall(ctx context.Context, rootContainer *ioc.NestedContainer) error
- func NewRootCmd(staticHelp bool, middlewareChain []*actions.MiddlewareRegistration, ...) *cobra.Command
- func ParseGlobalFlags(args []string, opts *internal.GlobalCommandOptions) error
- type ArmClientInitializer
- type Asker
- type BuildResult
- type CmdAnnotations
- type CmdCalledAs
- type CobraBuilder
- type CredentialProviderFn
- type PackageResult
- type RestoreResult
Constants ¶
const TelemetryCommandFlag = "telemetry"
const TelemetryUploadCommandFlag = "upload"
Variables ¶
This section is empty.
Functions ¶
func CreateGlobalFlagSet ¶
CreateGlobalFlagSet creates a new flag set with all global flags defined. This is the single source of truth for global flag definitions.
func ExecuteWithAutoInstall ¶
func ExecuteWithAutoInstall(ctx context.Context, rootContainer *ioc.NestedContainer) error
ExecuteWithAutoInstall executes the command and handles auto-installation of extensions for unknown commands.
func NewRootCmd ¶
func NewRootCmd( staticHelp bool, middlewareChain []*actions.MiddlewareRegistration, rootContainer *ioc.NestedContainer, ) *cobra.Command
Creates the root Cobra command for AZD. staticHelp - False, except for running for doc generation middlewareChain - nil, except for running unit tests rootContainer - The IoC container to use for registering and resolving dependencies. If nil is provided, a new container empty will be created.
func ParseGlobalFlags ¶
func ParseGlobalFlags(args []string, opts *internal.GlobalCommandOptions) error
ParseGlobalFlags parses global flags from the provided arguments and populates the GlobalCommandOptions. Uses ParseErrorsAllowlist to gracefully ignore unknown flags (like extension-specific flags). This function is designed to be called BEFORE Cobra command tree construction to enable early access to global flag values for auto-install and other pre-execution logic.
Types ¶
type ArmClientInitializer ¶
type ArmClientInitializer[T comparable] func( subscriptionId string, credentials azcore.TokenCredential, armClientOptions *arm.ClientOptions, ) (T, error)
ArmClientInitializer is a function definition for all Azure SDK ARM Client
type BuildResult ¶
type BuildResult struct {
Timestamp time.Time `json:"timestamp"`
Services map[string]*project.ServiceBuildResult `json:"services"`
}
type CmdCalledAs ¶
type CmdCalledAs string
CmdCalledAs provides access to the cmd.CalledAs() value through dependency injection
type CobraBuilder ¶
type CobraBuilder struct {
// contains filtered or unexported fields
}
CobraBuilder manages the construction of the cobra command tree from nested ActionDescriptors
func NewCobraBuilder ¶
func NewCobraBuilder(container *ioc.NestedContainer) *CobraBuilder
Creates a new instance of the Cobra builder
func (*CobraBuilder) BuildCommand ¶
func (cb *CobraBuilder) BuildCommand(descriptor *actions.ActionDescriptor) (*cobra.Command, error)
Builds a cobra Command for the specified action descriptor
type CredentialProviderFn ¶
type CredentialProviderFn func(context.Context, *auth.CredentialForCurrentUserOptions) (azcore.TokenCredential, error)
type PackageResult ¶
type PackageResult struct {
Timestamp time.Time `json:"timestamp"`
Services map[string]*project.ServicePackageResult `json:"services"`
}
type RestoreResult ¶
type RestoreResult struct {
Timestamp time.Time `json:"timestamp"`
Services map[string]*project.ServiceRestoreResult `json:"services"`
}
Source Files
¶
- auth.go
- auth_login.go
- auth_logout.go
- auth_status.go
- auth_token.go
- auto_install.go
- build.go
- cmd_help.go
- cobra_builder.go
- completion.go
- config.go
- container.go
- deps.go
- down.go
- env.go
- extension.go
- extensions.go
- github_copilot_registration_stub.go
- hooks.go
- infra.go
- infra_create.go
- infra_delete.go
- infra_generate.go
- init.go
- mcp.go
- monitor.go
- package.go
- pipeline.go
- restore.go
- root.go
- telemetry.go
- templates.go
- up.go
- util.go
- version.go
- vs_server.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package actions contains the application logic that handles azd CLI commands.
|
Package actions contains the application logic that handles azd CLI commands. |