cli

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// InfoStyle defines the style used for informational output.
	InfoStyle = lipgloss.NewStyle().Foreground(lipgloss.ANSIColor(11))

	// SuccessStyle defines the style used for success output.
	SuccessStyle = lipgloss.NewStyle().Foreground(lipgloss.ANSIColor(10))

	// ErrorStyle defines the style used for error output.
	ErrorStyle = lipgloss.NewStyle().Foreground(lipgloss.ANSIColor(9))
)
View Source
var (
	// BackoffStrategyValNone ...
	RetryStrategyValNever = &backoff.StopBackOff{}

	// RetryStrategyValConstant ...
	RetryStrategyValConstant = backoff.WithMaxRetries(&backoff.ConstantBackOff{Interval: 5 * time.Second}, 5)

	// RetryStrategyValExponential ...
	RetryStrategyValExponential = backoff.NewExponentialBackOff()

	// RetryStrategyValAlways ...
	RetryStrategyValAlways = &backoff.ZeroBackOff{}
)

Functions

func Error

func Error(format string, a ...any)

Error outputs an error message to STDERR.

func Info

func Info(format string, a ...any)

Info outputs an informational message to STDOUT.

func Success

func Success(format string, a ...any)

Success outputs a success message to STDERR.

Types

type RetryStrategy

type RetryStrategy struct {
	Val backoff.BackOff
}

RetryStrategy wraps a retry strategy.

func (*RetryStrategy) Set

func (bo *RetryStrategy) Set(s string) error

Set sets the wrapped retry strategy.

func (RetryStrategy) String

func (bo RetryStrategy) String() string

String returns the wrapped retry strategy.

func (*RetryStrategy) Type

func (*RetryStrategy) Type() string

Type returns the name of the backoff retry type.

type RulesPreset

type RulesPreset struct {
	Val []detect.GitleaksRuleFunction
}

RulesPreset wraps a rules preset.

func (*RulesPreset) Set

func (rp *RulesPreset) Set(s string) error

Set sets the wrapped rules preset.

func (RulesPreset) String

func (rp RulesPreset) String() string

String returns the wrapped rules preset.

func (*RulesPreset) Type

func (*RulesPreset) Type() string

Type returns the name of the rules preset type.

Jump to

Keyboard shortcuts

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