severity

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetContextSeverity added in v0.3.0

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

SetContextSeverity sets the ContextSeverity instance to context

Types

type ContextSeverity added in v0.3.0

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

ContextSeverity is list of severity that managed by context

func GetContextSeverity added in v0.3.0

func GetContextSeverity(ctx context.Context) *ContextSeverity

GetContextSeverity gets the ContextSeverity instance from context

func (*ContextSeverity) Add added in v0.3.0

func (c *ContextSeverity) Add(s Severity)

Add adds a list of severity

func (*ContextSeverity) Max added in v0.3.0

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 added in v0.1.1

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