Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProjectGetCmd = &cobra.Command{ Use: "get [project_id]", Short: "Get a project by ID", Long: ` The project get command retrieves and displays details of a specific project within your Hyphen organization. Usage: hyphen project get [project_id] This command allows you to: - Fetch detailed information about a specific project - Use either the project's ID or alternate ID as the identifier The command will display the following details about the project: - Name: The project's full name - ID: The unique identifier assigned by Hyphen - AlternateID: The human-readable identifier generated from the project name Examples: hyphen project get 12345abc-de67-89fg-hi01-jklmnopqrstu hyphen project get my-project-name After execution, you'll see a summary of the project's details. Note: Make sure you have the necessary permissions to access the project information. `, Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { printer = cprint.NewCPrinter(flags.VerboseFlag) projectID := args[0] orgId, err := flags.GetOrganizationID() if err != nil { printer.Error(cmd, fmt.Errorf("failed to get organization ID: %w", err)) return } service := projects.NewService(orgId) project, err := service.GetProject(projectID) if err != nil { printer.Error(cmd, fmt.Errorf("failed to get project: %w", err)) return } printer.PrintDetail("Name", project.Name) printer.PrintDetail("ID", *project.ID) printer.PrintDetail("AlternateID", project.AlternateID) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.