util

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 26 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 GetGitProviderConfigIdFromFlag added in v0.38.0

func GetGitProviderConfigIdFromFlag(ctx context.Context, apiClient *apiclient.APIClient, gitProviderConfigFlag *string) (*string, 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 GetTarget added in v0.38.0

func GetTarget(config GetTargetConfig) (*target_view.TargetView, error)

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
	GitProviderConfigId string
	NamespaceId         string
	Namespace           string
	ChosenRepo          *apiclient.GitRepository
	ProjectOrder        int
	ProviderId          string
}

type GetTargetConfig added in v0.40.0

type GetTargetConfig struct {
	Ctx               context.Context
	ApiClient         *apiclient.APIClient
	TargetList        []apiclient.ProviderTarget
	ActiveProfileName string
	TargetNameFlag    string
	PromptUsingTUI    bool
}

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
	GitProviderConfig *string
}

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