cli

package
v0.0.0-...-187538d Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package cli the cobra commands for the command line interface.

Index

Constants

This section is empty.

Variables

View Source
var ErrCommandSilent = errors.New("command: silent error")

Functions

func Run

func Run(commandsInitializer azcli.CliInitializer)

Run the provisionier.

Types

type AccountCreateCommand

type AccountCreateCommand struct {
	// contains filtered or unexported fields
}

AccountCreateCommand is the command for creating an account.

func NewAccountCreateCommand

func NewAccountCreateCommand(v *viper.Viper) (*AccountCreateCommand, error)

NewAccountCreateCommand creates a new AccountCreateCommand.

func (*AccountCreateCommand) AddFlags

func (c *AccountCreateCommand) AddFlags(flagSet *flag.FlagSet) error

AddFlags adds the flags for the command.

func (*AccountCreateCommand) RegisterCommands

func (c *AccountCreateCommand) RegisterCommands(command *cobra.Command) error

RegisterCommands registers the command to the root command.

type AccountListCommand

type AccountListCommand struct {
	// contains filtered or unexported fields
}

AccountListCommand is the command for creating an account.

func NewAccountListCommand

func NewAccountListCommand(v *viper.Viper) (*AccountListCommand, error)

NewAccountListCommand lists a new AccountListCommand.

func (*AccountListCommand) AddFlags

func (c *AccountListCommand) AddFlags(flagSet *flag.FlagSet) error

AddFlags adds the flags for the command.

func (*AccountListCommand) RegisterCommands

func (c *AccountListCommand) RegisterCommands(command *cobra.Command) error

RegisterCommands registers the command to the root command.

type AccountsCommand

type AccountsCommand struct {
	// contains filtered or unexported fields
}

AccountsCommand is the command for managing accounts.

func NewAccountsCommand

func NewAccountsCommand(v *viper.Viper) (*AccountsCommand, error)

NewAccountsCommand creates a new AccountsCommand.

func (*AccountsCommand) AddFlags

func (c *AccountsCommand) AddFlags(flagSet *flag.FlagSet) error

AddFlags adds the flags for the command.

func (*AccountsCommand) RegisterCommands

func (c *AccountsCommand) RegisterCommands(command *cobra.Command) error

RegisterCommands registers the command to the root command.

type AuthNCommand

type AuthNCommand struct {
	// contains filtered or unexported fields
}

AuthNCommand is the command for managing authentication.

func NewAuthNCommand

func NewAuthNCommand(v *viper.Viper) (*AuthNCommand, error)

NewAuthNCommand creates a new AuthNCommand.

func (*AuthNCommand) AddFlags

func (c *AuthNCommand) AddFlags(flagSet *flag.FlagSet) error

AddFlags adds the flags for the command.

func (*AuthNCommand) RegisterCommands

func (c *AuthNCommand) RegisterCommands(command *cobra.Command) error

RegisterCommands registers the command to the root command.

type AuthZCommand

type AuthZCommand struct {
	// contains filtered or unexported fields
}

AuthZCommand is the command for managing authorization.

func NewAuthZCommand

func NewAuthZCommand(v *viper.Viper) (*AuthZCommand, error)

NewAuthZCommand creates a new AuthZCommand.

func (*AuthZCommand) AddFlags

func (c *AuthZCommand) AddFlags(flagSet *flag.FlagSet) error

AddFlags adds the flags for the command.

func (*AuthZCommand) RegisterCommands

func (c *AuthZCommand) RegisterCommands(command *cobra.Command) error

RegisterCommands registers the command to the root command.

type CliContext

type CliContext struct {
	// contains filtered or unexported fields
}

CliContext is the context for the CLI.

func NewCliContext

func NewCliContext(v *viper.Viper) (*CliContext, error)

NewCliContext creates a new CliContext.

func (*CliContext) GetAAPTarget

func (c *CliContext) GetAAPTarget() string

func (*CliContext) GetOutput

func (c *CliContext) GetOutput() string

GetOutput returns the output.

func (*CliContext) GetPAPTarget

func (c *CliContext) GetPAPTarget() string

func (*CliContext) GetViper

func (c *CliContext) GetViper() *viper.Viper

GetViper returns the viper.

func (*CliContext) IsJSONOutput

func (c *CliContext) IsJSONOutput() bool

IsJSONOutput returns true if the output is json.

func (*CliContext) IsTerminalOutput

func (c *CliContext) IsTerminalOutput() bool

IsTerminalOutput returns true if the output is json.

type CommunityCliInitializer

type CommunityCliInitializer struct{}

CommunityCliInitializer is the community cli initializer.

func NewCommunityCliInitializer

func NewCommunityCliInitializer() (*CommunityCliInitializer, error)

NewCommunityCliInitializer returns a new initializer.

func (*CommunityCliInitializer) GetCliInfo

func (s *CommunityCliInitializer) GetCliInfo() azcli.CliInfo

GetCliInfo returns the infos of the cli.

func (*CommunityCliInitializer) GetCommandRegisters

func (s *CommunityCliInitializer) GetCommandRegisters(v *viper.Viper) ([]azcli.CliCommandRegister, error)

GetCommandRegisters returns the command registers.

type ConfigCommand

type ConfigCommand struct {
	// contains filtered or unexported fields
}

ConfigCommand is the command for managing cli configurations.

func NewConfigCommand

func NewConfigCommand(v *viper.Viper) (*ConfigCommand, error)

NewConfigCommand creates a new ConfigCommand.

func (*ConfigCommand) AddFlags

func (c *ConfigCommand) AddFlags(flagSet *flag.FlagSet) error

AddFlags adds the flags for the command.

func (*ConfigCommand) RegisterCommands

func (c *ConfigCommand) RegisterCommands(command *cobra.Command) error

RegisterCommands registers the command to the root command.

type ConfigGetCommand

type ConfigGetCommand struct {
	// contains filtered or unexported fields
}

ConfigGetCommand is the command for managing configuration set.

func NewConfigGetCommand

func NewConfigGetCommand(v *viper.Viper) (*ConfigGetCommand, error)

NewConfigGetCommand creates a new ConfigGetCommand.

func (*ConfigGetCommand) AddFlags

func (c *ConfigGetCommand) AddFlags(flagSet *flag.FlagSet) error

AddFlags adds the flags for the command.

func (*ConfigGetCommand) RegisterCommands

func (c *ConfigGetCommand) RegisterCommands(command *cobra.Command) error

RegisterCommands registers the command to the root command.

type ConfigSetCommand

type ConfigSetCommand struct {
	// contains filtered or unexported fields
}

ConfigSetCommand is the command for managing configuration set.

func NewConfigSetCommand

func NewConfigSetCommand(v *viper.Viper) (*ConfigSetCommand, error)

NewConfigSetCommand creates a new ConfigSetCommand.

func (*ConfigSetCommand) AddFlags

func (c *ConfigSetCommand) AddFlags(flagSet *flag.FlagSet) error

AddFlags adds the flags for the command.

func (*ConfigSetCommand) RegisterCommands

func (c *ConfigSetCommand) RegisterCommands(command *cobra.Command) error

RegisterCommands registers the command to the root command.

Jump to

Keyboard shortcuts

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