cmd

package
v0.0.1-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:               "pimctl",
	Short:             "CLI to manage Azure PIM roles and assignments",
	Long:              "A CLI tool to manage Azure Privileged Identity Management (PIM) roles and assignments",
	Version:           fmt.Sprintf("%s (%s)", build.Version, build.Date),
	DisableAutoGenTag: true,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		command := getCommand(cmd.CommandPath())
		switch command {
		case "login", "account clear", "account show":
			return nil
		}

		if !isLoggedIn(cmd.Context()) {
			return fmt.Errorf("not logged in, run 'login' to continue")
		}

		return nil
	},
}

Functions

func Execute

func Execute()

Types

This section is empty.

Jump to

Keyboard shortcuts

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