components

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertApp

func ConvertApp(jfrogApp App) (*cli.App, error)

Types

type ActionFunc

type ActionFunc func(c *Context) error

type App

type App struct {
	Name        string
	Description string
	Version     string
	Commands    []Command
}

type Argument

type Argument struct {
	Name        string
	Description string
}

type BoolFlag

type BoolFlag struct {
	Name         string
	Description  string
	DefaultValue bool
}

func (BoolFlag) GetDefault

func (f BoolFlag) GetDefault() bool

func (BoolFlag) GetDescription

func (f BoolFlag) GetDescription() string

func (BoolFlag) GetName

func (f BoolFlag) GetName() string

type Command

type Command struct {
	Name            string
	Description     string
	Aliases         []string
	Arguments       []Argument
	Flags           []Flag
	EnvVars         []EnvVar
	Action          ActionFunc
	SkipFlagParsing bool
}

type Context

type Context struct {
	Arguments []string
	// contains filtered or unexported fields
}

func (*Context) GetBoolFlagValue

func (c *Context) GetBoolFlagValue(flagName string) bool

func (*Context) GetStringFlagValue

func (c *Context) GetStringFlagValue(flagName string) string

type EnvVar

type EnvVar struct {
	Name        string
	Default     string
	Description string
}

type Flag

type Flag interface {
	GetName() string
	GetDescription() string
}

type PluginSignature

type PluginSignature struct {
	Name  string `json:"name,omitempty"`
	Usage string `json:"usage,omitempty"`
	// Only used internally in the CLI.
	ExecutablePath string `json:"executablePath,omitempty"`
}

type StringFlag

type StringFlag struct {
	Name        string
	Description string
	// A flag with default value cannot be mandatory.
	DefaultValue string
	Mandatory    bool
}

func (StringFlag) GetDefault

func (f StringFlag) GetDefault() string

func (StringFlag) GetDescription

func (f StringFlag) GetDescription() string

func (StringFlag) GetName

func (f StringFlag) GetName() string

Jump to

Keyboard shortcuts

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