Documentation
¶
Index ¶
- func RenderError(err error, jsonOutput bool) string
- func RenderHuman(as []domain.EligibleAssignment, verbose bool) string
- func RenderJSON(as []domain.EligibleAssignment) string
- func RenderStatusHuman(as []domain.ActiveAssignment, verbose bool) string
- func RenderStatusJSON(as []domain.ActiveAssignment) string
- type ActivateCmd
- type CLI
- type CompletionCmd
- type DeactivateCmd
- type ListCmd
- type Runner
- type Services
- type StatusCmd
- type Streams
- type VersionCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderError ¶
func RenderHuman ¶
func RenderHuman(as []domain.EligibleAssignment, verbose bool) string
func RenderJSON ¶
func RenderJSON(as []domain.EligibleAssignment) string
func RenderStatusHuman ¶
func RenderStatusHuman(as []domain.ActiveAssignment, verbose bool) string
func RenderStatusJSON ¶
func RenderStatusJSON(as []domain.ActiveAssignment) string
Types ¶
type ActivateCmd ¶
type ActivateCmd struct {
Scope string `help:"Azure resource scope ID (exact)"`
Subscription string `help:"Subscription ID or exact name"`
ResourceGroup string `help:"Resource group name (requires --subscription)"`
Role string `help:"Role display name or definition ID"`
Reason string `help:"Justification for the activation"`
Duration time.Duration `help:"How long the role stays active (default from config)"`
JSON bool `help:"Output as JSON"`
}
type CLI ¶
type CLI struct {
Verbose bool `short:"v" help:"Enable debug logging to stderr"`
ConfigPath string `name:"config" help:"Path to config file"`
List ListCmd `cmd:"" help:"List eligible PIM role assignments"`
Status StatusCmd `cmd:"" help:"List active PIM role assignments"`
Activate ActivateCmd `cmd:"" help:"Activate an eligible PIM role assignment"`
Deactivate DeactivateCmd `cmd:"" help:"Deactivate an active PIM role assignment"`
Completion CompletionCmd `cmd:"" help:"Generate shell completion script"`
Version VersionCmd `cmd:"" help:"Show version information"`
}
type CompletionCmd ¶
type CompletionCmd struct {
Shell string `arg:"" required:"" help:"Shell to generate completions for (bash, zsh, fish, powershell)"`
}
func (*CompletionCmd) Run ¶
func (c *CompletionCmd) Run(streams *Streams) error
type DeactivateCmd ¶ added in v0.2.0
type ListCmd ¶
type Services ¶
type Services struct {
List func(*slog.Logger) (*app.ListService, error)
Status func(*slog.Logger) (*app.StatusService, error)
Activate func(*slog.Logger) (*app.ActivationService, error)
Deactivate func(*slog.Logger) (*app.DeactivationService, error)
}
type StatusCmd ¶
type VersionCmd ¶
type VersionCmd struct{}
func (*VersionCmd) Run ¶
func (c *VersionCmd) Run(streams *Streams) error
Click to show internal directories.
Click to hide internal directories.