config

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

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