Documentation
¶
Overview ¶
Package config manages application configuration with GitLab and cache settings
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrConfigNotFound = errors.New("configuration not found")
ErrConfigNotFound is returned when no configuration is found
Functions ¶
func CreateExampleConfig ¶
func CreateExampleConfig() error
CreateExampleConfig creates an example configuration file
func EnsureConfigDir ¶
func EnsureConfigDir() error
EnsureConfigDir ensures the config directory exists
func ExampleConfigPath ¶
func ExampleConfigPath() string
ExampleConfigPath returns the path where the example config should be created
Types ¶
type CacheConfig ¶
type CacheConfig struct {
Dir string `mapstructure:"dir"`
}
CacheConfig holds cache-specific settings
type Config ¶
type Config struct {
GitLab GitLabConfig `mapstructure:"gitlab"`
Cache CacheConfig `mapstructure:"cache"`
ExcludedPaths []string `mapstructure:"excluded_paths"`
}
Config holds the application configuration
func (*Config) AddExclusion ¶
AddExclusion adds a new exclusion pattern if it doesn't already exist
func (*Config) IsExcluded ¶
IsExcluded checks if a project path matches any excluded pattern
func (*Config) RemoveExclusion ¶
RemoveExclusion removes an exclusion pattern
func (*Config) RemoveExclusionForPath ¶
RemoveExclusionForPath removes any exclusion pattern that matches the given path
type GitLabConfig ¶
type GitLabConfig struct {
URL string `mapstructure:"url"`
Token string `mapstructure:"token"`
Timeout int `mapstructure:"timeout"` // timeout in seconds
}
GitLabConfig holds GitLab-specific settings
func (*GitLabConfig) GetTimeout ¶
func (c *GitLabConfig) GetTimeout() time.Duration
GetTimeout returns the GitLab API timeout as time.Duration