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 IsUserConfigExists ¶ added in v0.44.1
IsUserConfigExists checks if the user config file exists at the given path.
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."`
Defaults hermit.Config `hcl:"defaults,block,optional" help:"Default configuration values for new Hermit environments."`
}
UserConfig is stored in ~/.hermit.hcl
func LoadUserConfig ¶ added in v0.2.18
func LoadUserConfig(configPath string) (UserConfig, error)
LoadUserConfig from disk.
func NewUserConfigWithDefaults ¶ added in v0.44.12
func NewUserConfigWithDefaults() UserConfig
Source Files
¶
- activate_cmd.go
- auto_version_cmd.go
- bundle_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
Click to show internal directories.
Click to hide internal directories.