config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

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
)

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)

func SetConfigFilePath

func SetConfigFilePath(p string)

Types

type CleanupPolicy

type CleanupPolicy struct {
	Action string `yaml:"action"`
}

type Config

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

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

func InitConfig

func InitConfig() *Config

type Repository

type Repository struct {
	Name    string        `yaml:"name"`
	URL     string        `yaml:"url"`
	Target  string        `yaml:"target"`
	Cleanup CleanupPolicy `yaml:"cleanup"`
}

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 cleanup policy.

Jump to

Keyboard shortcuts

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