util

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddProjectConfigurationFlags added in v0.28.0

func AddProjectConfigurationFlags(cmd *cobra.Command, flags ProjectConfigurationFlags, multiProjectFlagException bool)

func AddProjectFromConfig added in v0.24.0

func AddProjectFromConfig(projectConfig *apiclient.ProjectConfig, apiClient *apiclient.APIClient, projects *[]apiclient.CreateProjectDTO, branchFlag *string) (*string, error)

func CheckAnyProjectConfigurationFlagSet added in v0.28.0

func CheckAnyProjectConfigurationFlagSet(flags ProjectConfigurationFlags) bool

func GetBranchFromProjectConfig added in v0.24.0

func GetBranchFromProjectConfig(projectConfig *apiclient.ProjectConfig, apiClient *apiclient.APIClient, projectOrder int) (*apiclient.GitBranch, error)

func GetCreateProjectDtoFromFlags added in v0.28.0

func GetCreateProjectDtoFromFlags(projectConfigurationFlags ProjectConfigurationFlags) (*apiclient.CreateProjectDTO, error)

func GetProjectNameFromRepo added in v0.13.0

func GetProjectNameFromRepo(repoUrl string) string

func GetProjectProviderMetadata added in v0.28.0

func GetProjectProviderMetadata(workspace *apiclient.WorkspaceDTO, projectName string) (string, error)

func GetProjectsCreationDataFromPrompt added in v0.24.0

func GetProjectsCreationDataFromPrompt(config ProjectsDataPromptConfig) ([]apiclient.CreateProjectDTO, error)

func GetSanitizedProjectName added in v0.19.0

func GetSanitizedProjectName(projectName string) (string, error)

func GetSuggestedName added in v0.24.0

func GetSuggestedName(initialSuggestion string, existingNames []string) string

func IsProjectRunning added in v0.24.0

func IsProjectRunning(workspace *apiclient.WorkspaceDTO, projectName string) bool

func SetBranchFromWizard added in v0.26.0

func SetBranchFromWizard(config BranchWizardConfig) (*apiclient.GitRepository, error)

Types

type BranchWizardConfig added in v0.24.0

type BranchWizardConfig struct {
	ApiClient    *apiclient.APIClient
	ProviderId   string
	NamespaceId  string
	Namespace    string
	ChosenRepo   *apiclient.GitRepository
	ProjectOrder int
}

type ProjectConfigurationFlags added in v0.28.0

type ProjectConfigurationFlags struct {
	Builder          *views_util.BuildChoice
	CustomImage      *string
	CustomImageUser  *string
	Branches         *[]string
	DevcontainerPath *string
	EnvVars          *[]string
	Manual           *bool
}

type ProjectsDataPromptConfig added in v0.24.0

type ProjectsDataPromptConfig struct {
	UserGitProviders    []apiclient.GitProvider
	ProjectConfigs      []apiclient.ProjectConfig
	Manual              bool
	SkipBranchSelection bool
	MultiProject        bool
	BlankProject        bool
	ApiClient           *apiclient.APIClient
	Defaults            *views_util.ProjectConfigDefaults
}

type RepositoryWizardConfig added in v0.24.0

type RepositoryWizardConfig struct {
	ApiClient           *apiclient.APIClient
	UserGitProviders    []apiclient.GitProvider
	Manual              bool
	MultiProject        bool
	SkipBranchSelection bool
	ProjectOrder        int
	SelectedRepos       map[string]int
}

Jump to

Keyboard shortcuts

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