dockge-cli/dockge_cli/client/commandprovider/descriptors.py
Firq d3e5d4ae56
All checks were successful
/ backend-pylint (push) Successful in 13s
/ build-artifacts (push) Successful in 8s
/ publish-artifacts (push) Successful in 20s
Improved typing, refactored code, fixed some issues
2024-07-04 22:12:36 +02:00

89 lines
2.4 KiB
Python

from .bindings import ExecutionCommands
command_mappings = [
{
"command": "host",
"description": "Sets and gets the URI of the dockge instance. Remove any unnecessary subdomains/protocols from the URI",
"args": 1,
"optional": True,
"binding": ExecutionCommands.host
},
{
"command": "login",
"description": "Logs into a given dockge account, either with an interactive dialogue or by passing --user and --password",
"args": 2,
"optional": True,
"binding": ExecutionCommands.login
},
{
"command": "logout",
"description": "Removes the credentials from the local storage.",
"args": 0,
"optional": False,
"binding": ExecutionCommands.logout
},
{
"command": "list",
"description": "Lists all available stacks with their status",
"args": 0,
"optional": False,
"binding": ExecutionCommands.list
},
{
"command": "status",
"description": "Returns the status of one stack",
"args": 1,
"optional": False,
"binding": ExecutionCommands.status
},
{
"command": "restart",
"description": "Restarts a given stack",
"args": 1,
"optional": False,
"binding": ExecutionCommands.restart
},
{
"command": "start",
"description": "Starts a given stack",
"args": 1,
"optional": False,
"binding": ExecutionCommands.start
},
{
"command": "stop",
"description": "Stops a given stack",
"args": 1,
"optional": False,
"binding": ExecutionCommands.stop
},
{
"command": "down",
"description": "Stop & Downs a given stack",
"args": 1,
"optional": False,
"binding": ExecutionCommands.down
},
{
"command": "update",
"description": "Updates a stack",
"args": 1,
"optional": False,
"binding": ExecutionCommands.update
},
{
"command": "exit",
"description": "Exits the CLI - this will reset all settings, including credentials and host",
"args": 0,
"optional": False,
"binding": ExecutionCommands.exit
},
{
"command": "help",
"description": "Displays helping hints for commands",
"args": 1,
"optional": True,
"binding": ExecutionCommands.help
}
]