config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 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"
	DefaultDBPath                = "/var/lib/quad-ops/quad-ops.db"
	DefaultUserMode              = false
	DefaultVerbose               = false
	DefaultUsePodmanDefaultNames = false
)

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

func SetConfig

func SetConfig(c *Config)

SetConfig sets the application configuration.

func SetConfigFilePath

func SetConfigFilePath(p string)

SetConfigFilePath sets the configuration file path.

Types

type Config

type Config struct {
	RepositoryDir         string             `yaml:"repositoryDir"`
	SyncInterval          time.Duration      `yaml:"syncInterval"`
	QuadletDir            string             `yaml:"quadletDir"`
	Repositories          []RepositoryConfig `yaml:"repositories"`
	DBPath                string             `yaml:"dbPath"`
	UserMode              bool               `yaml:"userMode"`
	Verbose               bool               `yaml:"verbose"`
	UsePodmanDefaultNames bool               `yaml:"usePodmanDefaultNames"`
}

Config 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.

func GetConfig

func GetConfig() *Config

GetConfig returns the current application configuration.

func InitConfig

func InitConfig() *Config

InitConfig initializes the application configuration.

type RepositoryConfig added in v0.3.0

type RepositoryConfig struct {
	Name                  string `yaml:"name"`
	URL                   string `yaml:"url"`
	Reference             string `yaml:"ref,omitempty"`
	ComposeDir            string `yaml:"composeDir,omitempty"`
	Cleanup               string `yaml:"cleanup,omitempty"`
	UsePodmanDefaultNames bool   `yaml:"usePodmanDefaultNames,omitempty"`
}

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

Jump to

Keyboard shortcuts

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