severity

package
v3.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 7 Imported by: 0

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) JSONSchema

func (severityHolder Holder) JSONSchema() *jsonschema.Schema

Implement a jsonschema for the severity holder

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) MarshalYAML

func (severities Severities) MarshalYAML() (interface{}, 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