Documentation
¶
Overview ¶
Package config handles configuration loading and normalization across different formats.
Index ¶
Constants ¶
View Source
const ( // MaxConfigFileSize limits configuration file size to prevent resource exhaustion. MaxConfigFileSize = 10 * 1024 * 1024 // 10 MB )
Variables ¶
View Source
var ( // ErrConfigNotFound is returned when a configuration file is not found. ErrConfigNotFound = errors.New("configuration file not found") // ErrConfigTooLarge is returned when a configuration file exceeds size limits. ErrConfigTooLarge = errors.New("configuration file too large") // ErrConflictingLanguage is returned when merging configs with different language specs. ErrConflictingLanguage = errors.New("conflicting language specifications") // ErrInvalidPackageFormat is returned when a package string has invalid format. ErrInvalidPackageFormat = errors.New("invalid package format") )
View Source
var StandardFileNames = map[string]string{
"cargobump-deps.yaml": "deps.yaml",
"gobump-deps.yaml": "deps.yaml",
"pombump-deps.yaml": "deps.yaml",
"pombump-properties.yaml": "properties.yaml",
"gobump-replaces.yaml": "replaces.yaml",
}
StandardFileNames maps old configuration file names to the new standard names.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Language specifies the language ecosystem (auto, maven, go, rust)
Language string `json:"language,omitempty" yaml:"language,omitempty"`
// Packages lists dependencies to update
Packages []Package `json:"packages,omitempty" yaml:"packages,omitempty"`
// Properties lists properties to update (Maven, etc.)
Properties []Property `json:"properties,omitempty" yaml:"properties,omitempty"`
// Replaces lists module replacements (Go-specific)
Replaces []Replace `json:"replaces,omitempty" yaml:"replaces,omitempty"`
}
Config represents the unified configuration for omnibump.
func LoadConfig ¶
LoadConfig loads configuration from a file, supporting both old and new naming conventions.
type Package ¶
type Package struct {
// Common fields
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Version string `json:"version,omitempty" yaml:"version,omitempty"`
// Maven-specific
GroupID string `json:"groupId,omitempty" yaml:"groupId,omitempty"`
ArtifactID string `json:"artifactId,omitempty" yaml:"artifactId,omitempty"`
Scope string `json:"scope,omitempty" yaml:"scope,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty"`
}
Package represents a dependency package to update.
func ParseInlinePackages ¶
ParseInlinePackages parses inline package specifications from command line. Format: "name@version" or "groupId@artifactId@version" (Maven).
type Property ¶
type Property struct {
Property string `json:"property" yaml:"property"`
Value string `json:"value" yaml:"value"`
}
Property represents a build property to update.
func ParseInlineProperties ¶
ParseInlineProperties parses inline property specifications from command line. Format: "property=value" pairs separated by spaces.
Click to show internal directories.
Click to hide internal directories.