config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package config reads UAC's uac.conf.

Several things that look like collector behaviour are actually configuration, and getting them from the same file UAC reads is the only way the two tools can be expected to agree. The differential harness found both of the surprises here: hash_algorithm defaults to md5 and sha1 (not sha256), and enable_find_atime defaults to false, so access times do not participate in the date range even though find would happily test them.

Index

Constants

This section is empty.

Variables

View Source
var SupportedHashAlgorithms = []string{"md5", "sha1", "sha256"}

SupportedHashAlgorithms are the digests this tool can produce.

Functions

This section is empty.

Types

type Config

type Config struct {
	ExcludePathPattern []string
	ExcludeNamePattern []string
	ExcludeFileSystem  []string
	HashAlgorithm      []string
	MaxDepth           int

	EnableFindMtime bool
	EnableFindAtime bool
	EnableFindCtime bool
}

Config is the subset of uac.conf that changes what gets collected.

func Default

func Default() *Config

Default matches the values shipped in UAC's config/uac.conf.

func Load

func Load(path string) (*Config, error)

Load reads a uac.conf from disk, falling back to the defaults for anything absent. A missing file is not an error: the defaults are the shipped configuration.

func LoadFS

func LoadFS(fsys fs.FS, name string) (*Config, error)

LoadFS reads a uac.conf out of any filesystem, so the embedded copy and an operator-supplied one share the same parsing.

func Read

func Read(r io.Reader) (*Config, error)

Read parses a uac.conf from r.

Jump to

Keyboard shortcuts

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