severity

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: BSD-3-Clause Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColouredSeverityToString added in v0.10.0

func ColouredSeverityToString(severity Severity) string

Obtains the coloured stock string form of a given Severity.

func TranslateStockSeverity

func TranslateStockSeverity(severity Severity) string

Obtains the stock string form of a given Severity.

Types

type Severity

type Severity int

API Severity level.

const (
	Unspecified   Severity = 0
	Violation     Severity = 1
	Alert         Severity = 2
	Critical      Severity = 3
	Failure       Severity = 4
	Warning       Severity = 5
	Notice        Severity = 6
	Informational Severity = 7
	Debug0        Severity = 8
	Debug1        Severity = 9
	Debug2        Severity = 10
	Debug3        Severity = 11
	Debug4        Severity = 12
	Debug5        Severity = 13
	Trace         Severity = 14

	Viol Severity = Violation
	Alrt Severity = Alert
	Crit Severity = Critical
	Fail Severity = Failure
	Warn Severity = Warning
	Notc Severity = Notice
	Info Severity = Informational
	Deb0 Severity = Debug0
	Deb1 Severity = Debug1
	Deb2 Severity = Debug2
	Deb3 Severity = Debug3
	Deb4 Severity = Debug4
	Deb5 Severity = Debug5
	Trac Severity = Trace
)

func (Severity) String

func (severity Severity) String() string

Default string form of the stock severity levels.

type SeverityTranslator

type SeverityTranslator interface {
	SeverityToString(severity Severity) string
}

SeverityTranslator is implemented by a type to customise the translation of Severity into string form.

Jump to

Keyboard shortcuts

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