dockge-cli/dockge_cli/client/commands/mappings.py

91 lines
2.3 KiB
Python

from typing import List
from ...models import Command
from .functions import FunctionBindings
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,
func=FunctionBindings.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,
func=FunctionBindings.login
),
Command(
cmd="logout",
description="Removes the credentials from the local storage.",
args=0,
optional=False,
func=FunctionBindings.logout
),
Command(
cmd="list",
description="Lists all available stacks with their status",
args=0,
optional=False,
func=FunctionBindings.list
),
Command(
cmd="status",
description="Returns the status of one stack",
args=1,
optional=False,
func=FunctionBindings.status
),
Command(
cmd="restart",
description="Restarts a given stack",
args=1,
optional=False,
func=FunctionBindings.restart
),
Command(
cmd="start",
description="Starts a given stack",
args=1,
optional=False,
func=FunctionBindings.start
),
Command(
cmd="stop",
description="Stops a given stack",
args=1,
optional=False,
func=FunctionBindings.stop
),
Command(
cmd="down",
description="Stop & Downs a given stack",
args=1,
optional=False,
func=FunctionBindings.down
),
Command(
cmd="update",
description="Updates a stack",
args=1,
optional=False,
func=FunctionBindings.update
),
Command(
cmd="exit",
description="Exits the CLI - this will reset all settings, including credentials and host",
args=0,
optional=False,
func=FunctionBindings.exit
),
Command(
cmd="help",
description="Displays helping hints for commands",
args=1,
optional=True,
func=FunctionBindings.help
)
]