options

package
v0.1.0-pre5 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = Options{
	Algorithms: []intoto.HashAlgorithm{
		intoto.AlgorithmSHA1,
		intoto.AlgorithmSHA256,
	},
	Processors: []string{"hash"},
}

Functions

This section is empty.

Types

type Function

type Function func(*Options) error

func WithAlgorithms

func WithAlgorithms(algos []intoto.HashAlgorithm) Function

func WithFileProcessor

func WithFileProcessor(id string) Function

func WithFilesystem

func WithFilesystem(filesystem fs.FS) Function

func WithIgnorePatterns

func WithIgnorePatterns(patterns []string) Function

func WithNoGitIgnore

func WithNoGitIgnore() Function

func WithPath

func WithPath(path string) Function

type Options

type Options struct {
	Filesystem     fs.FS                  // Filesystem to index
	NoGitignore    bool                   // Do not attempt to read the gitignore file
	IgnorePatterns []string               // Patterns to ignore when scanning file
	Algorithms     []intoto.HashAlgorithm // Algorithms to use when hashing
	Processors     []string               // Identifiers of file processors
}

Jump to

Keyboard shortcuts

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