forge

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2025 License: LGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeploymentTypeDeploy   = "deploy"
	DeploymentTypeDestroy  = "destroy"
	DeploymentTypeReset    = "reset"
	DeploymentStatusFailed = "failed"
	DeploymentStatusPassed = "passed"
)
View Source
const MaxProjectNameLen = 50

Variables

View Source
var BaseCmd = &cobra.Command{
	Use:   "forge",
	Short: "Forge is a tool for managing World Forge projects",
	RunE: func(cmd *cobra.Command, _ []string) error {
		if !checkLogin() {
			return nil
		}

		globalConfig, err := globalconfig.GetGlobalConfig()
		if err != nil {
			return eris.Wrap(err, "Failed to get user")
		}

		fmt.Println("✨ World Forge Status ✨")
		fmt.Println("=====================")
		fmt.Println("\n👤 User Information")
		fmt.Println("------------------")
		fmt.Printf("ID:   %s\n", globalConfig.Credential.ID)
		fmt.Printf("Name: %s\n", globalConfig.Credential.Name)

		err = showOrganizationList(cmd.Context())
		if err != nil {
			return eris.Wrap(err, "Failed to show organization list")
		}

		err = showProjectList(cmd.Context())
		if err != nil {
			return eris.Wrap(err, "Failed to show project list")
		}

		fmt.Println("\n================================================")

		return nil
	},
}

Functions

func NewTeaProgram added in v1.4.1

func NewTeaProgram(model tea.Model, opts ...tea.ProgramOption) *tea.Program

NewTeaProgram will create a BubbleTea program that automatically sets the no input option if you are not on a TTY, so you can run the debugger. Call it just as you would call tea.NewProgram().

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL