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