config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(path string, cfg Config) error

Types

type Config

type Config struct {

	// Loaded from TokenFile during Load().
	GitHubToken string

	TokenFile string `mapstructure:"token_file"`

	ConfigDir string `mapstructure:"config_dir"`

	DataDir string `mapstructure:"data_dir"`

	StateDir         string `mapstructure:"state_dir"`
	MirrorsStateFile string `mapstructure:"mirrors_state_file"`

	MirrorDir   string `mapstructure:"mirror_dir"`
	SnapshotDir string `mapstructure:"snapshot_dir"`

	LogDir  string `mapstructure:"log_dir"`
	LogFile string `mapstructure:"log_file"`

	TempDir string `mapstructure:"temp_dir"`

	RepoInventory string `mapstructure:"repo_inventory"`
	LockFile      string `mapstructure:"lock_file"`

	CooldownMinSeconds int `mapstructure:"cooldown_min_seconds"`
	CooldownMaxSeconds int `mapstructure:"cooldown_max_seconds"`

	MinimumFreeDiskPercent int `mapstructure:"minimum_free_disk_percent"`

	GitRetryAttempts int `mapstructure:"retry_attempts"`

	SnapshotRetention int `mapstructure:"snapshot_retention"`
}

func Default

func Default() Config

func Load

func Load() (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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