Documentation ¶
Index ¶
- func ConfigsAppCompleter(cli *client.Client, tag string) carapace.Action
- func ConfigsCompleter(cli *client.Client, filePath, ext, tag string, noSelf bool) carapace.CompletionCallback
- func Generate(cli *client.Client) *cobra.Command
- func PostRun(client *client.Client) command.CobraRunnerE
- func PreRun(teamclient *client.Client, opts ...client.Options) command.CobraRunnerE
- func PreRunNoDisconnect(teamclient *client.Client, opts ...client.Options) command.CobraRunnerE
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigsAppCompleter ¶
ConfigsAppCompleter completes file paths to the current application configs.
func ConfigsCompleter ¶
func ConfigsCompleter(cli *client.Client, filePath, ext, tag string, noSelf bool) carapace.CompletionCallback
ConfigsCompleter completes file paths to other teamserver application configs (clients/users CA, etc) The filepath is the directory between .app/ and the target directory where config files of a certain type should be found, ext is the normal/default extension for those target files, and tag is used in comps.
func Generate ¶
Generate returns a command tree to embed in client applications connecting to a teamserver. It requires only the client to use its functions.
All commands of the tree include an automatic call to client.Connect() to make sure they can reach the server for the stuff they need. Thus no pre-runners are bound to them for this purpose, and users of this command tree are free to add any.
This tree is only safe to embed within closed-loop applications provided that the client *Client was created with WithNoDisconnect(), so that commands can reuse their connections more than once before closing.
func PostRun ¶
func PostRun(client *client.Client) command.CobraRunnerE
PostRun is a cobra command runner that simply calls client.Disconnect() to close the client connection from its teamserver. If the client/commands was configured with WithNoDisconnect, this pre-runner will do nothing.
func PreRun ¶
PreRun returns a cobra command runner which connects the client to its teamserver. If the client is connected, nothing happens and its current connection reused.
Feel free to use this function as a model for your own teamclient pre-runners.
func PreRunNoDisconnect ¶
PreRunNoDisconnect is a pre-runner that will connect the teamclient with the client.WithNoDisconnect() option, so that after each execution, the client connection is kept open. This pre-runner is thus useful for console apps.
Feel free to use this function as a model for your own teamclient pre-runners.
Types ¶
This section is empty.