config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Schedule string   `koanf:"schedule"`
	Snapraid Snapraid `koanf:"snapraid"`
	Scrub    Scrub    `koanf:"scrub"`
}

Config contains the main snaprd config

func Parse

func Parse(configFile string) (*Config, error)

Parse loads configuration file and unmarshal's to struct

type Scrub

type Scrub struct {
	Enabled    bool `koanf:"enabled"`
	Percentage int  `koanf:"percentage"`
	OlderThan  int  `koanf:"olderThan"`
}

Scrub contains the snapraid scrub specific config

type Snapraid

type Snapraid struct {
	Executable      string `koanf:"executable"`
	ConfigPath      string `koanf:"configPath"`
	DeleteThreshold int    `koanf:"deleteThreshold"`
	Touch           bool   `koanf:"touch"`
}

Snapraid contains the snapraid specific config

Jump to

Keyboard shortcuts

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