commandline

package
v1.0.33 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const Bash = "bash"
View Source
const CredentialsAuth = "credentials"
View Source
const DefinitionsDirectory = "definitions"
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
	DefinitionProvider DefinitionProvider
	ConfigProvider     config.ConfigProvider
	Executor           executor.Executor
	PluginExecutor     executor.Executor
}

func (Cli) Run

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

type CommandBuilder

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

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

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 DefinitionProvider added in v1.0.17

type DefinitionProvider struct {
	DefinitionStore DefinitionStore
	Parser          parser.Parser
	CommandPlugins  []plugin.CommandPlugin
}

func (DefinitionProvider) Index added in v1.0.17

func (p DefinitionProvider) Index() ([]parser.Definition, error)

func (DefinitionProvider) Load added in v1.0.17

func (p DefinitionProvider) Load(name string) (*parser.Definition, error)

type DefinitionStore added in v1.0.17

type DefinitionStore struct {
	DefinitionDirectory string
	DefinitionFiles     []string
	Definitions         []DefinitionData
}

func (*DefinitionStore) Names added in v1.0.17

func (s *DefinitionStore) Names() ([]string, error)

func (*DefinitionStore) Read added in v1.0.17

func (s *DefinitionStore) Read(name string) (*DefinitionData, error)

type MultiDefinition added in v1.0.26

type MultiDefinition struct{}

func (MultiDefinition) Merge added in v1.0.26

func (d MultiDefinition) Merge(name string, definitions []*parser.Definition) *parser.Definition

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