Documentation
¶
Overview ¶
Package root contains root application functions
Index ¶
- func Authenticate(authFn func(string) error) error
- func MainLoop[A any](app *A, cmdMap map[string]*CmdConfig[A], onExit func())
- func NewCommandMap[A any](cfgs ...*CmdConfig[A]) map[string]*CmdConfig[A]
- func ParamsMap(params []string, required []string, optional []string) (dict.Strings, error)
- type CmdConfig
- type CmdHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶
Authenticate performs authentication for the Root account in the command-line app
func NewCommandMap ¶
NewCommandMap creates a new map of command to CmdConfigs
Types ¶
type CmdConfig ¶
type CmdConfig[A any] struct { Command string MinParams int Docs string Handler CmdHandler[A] }
func NewCommand ¶
func NewCommand[A any](command string, minParams int, docs string, handler CmdHandler[A]) *CmdConfig[A]
NewCommand creates a new CmdConfig
type CmdHandler ¶
CmdHandler takes in a list of string parameters
Click to show internal directories.
Click to hide internal directories.