commands

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(teamserver *server.Server, teamclient *client.Client) *cobra.Command

Generate returns a "teamserver" command root and its tree for teamserver (server-side) management. It requires a teamclient so as to bind its "teamclient" tree as a subcommand of the server root. This is so that all CLI applications which can be a teamserver can also be a client of their own.

** Commands do:

  • Work even if the teamserver/client returns errors: those are returned &| printed &| logged.
  • Use the cobra utilities OutOrStdout(), ErrOrStdErr(), ... for all and every command output.
  • Have attached completions for users/listeners/config files of all sorts, and other things.
  • Have the ability to be ran in closed-loop console applications ("single runtime shell").

** Commands do NOT:

  • Ensure they are connected to a server instance before running (in memory).
  • Call os.Exit() anywhere, thus will not exit the program embedding them.
  • Ignite/start the teamserver core/filesystem/backends before they absolutely need to. Consequently, do not touch the filesystem until they absolutely need to.
  • Connect the client more than once to the teamserver.
  • Start persistent listeners, excluding the daemon command.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL