dockge-cli/dockge_cli/client/commandprovider/descriptors.py

91 lines
2.3 KiB
Python
Raw Normal View History

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