config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Debug is the most verbose logging level and will
	// report all logs
	Debug = "DEBUG"
	// Info level reports logrus.Info, logrus.Warn, and logrus.Error
	Info = "INFO"
	// Warn level reports logrus.Warn, and logrus.Error
	Warn = "WARN"
	// Error level reports ony error messages
	Error = "ERROR"
	// Off level turns off logs from logrus. instead the "stylized"
	// logging using terminal spinners will be used
	Off = "OFF"
)

Variables

This section is empty.

Functions

func Init

func Init() error

Init will initialize the configuration of the application

func ShouldUseColor

func ShouldUseColor() bool

ShouldUseColor will return true, if colored output should be used

func ShouldUseSpinner

func ShouldUseSpinner() bool

ShouldUseSpinner will return true if the "stylized"

Types

type Config

type Config struct {
	// Regexp is the configuration for the regular expression detector
	Regexp RegexpConfig
	// Entropy is the configuration for the string entropy detector
	Entropy EntropyConfig
}

Config is the user configuration for the application

type EntropyConfig

type EntropyConfig struct {
}

EntropyConfig configuration for the string entropy detector

type LoggingLevel

type LoggingLevel = string

LoggingLevel is the verbosity level of logging

type Pattern

type Pattern struct {
	// Expression is a regular expression for matching a secret.
	// must be compatible with [re2 syntax]
	//
	// [re2 syntax]: https://github.com/google/re2/wiki/Syntax
	Expression string
	// Name is a human-readable name of the secret the expression
	// searches for (i.e. AWS Secret Key, OAuth token, etc.)
	Name string
}

Pattern reprsents a user defined pattern for the Regexp Detector to search for.

type RegexpConfig

type RegexpConfig struct {
	// Patterns is the list of regular expressions
	// patterns to search for
	Patterns []Pattern

	// DisableDefaults will disable the default regular expressions
	// from begin include in the regular expression detector. See full
	// list for the detections.DefaultPatterns
	DisableDefaults bool
}

RegexpConfig represents the configuration for the

Jump to

Keyboard shortcuts

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