2022-12-26 13:28:24 +11:00
|
|
|
package tasks
|
|
|
|
|
|
|
|
import (
|
|
|
|
"ocl/portainer-devtool/configs"
|
|
|
|
"ocl/portainer-devtool/tasks/subtasks"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ListDevToolCommandTask struct {
|
|
|
|
Config *configs.Config
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewListDevToolCommandTask(cfg *configs.Config) *ListDevToolCommandTask {
|
|
|
|
return &ListDevToolCommandTask{
|
|
|
|
Config: cfg,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (task *ListDevToolCommandTask) Execute() error {
|
|
|
|
subTaskItems := []Tasker{
|
|
|
|
subtasks.NewListVolumeSubTask(task.Config),
|
2022-12-26 18:55:06 +11:00
|
|
|
subtasks.NewListRepositorySubTask(task.Config),
|
2022-12-26 13:28:24 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
ListCommandMenu(subTaskItems, "Which management commands do you want to choose:")
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (task *ListDevToolCommandTask) String() string {
|
|
|
|
return "List Dev Tool Commands"
|
|
|
|
}
|