show.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright (C) 2019 The Syncthing Authors.
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5. // You can obtain one at https://mozilla.org/MPL/2.0/.
  6. package main
  7. import (
  8. "github.com/urfave/cli"
  9. )
  10. var showCommand = cli.Command{
  11. Name: "show",
  12. HideHelp: true,
  13. Usage: "Show command group",
  14. Subcommands: []cli.Command{
  15. {
  16. Name: "version",
  17. Usage: "Show syncthing client version",
  18. Action: expects(0, dumpOutput("system/version")),
  19. },
  20. {
  21. Name: "config-status",
  22. Usage: "Show configuration status, whether or not a restart is required for changes to take effect",
  23. Action: expects(0, dumpOutput("system/config/insync")),
  24. },
  25. {
  26. Name: "system",
  27. Usage: "Show system status",
  28. Action: expects(0, dumpOutput("system/status")),
  29. },
  30. {
  31. Name: "connections",
  32. Usage: "Report about connections to other devices",
  33. Action: expects(0, dumpOutput("system/connections")),
  34. },
  35. {
  36. Name: "usage",
  37. Usage: "Show usage report",
  38. Action: expects(0, dumpOutput("svc/report")),
  39. },
  40. },
  41. }