app

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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
	// 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 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.

Jump to

Keyboard shortcuts

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