Documentation
¶
Index ¶
- Variables
- func ConfigureSSHKey(props *props.Props, cfg config.Containable, opts ...ConfigureSSHKeyOption) (string, string, error)
- func NewCmdInitGitHub(p *props.Props) *cobra.Command
- func RunGitHubInit(p *props.Props, cfg config.Containable) error
- func RunInitCmd(p *props.Props, dir string) error
- type ConfigureSSHKeyOption
- type GenerateKeyOption
- type GitHubInitialiser
Constants ¶
This section is empty.
Variables ¶
View Source
var (
GitHubHost = "github.com"
)
Functions ¶
func ConfigureSSHKey ¶
func ConfigureSSHKey(props *props.Props, cfg config.Containable, opts ...ConfigureSSHKeyOption) (string, string, error)
func NewCmdInitGitHub ¶
NewCmdInitGitHub creates the `init github` subcommand.
func RunGitHubInit ¶
func RunGitHubInit(p *props.Props, cfg config.Containable) error
RunGitHubInit forcibly runs both login and SSH configuration regardless of current state. This is used by the explicit `init github` command.
Types ¶
type ConfigureSSHKeyOption ¶
type ConfigureSSHKeyOption func(*configureSSHKeyConfig)
func WithGenerateKeyOptions ¶
func WithGenerateKeyOptions(opts ...GenerateKeyOption) ConfigureSSHKeyOption
func WithSSHKeyPathForm ¶
func WithSSHKeyPathForm(creator func(*string) *huh.Form) ConfigureSSHKeyOption
func WithSSHKeySelectForm ¶
type GenerateKeyOption ¶
type GenerateKeyOption func(*generateKeyConfig)
func WithPassphraseForm ¶
func WithPassphraseForm(creator func(*string) *huh.Form) GenerateKeyOption
func WithUploadConfirmForm ¶
func WithUploadConfirmForm(creator func(*bool) *huh.Form) GenerateKeyOption
type GitHubInitialiser ¶
GitHubInitialiser handles both GitHub authentication and SSH key configuration.
func NewGitHubInitialiser ¶
func NewGitHubInitialiser(p *props.Props, skipLogin, skipKey bool) *GitHubInitialiser
NewGitHubInitialiser creates a new GitHubInitialiser and mounts its assets.
func (*GitHubInitialiser) Configure ¶
func (g *GitHubInitialiser) Configure(props *props.Props, cfg config.Containable) error
Configure runs the interactive login and/or SSH configuration.
func (*GitHubInitialiser) IsConfigured ¶
func (g *GitHubInitialiser) IsConfigured(cfg config.Containable) bool
IsConfigured returns true if unskipped components are already present in the config.
func (*GitHubInitialiser) Name ¶
func (g *GitHubInitialiser) Name() string
Click to show internal directories.
Click to hide internal directories.