Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "List applications in your organization and project", Long: ` The list command retrieves and displays all applications associated with your organization and project. This command allows you to: - View all applications in your current organization and project - Control the number of results per page and which page to view - Choose between a detailed list view or a compact table view The command will display various details about each application, including: - Application details (name, alternate ID, and ID) - Organization information (ID and name) Examples: hyphen app list hyphen app list --page-size 20 --page 2 hyphen app list --table If no applications are found, you'll be informed accordingly. Use 'hyphen app list --help' for more information about available flags. `, Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { printer = cprint.NewCPrinter(flags.VerboseFlag) orgId, err := flags.GetOrganizationID() if err != nil { return err } projectId, err := flags.GetProjectID() if err != nil { return err } service := newService(app.NewService()) apps, err := service.ListApps(orgId, projectId, pageSize, page) if err != nil { return fmt.Errorf("failed to list apps: %w", err) } if len(apps) == 0 { printer.Info("No applications found for the specified organization.") return nil } if showTable { displayTable(apps) } else { displayList(apps) } return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.