Documentation ¶
Index ¶
- Variables
- func AllMatch(text string, cmd string) bool
- func BuildPromptKeyBinds() []prompt.KeyBind
- func ExecuteAndGetResult(program string, args string) (int, string)
- func Executor(program string, args string)
- func GetActiveCompleter() prompt.Completer
- func GetActiveExecutor() prompt.Executor
- func GetDefaultExecutor(env string, callback func()) prompt.Executor
- func GetPathSuggestion(path string) []prompt.Suggest
- func HelpInfo(args []string, out io.Writer)
- func IgnoreCaseMatch(text string, cmd string) bool
- func Initialize()
- func LivePrefix() (prefix string, useLivePrefix bool)
- func Logo(args []string, out io.Writer)
- func SelectCurrentEnvironment()
- func StartWithMatch(text string, cmd string) bool
- type Command
- type Environment
- type Register
- type Runtime
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultCommands []Command
default commands are valid in all environments
View Source
var Environments = map[Environment]*Runtime{}
View Source
var Registers = map[Environment]Register{}
Functions ¶
func BuildPromptKeyBinds ¶
func BuildPromptKeyBinds() []prompt.KeyBind
func GetDefaultExecutor ¶
func GetDefaultExecutor(env string, callback func()) prompt.Executor
func GetPathSuggestion ¶
func GetPathSuggestion(path string) []prompt.Suggest
func IgnoreCaseMatch ¶
func LivePrefix ¶
func StartWithMatch ¶
Types ¶
type Command ¶
type Environment ¶
type Environment string
const ( Kubernetes Environment = "Kubernetes" Docker Environment = "Docker" Rancher Environment = "Rancher" Istio Environment = "Istio" )
var ActiveEnvironment Environment
type Runtime ¶
type Runtime struct { Prefix string Completer prompt.Completer Executor prompt.Executor ExitChecker prompt.ExitChecker LivePrefix func() (prefix string, useLivePrefix bool) Commands []Command MainSuggestion []prompt.Suggest }
func GetKubernetes ¶
func GetKubernetes() *Runtime
func GetRancher ¶
func GetRancher() *Runtime
Click to show internal directories.
Click to hide internal directories.