severity

package
v0.0.0-...-db893c4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetContextSeverity

func SetContextSeverity(ctx context.Context, cs *ContextSeverity) context.Context

SetContextSeverity sets the ContextSeverity instance to context

Types

type ContextSeverity

type ContextSeverity struct {
	// contains filtered or unexported fields
}

ContextSeverity is list of severity that managed by context

func GetContextSeverity

func GetContextSeverity(ctx context.Context) *ContextSeverity

GetContextSeverity gets the ContextSeverity instance from context

func (*ContextSeverity) Add

func (c *ContextSeverity) Add(s Severity)

Add adds a list of severity

func (*ContextSeverity) Max

func (c *ContextSeverity) Max() Severity

Max returns max from list of severity

type Severity

type Severity int

Severity is type of severity that extended int

const (
	Default   Severity = iota * 100 // 0
	Debug                           // 100
	Info                            // 200
	Notice                          // 300
	Warning                         // 400
	Error                           // 500
	Critical                        // 600
	Alert                           // 700
	Emergency                       // 800
)

Enum for severity

func (Severity) String

func (s Severity) String() string

String returns text representation for the severity

Jump to

Keyboard shortcuts

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