Documentation ¶
Overview ¶
Package commandline is responsible for creating, parsing and validating command line arguments.
Index ¶
Constants ¶
const Bash = "bash"
const CredentialsAuth = "credentials"
const DefinitionsDirectory = "definitions"
const FromStdIn = "-"
const LoginAuth = "login"
const PatAuth = "pat"
const Powershell = "powershell"
Variables ¶
This section is empty.
Functions ¶
func PowershellProfilePath ¶ added in v1.0.3
Returns powershell profile path on linux
Types ¶
type Cli ¶
type Cli struct {
// contains filtered or unexported fields
}
Cli is a wrapper for building the CLI commands.
type CommandBuilder ¶
type CommandBuilder struct { Input utils.Stream StdIn io.Reader StdOut io.Writer StdErr io.Writer ConfigProvider config.ConfigProvider Executor executor.Executor PluginExecutor executor.Executor DefinitionProvider DefinitionProvider }
The CommandBuilder is creating all available operations and arguments for the CLI.
func (CommandBuilder) Create ¶
func (b CommandBuilder) Create(args []string) ([]*cli.Command, error)
func (CommandBuilder) CreateDefaultFlags ¶
func (b CommandBuilder) CreateDefaultFlags(hidden bool) []cli.Flag
func (CommandBuilder) HelpFlag ¶
func (b CommandBuilder) HelpFlag() cli.Flag
func (CommandBuilder) VersionFlag ¶ added in v1.0.76
func (b CommandBuilder) VersionFlag(hidden bool) cli.Flag
type ConfigCommandHandler ¶
type ConfigCommandHandler struct { StdIn io.Reader StdOut io.Writer ConfigProvider config.ConfigProvider }
The ConfigCommandHandler implements commands for configuring the CLI. The CLI can be configured interactively or by setting config values programmatically.
Example: uipath config ==> interactive configuration of the CLI uipath config set ==> stores a value in the configuration file
type DefinitionData ¶
DefinitionData contains the name of the definition file and its data.
func NewDefinitionData ¶
func NewDefinitionData(name string, version string, data []byte) *DefinitionData
type DefinitionFileStore ¶ added in v1.0.57
type DefinitionFileStore struct {
// contains filtered or unexported fields
}
DefinitionFileStore discovers the definition files from disk searching for the definitions/ folder and returns the data for a particular definition file.
func NewDefinitionFileStore ¶ added in v1.0.57
func NewDefinitionFileStore(directory string, embedded embed.FS) *DefinitionFileStore
func NewDefinitionFileStoreWithData ¶ added in v1.0.57
func NewDefinitionFileStoreWithData(data []DefinitionData) *DefinitionFileStore
func (*DefinitionFileStore) Names ¶ added in v1.0.57
func (s *DefinitionFileStore) Names(version string) ([]string, error)
func (*DefinitionFileStore) Read ¶ added in v1.0.57
func (s *DefinitionFileStore) Read(name string, version string) (*DefinitionData, error)
type DefinitionProvider ¶ added in v1.0.17
type DefinitionProvider struct {
// contains filtered or unexported fields
}
The DefinitionProvider uses the store to read the definition files. It parses the definition files and also supports merging multiple files for the same service.
The following mapping is performed between the files on disk and the commands the CLI provides: orchestrator.yaml => uipath orchestrator ... du.metering.yaml => uipath du ... du.events.yaml => uipath du ...
For performance reasons, the definition provider always just loads the definition files belonging to a single service. There is no need to load the definition file for the du service when the user executes 'uipath orchestrator', for example.
func NewDefinitionProvider ¶ added in v1.0.57
func NewDefinitionProvider(store DefinitionStore, parser parser.Parser, commandPlugins []plugin.CommandPlugin) *DefinitionProvider
func (DefinitionProvider) Index ¶ added in v1.0.17
func (p DefinitionProvider) Index(version string) ([]parser.Definition, error)
func (DefinitionProvider) Load ¶ added in v1.0.17
func (p DefinitionProvider) Load(name string, version string) (*parser.Definition, error)
type DefinitionStore ¶ added in v1.0.17
type DefinitionStore interface { Names(version string) ([]string, error) Read(name string, version string) (*DefinitionData, error) }
DefinitionStore is used to provide the names and content of definition files.
type UriBuilder ¶ added in v1.0.5
type UriBuilder struct {
// contains filtered or unexported fields
}
UriBuilder merges parts of the uri so that they can be overridden from multiple sources, like environment variables, config files or command line arguments.
func NewUriBuilder ¶ added in v1.0.5
func NewUriBuilder(uri url.URL) *UriBuilder
func (*UriBuilder) OverrideUri ¶ added in v1.0.5
func (b *UriBuilder) OverrideUri(overrideUri *url.URL)
func (UriBuilder) Uri ¶ added in v1.0.5
func (b UriBuilder) Uri() url.URL
Source Files ¶
- autocomplete_folder_notwin.go
- autocomplete_handler.go
- cli.go
- command_builder.go
- config_command_handler.go
- definition_data.go
- definition_file_store.go
- definition_provider.go
- definition_store.go
- flag_builder.go
- multi_definition.go
- parameter_formatter.go
- show_command_handler.go
- type_converter.go
- uri_builder.go