Documentation ¶
Index ¶
- Constants
- func GetURLParts(remoteURL string) []string
- func ParseGitRemote(log logger.Logger, workingDir string) (*gogit.Repository, error)
- func ParseRemoteURL(repo *gogit.Repository) (string, error)
- type BootstrapCmdOption
- type BootstrapWizard
- type BootstrapWizardCmd
- type BootstrapWizardTask
- type DefaultValueGetter
- type GitProvider
Constants ¶
View Source
const ( BranchOptionKey = "branch" HostnameOptionKey = "hostname" OwnerOptionKey = "owner" PasswordOptionKey = "password" PathOptionKey = "path" PersonalOptionKey = "personal" PrivateKeyFileOptionKey = "private-key-file" PrivateOptionKey = "private" RepositoryOptionKey = "repository" SSHHostnameOptionKey = "ssh-hostname" TeamOptionKey = "team" TokenAuthOptionKey = "token-auth" URLOptionKey = "url" UsernameOptionKey = "username" )
Variables ¶
This section is empty.
Functions ¶
func ParseGitRemote ¶
ParseGitRemote parses the git remote (if it exists) from the working directory to autofill some command options.
func ParseRemoteURL ¶
func ParseRemoteURL(repo *gogit.Repository) (string, error)
ParseRemoteURL extracts remote URL from the repository
Types ¶
type BootstrapCmdOption ¶
type BootstrapWizard ¶
type BootstrapWizard struct {
// contains filtered or unexported fields
}
func NewBootstrapWizard ¶
func NewBootstrapWizard(log logger.Logger, remoteURL string, gitProvider GitProvider, repo *gogit.Repository, path string) (*BootstrapWizard, error)
NewBootstrapWizard creates a wizard to gather all bootstrap config options before running flux bootstrap.
func (*BootstrapWizard) BuildCmd ¶
func (wizard *BootstrapWizard) BuildCmd(log logger.Logger) BootstrapWizardCmd
BuildCmd builds flux bootstrap command options as key/values pairs.
type BootstrapWizardCmd ¶
type BootstrapWizardCmd struct { Provider GitProvider Options []*BootstrapCmdOption }
type BootstrapWizardTask ¶
type BootstrapWizardTask struct {
// contains filtered or unexported fields
}
type DefaultValueGetter ¶
type DefaultValueGetter func(*gogit.Repository) string
type GitProvider ¶
type GitProvider int32
const ( GitProviderUnknown GitProvider = 0 GitProviderGitHub GitProvider = 1 GitProviderGitLab GitProvider = 2 GitProviderGit GitProvider = 3 GitProviderBitbucketServer GitProvider = 4 )
func ParseGitProvider ¶
func ParseGitProvider(hostname string) GitProvider
ParseGitProvider extracts git provider from the remote URL, if possible
func SelectGitProvider ¶
func SelectGitProvider(log logger.Logger) (GitProvider, error)
SelectGitProvider displays text inputs to enter or edit all command flag values.
Click to show internal directories.
Click to hide internal directories.