config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigPath

func GetConfigPath() string

GetConfigPath returns the configuration file path

Types

type Config

type Config struct {
	// Connection settings
	URL     string        `yaml:"url" env:"IT2_URL"`
	Timeout time.Duration `yaml:"timeout" env:"IT2_TIMEOUT"`

	// Output settings
	Format   string `yaml:"format" env:"IT2_FORMAT"`
	Color    bool   `yaml:"color" env:"IT2_COLOR"`
	Template string `yaml:"template" env:"IT2_TEMPLATE"`

	// Retry settings
	RetryAttempts int           `yaml:"retry_attempts" env:"IT2_RETRY_ATTEMPTS"`
	RetryDelay    time.Duration `yaml:"retry_delay" env:"IT2_RETRY_DELAY"`

	// Logging settings
	LogLevel string `yaml:"log_level" env:"IT2_LOG_LEVEL"`
	Verbose  bool   `yaml:"verbose" env:"IT2_VERBOSE"`
	Debug    bool   `yaml:"debug" env:"IT2_DEBUG"`

	// Progress indicators
	ShowProgress bool `yaml:"show_progress" env:"IT2_SHOW_PROGRESS"`

	// Authentication
	Cookie string `yaml:"cookie" env:"ITERM2_COOKIE"`
	Key    string `yaml:"key" env:"ITERM2_KEY"`
}

Config represents the application configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a configuration with default values

func Load

func Load() (*Config, error)

Load loads configuration from file and environment variables

func (*Config) Save

func (c *Config) Save() error

Save saves the configuration to file

Jump to

Keyboard shortcuts

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