bootstrap

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 GetURLParts

func GetURLParts(remoteURL string) []string

GetURLParts splits URL to URL parts.

func ParseGitRemote

func ParseGitRemote(log logger.Logger, workingDir string) (*gogit.Repository, error)

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 BootstrapCmdOption struct {
	FlagName  string
	FlagValue string
}

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.

func (*BootstrapWizard) Run

func (wizard *BootstrapWizard) Run(log logger.Logger) error

Run displays text inputs to enter or edit all command flag values.

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.

Jump to

Keyboard shortcuts

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