bootstrap

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package bootstrap handles application initialization and startup logic.

This package provides a clean separation between the main entry point and the actual application startup process, making the code more testable and maintainable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleConfigWizard

func HandleConfigWizard(cfg *config.Config, configPath string, activeProfile string) error

HandleConfigWizard launches the configuration wizard.

func ResolveConfigPath

func ResolveConfigPath(flagPath string) string

ResolveConfigPath resolves the configuration file path.

func ResolveConfigPathForWizard added in v1.0.16

func ResolveConfigPathForWizard(flagPath string) string

ResolveConfigPathForWizard resolves a configuration path for the config wizard.

It prefers an explicit flag path, then an existing default config file, and finally falls back to the standard default path so the wizard can create it.

func StartApplication

func StartApplication(result *BootstrapResult) error

StartApplication starts the main application with the given configuration.

Types

type BootstrapOptions

type BootstrapOptions struct {
	ConfigPath   string
	Profile      string
	NoCache      bool
	Version      bool
	ConfigWizard bool
	// Flag values for config overrides
	FlagAddr        string
	FlagUser        string
	FlagPassword    string
	FlagTokenID     string
	FlagTokenSecret string
	FlagRealm       string
	FlagInsecure    bool
	FlagApiPath     string
	FlagSSHUser     string
	FlagVMSSHUser   string
	FlagDebug       bool
	FlagCacheDir    string
	FlagAgeDir      string
}

BootstrapOptions contains all the options for bootstrapping the application.

func ParseFlags

func ParseFlags() BootstrapOptions

ParseFlags parses command line flags and returns bootstrap options.

type BootstrapResult

type BootstrapResult struct {
	Config       *config.Config
	ConfigPath   string
	Profile      string
	NoCache      bool
	InitialGroup string
}

BootstrapResult contains the result of the bootstrap process.

func Bootstrap

func Bootstrap(opts BootstrapOptions) (*BootstrapResult, error)

Bootstrap handles the complete application bootstrap process.

Jump to

Keyboard shortcuts

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