Documentation
¶
Overview ¶
Package config contains application configuration struct
Index ¶
Constants ¶
View Source
const (
FeatureSSHConfig = "ssh_config"
)
Variables ¶
View Source
var SupportedFeatures = []string{"ssh_config"}
SupportedFeatures contains a list of application features that can be enabled or disabled.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶ added in v1.5.0
type Configuration struct {
AppMode constant.AppMode
AppName string
DisableFeature FeatureFlag
EnableFeature FeatureFlag
SetTheme string
AppHome string `env:"GG_HOME"`
LogLevel constant.LogLevel `env:"GG_LOG_LEVEL" envDefault:"info"`
SSHConfigPath string `env:"GG_SSH_CONFIG_FILE_PATH"`
// SetSSHConfigPath is not the same as SSHConfigPath, as when this is set, we must
// write the value to state file and exit. When SSHConfigPath is set, we just use it
// as the path to ssh config within the current application run.
SetSSHConfigPath string
}
Configuration structs contains user-definable parameters.
func Initialize ¶ added in v1.5.0
func Initialize() (*Configuration, error)
type FeatureFlag ¶ added in v1.5.0
type FeatureFlag string
FeatureFlag represents application feature flag that can be enabled or disabled.
func (*FeatureFlag) Set ¶ added in v1.5.0
func (ff *FeatureFlag) Set(value string) error
Set validates and sets the feature flag value.
func (*FeatureFlag) String ¶ added in v1.5.0
func (ff *FeatureFlag) String() string
Click to show internal directories.
Click to hide internal directories.