fileredactor

package
v0.0.0-...-5ae9364 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilePathProcessor

type FilePathProcessor interface {
	ProcessFilePaths(string) ([]string, error)
}

FilePathProcessor is an interface for an entity which accepts file paths separated by the newline (`\n`) character and returns a slice of absolute paths.

func NewFilePathProcessor

func NewFilePathProcessor(modifier pathutil.PathModifier, checker pathutil.PathChecker) FilePathProcessor

NewFilePathProcessor returns a structure which implements the FilePathProcessor interface. The implementation includes handling filepaths defined as environment variables, relative file paths, and absolute file paths. The implementation also includes making sure the filepath exists and is not a directory.

type FileRedactor

type FileRedactor interface {
	RedactFiles([]string, []string) error
}

FileRedactor is an interface for a structure which, given a slice of file paths and another slice of secrets can process the specified files to redact secrets from them.

func NewFileRedactor

func NewFileRedactor(manager fileutil.FileManager) FileRedactor

NewFileRedactor returns a structure that implements the FileRedactor interface

Jump to

Keyboard shortcuts

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