Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenInstaller ¶ added in v0.25.0
GenInstaller generates an instaler script from the app configuration. It returns a byte slice of the generated installer script, its SHA-256 digest as a hexadecimal string, and any error encountered.
func Main ¶
func Main(config Config)
Main runs the Hermit command-line application with the given config.
func UserConfigResolver ¶ added in v0.2.18
func UserConfigResolver(userConfig UserConfig) kong.Resolver
UserConfigResolver is a Kong configuration resolver for the Hermit user configuration file.
Types ¶
type Config ¶
type Config struct { Version string LogLevel ui.Level BaseDistURL string // Possible system-wide installation paths InstallPaths []string // SHA256 checksums for all known versions of per-environment scripts. // If empty shell.ScriptSHAs will be used. SHA256Sums []string HTTP func(HTTPTransportConfig) *http.Client State state.Config KongOptions []kong.Option KongPlugins kong.Plugins // Defaults to cache.GetSource if nil. PackageSourceSelector cache.PackageSourceSelector // True if we're running in CI - disables progress bar. CI bool }
Config for the main Hermit application.
type GlobalState ¶ added in v0.2.2
type GlobalState struct {
Env envars.Envars `help:"Extra environment variables to apply to environments."`
}
GlobalState configurable by user to be passed through to Hermit.
type HTTPTransportConfig ¶
type HTTPTransportConfig struct { ResponseHeaderTimeout time.Duration DialTimeout time.Duration KeepAlive time.Duration }
HTTPTransportConfig defines the configuration for HTTP transports used by Hermit.
type JSONFormattable ¶ added in v0.21.0
type JSONFormattable struct {
JSON bool `help:"Format information as a JSON array" default:"false"`
}
JSONFormattable contains the shared JSON boolean flag for Kong
type UserConfig ¶ added in v0.2.18
type UserConfig struct { Prompt string `` /* 154-byte string literal not displayed */ ShortPrompt bool `hcl:"short-prompt,optional" help:"If true use a short prompt when an environment is activated."` NoGit bool `hcl:"no-git,optional" help:"If true Hermit will never add/remove files from Git automatically."` Idea bool `hcl:"idea,optional" help:"If true Hermit will try to add the IntelliJ IDEA plugin automatically."` }
UserConfig is stored in ~/.hermit.hcl
func LoadUserConfig ¶ added in v0.2.18
func LoadUserConfig() (UserConfig, error)
LoadUserConfig from disk.
Source Files ¶
- activate_cmd.go
- auto_version_cmd.go
- clean_cmd.go
- commands.go
- deactivate_cmd.go
- dump_user_config_schema_cmd.go
- env_cmd.go
- exec_cmd.go
- gc_cmd.go
- gen_installer_cmd.go
- info_cmd.go
- init_cmd.go
- install_cmd.go
- list_cmd.go
- main.go
- manifest_add_digests_cmd.go
- manifest_cmd.go
- manifest_create_cmd.go
- noop_cmd.go
- script_sha_cmd.go
- search_cmd.go
- shell_hooks_cmd.go
- status_cmd.go
- test_cmd.go
- uninstall_cmd.go
- update_cmd.go
- upgrade_cmd.go
- user_config.go
- validate_cmd.go
- validate_env_cmd.go
- validate_script_cmd.go
- validate_source_cmd.go
- version_cmd.go