// SPDX-FileCopyrightText: 2023 Paul Schaub // // SPDX-License-Identifier: Apache-2.0 package org.pgpainless.wot.cli.subcommands import org.pgpainless.wot.cli.WotCLI import picocli.CommandLine import picocli.CommandLine.Command import java.util.concurrent.Callable @Command(name = "list", description = ["Find all bindings that can be authenticated for all certificates."]) class ListCmd: Callable { @CommandLine.ParentCommand lateinit var parent: WotCLI /** * Execute the command. * * @return exit code */ override fun call(): Int { val result = parent.api.list() println(parent.formatter.format(result)) return 0 } }