Documentation
¶
Overview ¶
Package cmd implements the grant CLI commands.
NOTE: Do not use t.Parallel() in cmd/ tests due to package-level state (verbose, passedArgValidation) that is mutated during test execution.
Index ¶
- func Execute()
- func NewConfigureCommand() *cobra.Command
- func NewConfigureCommandWithDeps(saver profileSaver, tenantURL, username string) *cobra.Command
- func NewEnvCommand() *cobra.Command
- func NewEnvCommandWithDeps(profile *sdkmodels.IdsecProfile, authLoader authLoader, ...) *cobra.Command
- func NewFavoritesCommand() *cobra.Command
- func NewFavoritesCommandWithAllDeps(eligLister eligibilityLister, sel unifiedSelector, prompter namePrompter, ...) *cobra.Command
- func NewListCommand() *cobra.Command
- func NewListCommandWithDeps(auth authLoader, eligLister eligibilityLister, ...) *cobra.Command
- func NewLoginCommand() *cobra.Command
- func NewLoginCommandWithAuth(auth authenticator) *cobra.Command
- func NewLogoutCommand() *cobra.Command
- func NewLogoutCommandWithDeps(clearer keyringClearer) *cobra.Command
- func NewRevokeCommand() *cobra.Command
- func NewRevokeCommandWithDeps(auth authLoader, lister sessionLister, elig eligibilityLister, ...) *cobra.Command
- func NewRootCommandWithDeps(profile *sdkmodels.IdsecProfile, authLoader authLoader, ...) *cobra.Command
- func NewStatusCommand() *cobra.Command
- func NewStatusCommandWithDeps(authLoader authLoader, sessionLister sessionLister, ...) *cobra.Command
- func NewUpdateCommand() *cobra.Command
- func NewUpdateCommandWithDeps(updater selfUpdater) *cobra.Command
- func NewVersionCommand() *cobra.Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfigureCommand ¶
NewConfigureCommand creates the configure command
func NewConfigureCommandWithDeps ¶
NewConfigureCommandWithDeps creates a configure command with injected dependencies for testing
func NewEnvCommand ¶ added in v0.2.0
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 ¶
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 NewListCommand ¶ added in v0.6.0
NewListCommand creates the production list command.
func NewListCommandWithDeps ¶ added in v0.6.0
func NewListCommandWithDeps(auth authLoader, eligLister eligibilityLister, groupsElig groupsEligibilityLister) *cobra.Command
NewListCommandWithDeps creates a list command with injected dependencies for testing.
func NewLoginCommand ¶
NewLoginCommand creates the login command
func NewLoginCommandWithAuth ¶
NewLoginCommandWithAuth creates a login command with a custom authenticator for testing
func NewLogoutCommand ¶
NewLogoutCommand creates the logout command
func NewLogoutCommandWithDeps ¶ added in v0.2.0
NewLogoutCommandWithDeps creates a logout command with injected dependencies for testing
func NewRevokeCommand ¶ added in v0.3.0
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 ¶
NewStatusCommand creates the production status command.
func NewStatusCommandWithDeps ¶
func NewStatusCommandWithDeps( authLoader authLoader, sessionLister sessionLister, eligLister eligibilityLister, groupsEligLister groupsEligibilityLister, tracker *cache.Store, ) *cobra.Command
NewStatusCommandWithDeps creates a status command with injected dependencies for testing.
func NewUpdateCommand ¶ added in v0.4.0
NewUpdateCommand creates the update command with production dependencies
func NewUpdateCommandWithDeps ¶ added in v0.4.0
NewUpdateCommandWithDeps creates the update command with injected dependencies
func NewVersionCommand ¶
NewVersionCommand creates the version command
Types ¶
This section is empty.