Documentation ¶
Index ¶
- func NewCLI() cli.CLI
- func NewEnv() cli.Env
- func NewPrompt() cli.Prompt
- type CLI
- func (Cli *CLI) ChildCli(newPrompt string, currentEnv cli.Env) cli.CLI
- func (Cli *CLI) CommandList() []cli.Command
- func (Cli *CLI) ExecutionEngine(input cli.ArgList, env cli.Env) error
- func (Cli *CLI) GenerateNewEnv(a ...string) cli.Env
- func (Cli *CLI) HelloWorld()
- func (Cli *CLI) Init(cli.Env) error
- func (Cli *CLI) Loop() error
- func (Cli *CLI) ReadInput(cli.Env) cli.ArgList
- type Command
- func (C *Command) Aliases() []string
- func (C *Command) Description() string
- func (C *Command) Execute([]string) error
- func (C *Command) Flags() []string
- func (C *Command) Help() string
- func (C *Command) Match(input string) bool
- func (C *Command) Name() string
- func (C *Command) ReadFlags(inputargs []string) (res map[string][]string, err error)
- type Env
- func (E *Env) CommandsList() []cli.Command
- func (E *Env) Error(a ...string) error
- func (E *Env) FetchJSON(jsonFiles ...string) error
- func (E *Env) History() []string
- func (E *Env) Log(output string) error
- func (E *Env) Prompt() cli.Prompt
- func (E *Env) ScriptsList() []cli.Command
- func (E *Env) WrapError(s string, err error) error
- type JSONScriptCommand
- type Prompt
- type ScriptsList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
CLI object hold the core IO and execution functions
func (*CLI) CommandList ¶
func (*CLI) GenerateNewEnv ¶
GenerateNewEnv reads a {list} of file addresses to import commands
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command script is the one
func (*Command) Description ¶
Description returns a brief summary of the command's effect
type Env ¶
type Env struct {
// contains filtered or unexported fields
}
func (*Env) CommandsList ¶
CommandsList returns a list of all possible commands
func (*Env) ScriptsList ¶
type JSONScriptCommand ¶
type JSONScriptCommand struct { Name string `json:"Name"` Aliases []string `json:"Aliases"` Regex string `json:"Regex"` Description string `json:"Description"` Flags []string `json:"Flags"` Help string `json:"Help"` ScriptAddress string `json:"ScriptAddresss"` }
JSONScriptCommand holds unmarshalled data from script Command.json list
type Prompt ¶
type Prompt struct {
// contains filtered or unexported fields
}
Prompt struct holds the data for the commandline prompt
type ScriptsList ¶
type ScriptsList []JSONScriptCommand
ScriptsList is the Javascript Object stored in Command.json files
Click to show internal directories.
Click to hide internal directories.