severity

package
v3.1.10 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 7 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Holder

type Holder struct {
	Severity Severity `mapping:"true"`
}

Holder holds a Severity type. Required for un/marshalling purposes

func (Holder) JSONSchemaType

func (severityHolder Holder) JSONSchemaType() *jsonschema.Type

func (Holder) MarshalJSON

func (severityHolder Holder) MarshalJSON() ([]byte, error)

func (Holder) MarshalYAML

func (severityHolder Holder) MarshalYAML() (interface{}, error)

func (*Holder) UnmarshalJSON

func (severityHolder *Holder) UnmarshalJSON(data []byte) error

func (*Holder) UnmarshalYAML

func (severityHolder *Holder) UnmarshalYAML(unmarshal func(interface{}) error) error

type Severities

type Severities []Severity

Severities used by the goflags library for parsing an array of Severity types, passed as CLI arguments from the user

func GetSupportedSeverities

func GetSupportedSeverities() Severities

func (Severities) MarshalJSON

func (severities Severities) MarshalJSON() ([]byte, error)

func (*Severities) Set

func (severities *Severities) Set(values string) error

func (Severities) String

func (severities Severities) String() string

func (*Severities) UnmarshalJSON

func (severities *Severities) UnmarshalJSON(data []byte) error

func (*Severities) UnmarshalYAML

func (severities *Severities) UnmarshalYAML(unmarshal func(interface{}) error) error

type Severity

type Severity int
const (
	// name:undefined
	Undefined Severity = iota
	// name:info
	Info
	// name:low
	Low
	// name:medium
	Medium
	// name:high
	High
	// name:critical
	Critical
	// name:unknown
	Unknown
)

name:Severity

func (Severity) String

func (severity Severity) String() string

Jump to

Keyboard shortcuts

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