config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(cfg *Config) error

SaveConfig saves the configuration to .ignoregrets/config.yaml

func ValidateConfig

func ValidateConfig(cfg *Config) error

ValidateConfig checks if the configuration is valid

Types

type Config

type Config struct {
	Retention    int      `yaml:"retention"`
	SnapshotOn   []string `yaml:"snapshot_on"`
	RestoreOn    []string `yaml:"restore_on"`
	HooksEnabled bool     `yaml:"hooks_enabled"`
	Exclude      []string `yaml:"exclude"`
	Include      []string `yaml:"include"`
}

Config represents the configuration structure for ignoregrets

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a new Config with default values

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the configuration from .ignoregrets/config.yaml

Jump to

Keyboard shortcuts

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