config

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config provides configuration management for quad-ops

Index

Constants

View Source
const (
	DefaultRepositoryDir     = "/var/lib/quad-ops"
	DefaultSyncInterval      = 5 * time.Minute
	DefaultQuadletDir        = "/etc/containers/systemd"
	DefaultUserRepositoryDir = "$HOME/.local/share/quad-ops"
	DefaultUserQuadletDir    = "$HOME/.config/containers/systemd"
	DefaultUserMode          = false
	DefaultVerbose           = false
	DefaultUnitStartTimeout  = 10 * time.Second
	DefaultImagePullTimeout  = 30 * time.Second
)

Default configuration values for the quad-ops system. These constants define the default values for various configuration settings, such as the repository directory, sync interval, quadlet directory, database path, user mode, and verbosity.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider added in v0.9.0

type Provider interface {
	// GetConfig returns the current application configuration.
	GetConfig() *Settings
	// SetConfig sets the application configuration.
	SetConfig(c *Settings)
	// InitConfig initializes the application configuration.
	InitConfig() *Settings
	// SetConfigFilePath sets the configuration file path.
	SetConfigFilePath(p string)
}

Provider defines the interface for configuration providers.

func DefaultProvider added in v0.16.1

func DefaultProvider() Provider

DefaultProvider returns the default configuration provider instance.

func NewDefaultConfigProvider added in v0.9.0

func NewDefaultConfigProvider() Provider

NewDefaultConfigProvider creates a new default config provider.

type Repository

type Repository struct {
	Name       string `yaml:"name"`
	URL        string `yaml:"url"`
	Reference  string `yaml:"ref,omitempty"`
	ComposeDir string `yaml:"composeDir,omitempty"`
}

Repository represents a repository that is managed by the quad-ops system. It contains information about the repository, including its name, URL, target directory, and compose directory.

type Settings added in v0.9.0

type Settings struct {
	RepositoryDir    string        `yaml:"repositoryDir"`
	SyncInterval     time.Duration `yaml:"syncInterval"`
	QuadletDir       string        `yaml:"quadletDir"`
	Repositories     []Repository  `yaml:"repositories"`
	UserMode         bool          `yaml:"userMode"`
	Verbose          bool          `yaml:"verbose"`
	UnitStartTimeout time.Duration `yaml:"unitStartTimeout"`
	ImagePullTimeout time.Duration `yaml:"imagePullTimeout"`
}

Settings represents the configuration for the quad-ops system. It contains various settings such as the repository directory, sync interval, quadlet directory, database path, user mode, and verbosity.

Jump to

Keyboard shortcuts

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