Documentation
¶
Index ¶
- Constants
- type Colorizer
- func (c *Colorizer) Blue(text string) string
- func (c *Colorizer) Color(text, colorCode string) string
- func (c *Colorizer) GetColorSetting() string
- func (c *Colorizer) Gray(text string) string
- func (c *Colorizer) Green(text string) string
- func (c *Colorizer) IsEnabled() bool
- func (c *Colorizer) Red(text string) string
- func (c *Colorizer) Yellow(text string) string
- type DebugLogger
- func (d *DebugLogger) Log(category, message string)
- func (d *DebugLogger) LogAPIRequest(endpoint, method string, hasProject bool, project string)
- func (d *DebugLogger) LogConfig(key, value string)
- func (d *DebugLogger) LogDiscovery(message string)
- func (d *DebugLogger) LogGitLab(message string)
- func (d *DebugLogger) LogProjectDetection(source, project, filePath string)
- func (d *DebugLogger) LogSection(title string)
- func (d *DebugLogger) LogValidate(message string)
- type Formatter
- func (f *Formatter) FormatMessage(w io.Writer, level, message string)
- func (f *Formatter) FormatResult(w io.Writer, format string, results []validator.Result, filename string)
- func (f *Formatter) FormatSummary(w io.Writer, format string, results []validator.FileResult)
- func (f *Formatter) GetDebugLogger() *DebugLogger
- func (f *Formatter) SetDebug(enabled bool, writer io.Writer)
Constants ¶
const ( Reset = "\033[0m" Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" Gray = "\033[90m" )
Color codes for terminal output
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Colorizer ¶
type Colorizer struct {
// contains filtered or unexported fields
}
Colorizer handles color output
func NewColorizer ¶
NewColorizer creates a new colorizer based on the color setting
func (*Colorizer) GetColorSetting ¶ added in v1.0.0
GetColorSetting returns the color setting string
type DebugLogger ¶ added in v1.0.0
type DebugLogger struct {
// contains filtered or unexported fields
}
DebugLogger handles debug output with categories
func NewDebugLogger ¶ added in v1.0.0
func NewDebugLogger(colorSetting string, writer io.Writer) *DebugLogger
NewDebugLogger creates a new debug logger
func (*DebugLogger) Log ¶ added in v1.0.0
func (d *DebugLogger) Log(category, message string)
Log logs a debug message with a category Categories: CONFIG, DISCOVER, DETECT, API, GITLAB, VALIDATE
func (*DebugLogger) LogAPIRequest ¶ added in v1.0.0
func (d *DebugLogger) LogAPIRequest(endpoint, method string, hasProject bool, project string)
LogAPIRequest logs an API request with details
func (*DebugLogger) LogConfig ¶ added in v1.0.0
func (d *DebugLogger) LogConfig(key, value string)
LogConfig logs configuration loading
func (*DebugLogger) LogDiscovery ¶ added in v1.0.0
func (d *DebugLogger) LogDiscovery(message string)
LogDiscovery logs file discovery
func (*DebugLogger) LogGitLab ¶ added in v1.0.0
func (d *DebugLogger) LogGitLab(message string)
LogGitLab logs GitLab client operations
func (*DebugLogger) LogProjectDetection ¶ added in v1.0.0
func (d *DebugLogger) LogProjectDetection(source, project, filePath string)
LogProjectDetection logs project detection results
func (*DebugLogger) LogSection ¶ added in v1.0.0
func (d *DebugLogger) LogSection(title string)
LogSection logs a section header for grouping debug output
func (*DebugLogger) LogValidate ¶ added in v1.0.0
func (d *DebugLogger) LogValidate(message string)
LogValidate logs validation operations
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter handles output formatting
func NewFormatter ¶
NewFormatter creates a new output formatter
func NewFormatterWithDebug ¶ added in v1.0.0
NewFormatterWithDebug creates a new output formatter with debug logging enabled
func (*Formatter) FormatMessage ¶
FormatMessage formats a generic message
func (*Formatter) FormatResult ¶
func (f *Formatter) FormatResult(w io.Writer, format string, results []validator.Result, filename string)
FormatResult formats and writes validation results to the output
func (*Formatter) FormatSummary ¶ added in v0.2.0
FormatSummary formats and writes a summary of batch validation results
func (*Formatter) GetDebugLogger ¶ added in v1.0.0
func (f *Formatter) GetDebugLogger() *DebugLogger
GetDebugLogger returns the debug logger (may be nil if debug disabled)