cmd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

NOTE: Do not use t.Parallel() in cmd/ tests due to package-level state (verbose, passedArgValidation) that is mutated during test execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

func NewConfigureCommand

func NewConfigureCommand() *cobra.Command

NewConfigureCommand creates the configure command

func NewConfigureCommandWithDeps

func NewConfigureCommandWithDeps(saver profileSaver, tenantURL, username string) *cobra.Command

NewConfigureCommandWithDeps creates a configure command with injected dependencies for testing

func NewEnvCommand added in v0.2.0

func NewEnvCommand() *cobra.Command

NewEnvCommand creates the production env command.

func NewEnvCommandWithDeps added in v0.2.0

func NewEnvCommandWithDeps(
	profile *sdkmodels.IdsecProfile,
	authLoader authLoader,
	eligibilityLister eligibilityLister,
	elevateService elevateService,
	selector targetSelector,
	cfg *config.Config,
) *cobra.Command

NewEnvCommandWithDeps creates an env command with injected dependencies for testing.

func NewFavoritesCommand

func NewFavoritesCommand() *cobra.Command

NewFavoritesCommand creates the favorites parent command with subcommands

func NewFavoritesCommandWithAllDeps added in v0.3.0

func NewFavoritesCommandWithAllDeps(eligLister eligibilityLister, sel unifiedSelector, prompter namePrompter, groupsElig groupsEligibilityLister) *cobra.Command

NewFavoritesCommandWithAllDeps creates the favorites command with all injected dependencies including groups

func NewLoginCommand

func NewLoginCommand() *cobra.Command

NewLoginCommand creates the login command

func NewLoginCommandWithAuth

func NewLoginCommandWithAuth(auth authenticator) *cobra.Command

NewLoginCommandWithAuth creates a login command with a custom authenticator for testing

func NewLogoutCommand

func NewLogoutCommand() *cobra.Command

NewLogoutCommand creates the logout command

func NewLogoutCommandWithDeps added in v0.2.0

func NewLogoutCommandWithDeps(clearer keyringClearer) *cobra.Command

NewLogoutCommandWithDeps creates a logout command with injected dependencies for testing

func NewRevokeCommand added in v0.3.0

func NewRevokeCommand() *cobra.Command

NewRevokeCommand creates the production revoke command.

func NewRevokeCommandWithDeps added in v0.3.0

func NewRevokeCommandWithDeps(
	auth authLoader,
	lister sessionLister,
	elig eligibilityLister,
	revoker sessionRevoker,
	selector sessionSelector,
	confirmer confirmPrompter,
) *cobra.Command

NewRevokeCommandWithDeps creates a revoke command with injected dependencies for testing.

func NewRootCommandWithDeps

func NewRootCommandWithDeps(
	profile *sdkmodels.IdsecProfile,
	authLoader authLoader,
	eligibilityLister eligibilityLister,
	elevateService elevateService,
	selector unifiedSelector,
	groupsEligLister groupsEligibilityLister,
	groupsElevator groupsElevator,
	cfg *config.Config,
) *cobra.Command

NewRootCommandWithDeps creates a root command with injected dependencies for testing. It accepts a pre-loaded profile to avoid filesystem access during tests.

func NewStatusCommand

func NewStatusCommand() *cobra.Command

NewStatusCommand creates the production status command.

func NewStatusCommandWithDeps

func NewStatusCommandWithDeps(authLoader authLoader, sessionLister sessionLister, eligLister eligibilityLister) *cobra.Command

NewStatusCommandWithDeps creates a status command with injected dependencies for testing.

func NewUpdateCommand added in v0.4.0

func NewUpdateCommand() *cobra.Command

NewUpdateCommand creates the update command with production dependencies

func NewUpdateCommandWithDeps added in v0.4.0

func NewUpdateCommandWithDeps(updater selfUpdater) *cobra.Command

NewUpdateCommandWithDeps creates the update command with injected dependencies

func NewVersionCommand

func NewVersionCommand() *cobra.Command

NewVersionCommand creates the version command

Types

This section is empty.

Jump to

Keyboard shortcuts

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