Documentation ¶
Index ¶
- func ConvertApp(jfrogApp App) (*cli.App, error)
- func ConvertAppCommands(jfrogApp App, commandPrefix ...string) (cmds []cli.Command, err error)
- type ActionFunc
- type App
- type Argument
- type BaseFlag
- type BoolFlag
- type BoolFlagOption
- type Command
- type Context
- type EnvVar
- type Flag
- type Namespace
- type PluginSignature
- type StringFlag
- type StringFlagOption
- type UsageOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionFunc ¶
type Argument ¶
type Argument struct { Name string // Is this argument optional? If so, the 'Optional' field should be set to true. // This field is used for creating help usages, for instance if argument is: // Argument { // Name: "optional-arg", // Optional: true, // } // The help usage that will be created will be: // // Usage: // 1) cmd-name [cmd options] [optional-arg] // // Else, if the argument is mandatory ( Argument { Name: "mandatory-arg" } ), the help usage will be: // // Usage: // 1) cmd-name [cmd options] <mandatory-arg> Optional bool // Is this argument optional and can be replaced with a flag? // If so, the 'Optional' field should be set to true and the 'ReplaceWithFlag' field should be set to the flag name. // This field is used for creating help usages, for instance if argument is: // Argument { // Name: "optional-arg", // Optional: true, // ReplaceWithFlag: "flag-replacement", // } // The help usage that will be created will be: // // Usage: // 1) cmd-name [cmd options] [optional-arg] // 2) cmd-name [cmd options] --flag-replacement=value ReplaceWithFlag string Description string }
type BaseFlag ¶ added in v2.47.10
func (BaseFlag) GetDescription ¶ added in v2.47.10
func (BaseFlag) IsMandatory ¶ added in v2.47.10
type BoolFlag ¶
func NewBoolFlag ¶ added in v2.47.10
func NewBoolFlag(name, description string, options ...BoolFlagOption) BoolFlag
func (BoolFlag) GetDefault ¶
type BoolFlagOption ¶ added in v2.47.10
type BoolFlagOption func(f *BoolFlag)
func SetHiddenBoolFlag ¶ added in v2.47.10
func SetHiddenBoolFlag() BoolFlagOption
func WithBoolDefaultValue ¶ added in v2.47.10
func WithBoolDefaultValue(defaultValue bool) BoolFlagOption
type Context ¶
type Context struct { Arguments []string CommandName string PrintCommandHelp func(commandName string) error // contains filtered or unexported fields }
func ConvertContext ¶ added in v2.47.11
func (*Context) AddStringFlag ¶ added in v2.57.2
func (*Context) GetBoolFlagValue ¶
func (*Context) GetIntFlagValue ¶ added in v2.47.10
func (*Context) GetStringFlagValue ¶
type PluginSignature ¶
type StringFlag ¶
type StringFlag struct { BaseFlag Mandatory bool // A flag with default value cannot be mandatory. DefaultValue string // Optional. If provided, this field will be used for help usage. --<Name>=<HelpValue> else: --<Name>=<value> HelpValue string }
func NewStringFlag ¶ added in v2.47.10
func NewStringFlag(name, description string, options ...StringFlagOption) StringFlag
func (StringFlag) GetDefault ¶
func (f StringFlag) GetDefault() string
func (StringFlag) IsMandatory ¶ added in v2.47.10
func (f StringFlag) IsMandatory() bool
type StringFlagOption ¶ added in v2.47.10
type StringFlagOption func(f *StringFlag)
func SetHiddenStrFlag ¶ added in v2.47.10
func SetHiddenStrFlag() StringFlagOption
func SetMandatory ¶ added in v2.47.10
func SetMandatory() StringFlagOption
func WithHelpValue ¶ added in v2.47.10
func WithHelpValue(helpValue string) StringFlagOption
func WithIntDefaultValue ¶ added in v2.47.10
func WithIntDefaultValue(defaultValue int) StringFlagOption
func WithStrDefaultValue ¶ added in v2.47.10
func WithStrDefaultValue(defaultValue string) StringFlagOption
type UsageOptions ¶ added in v2.47.10
type UsageOptions struct { // Special cases, each of these will be created as command usage option and the value appended as suffix for the command name. Usage []string // If true then the given usages will replace the auto generated usage. Otherwise the given usages will be appended to the auto generated usage. ReplaceAutoGeneratedUsage bool }
Click to show internal directories.
Click to hide internal directories.