commandline

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const Bash = "bash"
View Source
const CredentialsAuth = "credentials"
View Source
const LoginAuth = "login"
View Source
const PatAuth = "pat"
View Source
const Powershell = "powershell"

Variables

This section is empty.

Functions

func BashrcPath added in v1.0.3

func BashrcPath() (string, error)

func PowershellProfilePath added in v1.0.3

func PowershellProfilePath() (string, error)

Types

type AutoCompleteHandler

type AutoCompleteHandler struct {
}

func (AutoCompleteHandler) EnableCompleter added in v1.0.3

func (a AutoCompleteHandler) EnableCompleter(shell string, filePath string) (string, error)

func (AutoCompleteHandler) Find

func (a AutoCompleteHandler) Find(commandText string, commands []*cli.Command, exclude []string) []string

type Cli

type Cli struct {
	StdIn          io.Reader
	StdOut         io.Writer
	StdErr         io.Writer
	ColoredOutput  bool
	Parser         parser.Parser
	ConfigProvider config.ConfigProvider
	Executor       executor.Executor
	PluginExecutor executor.Executor
	CommandPlugins []plugin.CommandPlugin
}

func (Cli) Run

func (c Cli) Run(args []string, configData []byte, definitionData []DefinitionData, input []byte) error

type CommandBuilder

type CommandBuilder struct {
	Input          []byte
	StdIn          io.Reader
	StdOut         io.Writer
	ConfigProvider config.ConfigProvider
	Executor       executor.Executor
	PluginExecutor executor.Executor
}

func (CommandBuilder) Create

func (b CommandBuilder) Create(definitions []parser.Definition) []*cli.Command

func (CommandBuilder) CreateDefaultFlags

func (b CommandBuilder) CreateDefaultFlags(hidden bool) []cli.Flag

func (CommandBuilder) HelpFlag

func (b CommandBuilder) HelpFlag() cli.Flag

type ConfigCommandHandler

type ConfigCommandHandler struct {
	StdIn          io.Reader
	StdOut         io.Writer
	ConfigProvider config.ConfigProvider
}

func (ConfigCommandHandler) Configure

func (h ConfigCommandHandler) Configure(auth string, profileName string) error

type DefinitionData

type DefinitionData struct {
	Name string
	Data []byte
}

func NewDefinitionData

func NewDefinitionData(name string, data []byte) *DefinitionData

type TypeConverter

type TypeConverter struct{}

func (TypeConverter) Convert

func (c TypeConverter) Convert(value string, parameter parser.Parameter) (interface{}, error)

type UriBuilder added in v1.0.5

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

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

Jump to

Keyboard shortcuts

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